Ticket #132 (new bug)
Can't thaw a Sub (or a PIR subclass of a Sub)
Reported by: | coke | Owned by: | plobsing |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | core | Version: | |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | Platform: |
Description
Code:
.sub main :main $P0 = get_class 'Sub' $P1 = subclass $P0, 'myProc' .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) compiled = compiled[0] # just want the first executable sub here. compiled() # works .local pmc sub sub = new 'myProc' assign sub, compiled sub() # works $S0 = freeze sub say "frozen" $P2 = thaw $S0 say "thawed" $P2() .end
Output:
hi hi frozen Unsupported key type in Key.thaw current instr.: 'main' pc 48 (borked.pir:30)
I'd expect to be able to thaw this PMC, and then invoke the sub after thaw.
Change History
Note: See
TracTickets for help on using
tickets.