Ticket #1374 (closed bug: fixed)
:immediate semantics have changed
|Reported by:||pmichaud||Owned by:|
The semantics of the :immediate flag on subs has changed since 1.4.0 (probably due to trying to get constant values to work). I'm not sure what the correct semantics are supposed to be now, how things are intended to fit together, or whether this is a problem that needs to be addressed with respect to the deprecation policy.
The following program exhibits differences between 1.4.0 and current trunk (r43120):
$ cat immediate.pir .sub 'main' say 'entering main' say 'exiting main' .end .sub 'abc' :immediate $P0 = box 'executed abc' say $P0 .return ($P0) .end .sub 'def' :immediate $P0 = box 'executed def' say $P0 .return ($P0) .end $ RELEASE_1_4_0/parrot -o i.pbc immediate.pir executed abc executed def $ RELEASE_1_8_0/parrot -o i.pbc immediate.pir executed abc executed def $ trunk/parrot -o i.pbc immediate.pir $
In Parrot releases 1.8.0 and earlier, :immediate subs in PIR always executed as soon as they were compiled. In 1.9.0 and current trunk, they sometimes appear to execute when compiled, and other times when the .pbc file is loaded.
Some clarification here (and possibly updates to pdd19) would be helpful.