Jonathan Sillito (via RT) <[EMAIL PROTECTED]> writes: [...] > The attached patch implements a very complete set of lexical scope > semantics. For those that have been following along, here are some > highlights. > > - supports (fast) access by lexical position, rather than just by name > > - adds a couple more ops and some variations, including push_pad and > peek_pad > > - adds a couple of keyed vtable functions for Scratchpad PMCs, so the > following work in a similar way to the various flavours of find_lex and > store_lex. The difference is that the find_lex and store_lex ops work > implicitly on the current pad, while these let you explicitly specify a pad > > new_pad P20, 0 # does not push on stack > set P20[0;"foo"], P0 # like: store_lex Ix, Sy, Pz > set P20[0;0], P0 # like: store_lex Ix, Iy, Pz > set P20["foo"], P0 # like: store_lex Sx, Py > set P20[0], P0 # like: store_lex Ix, Py > set P3, P20[0;"foo"] # like: find_lex Px, Iy, Sz > set P3, P20[0;0] # like: find_lex Px, Iy, Iz > set P4, P20["foo"] # like: find_lex Px, Sy > set P4, P20[0] # like: find_lex Px, Iy > > - not based on PerlHash [...] > Comments?
Ok, I tested the patch (I tried to use this scratchpads for the scheme compiler) One thing I missed (or at least didn't find): How can I generate a new scope? new_pad generates a new one one the pad stack with a size which is actually smaller than the current one. Apart from that: Nice patch. bye b. -- Juergen Boemmels [EMAIL PROTECTED] Fachbereich Physik Tel: ++49-(0)631-205-2817 Universitaet Kaiserslautern Fax: ++49-(0)631-205-3906 PGP Key fingerprint = 9F 56 54 3D 45 C1 32 6F 23 F6 C7 2F 85 93 DD 47