#132: Can't thaw PIR subclass of a Sub
--------------------+-------------------------------------------------------
Reporter: coke | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: none | Version:
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
--------------------+-------------------------------------------------------
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.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/132>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets