Created
May 17, 2012 23:06
-
-
Save anonymous/2722178 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.sub main :main | |
.local pmc pirC | |
pirC = compreg 'PIR' | |
.local string code | |
code = <<"END_CODE" | |
.sub bar | |
say "hi" | |
.end | |
END_CODE | |
.local pmc compiled | |
compiled = pirC(code) | |
.local pmc sub | |
sub = compiled[0] # just want the first executable sub here. | |
sub() # works | |
$S0 = freeze sub | |
say "frozen" | |
$P2 = thaw $S0 | |
say "thawed" | |
$P2() | |
.end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment