logo       

[CVS ci] PMC constants 2: msg#00647

lang.perl.perl6.internals

Subject: [CVS ci] PMC constants 2

Ok, next is committed. The existing constant syntax is extended:

.const <pmc_enum> var_or_ident = "initstring"

Currently only subroutine constants are supported, e.g.

.const .Sub $P0 = "foo"
.const .Sub func = "foo"

The actual opcode emitted is "sub_p_pc" with the index of the subroutine constant as 2nd argument. This works of course only for subroutines that are in the same file. Subs in loaded bytecode have still to be located with the "find_global" opcodes.

This PMC constant syntax is available in PASM mode too.

leo




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise