|
Re: Q: newsub opcodes: msg#00629lang.perl.perl6.internals
Dan Sugalski <dan@xxxxxxxxx> wrote: >> >> get_sub Px, foo # find the PMC with label "foo" in constants > Yeah, but I think I've a better approach. Instead of doing this, > let's just get PMC constants implemented. Well, they are implemented, at least partly. Sub PMCs are in the constant table. The funny C<get_sub> "opcode" is actually a ... > set_p_pc op. ... with the small difference, that at compile time, the integer argument is a label (offset). What about the other part: closures - should they be created via "new" always? > While we're at it we should see about adding in an integer constant > table that can be fixed up on load (to take care of those pesky "what > number did my PMC class map to" problems more quickly than the hash > lookup) but we can put that off a bit. You are thinking of a 2-stage lookup? I1 = dynamic_type I0 # lookup runtime type mapping $P0 = new I1 A normal IntList Array can do that too. leo |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: pmc_type: 00629, Paolo Molaro |
|---|---|
| Next by Date: | Mostly a Perl task for the interested: 00629, Leopold Toetsch |
| Previous by Thread: | Re: Q: newsub opcodesi: 00629, Dan Sugalski |
| Next by Thread: | Re: Q: newsub opcodes: 00629, Dan Sugalski |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |