Re: [perl #15800] [PATCH] lexical scope ops, test and example

2002-07-30 Thread Dan Sugalski
At 11:01 AM -0600 7/30/02, Jonathan Sillito wrote: >Thanks for the correction. May I ask about the find_lex op? In my >implementation it looks back through the stack of pads for the given >lexical: One thing we need to add is a constant type to initialize pads. It's perfectly acceptable, and in

Re: [perl #15800] [PATCH] lexical scope ops, test and example

2002-07-30 Thread Dan Sugalski
At 10:16 AM -0600 7/30/02, Jonathan Sillito wrote: >Hey, thanks for reading this over. It is not a typo, but it may be >incorrect. My code does overwrite previous lexicals in enclosing scopes >(i.e. lexicals in pads lower on the stack), but maybe I have the >semantics of the store_lex op wrong? Y

Re: [perl #15800] [PATCH] lexical scope ops, test and example

2002-07-30 Thread Jonathan Sillito
Thanks for the correction. May I ask about the find_lex op? In my implementation it looks back through the stack of pads for the given lexical: new P0, .PerlInt new P1, .PerlInt set P0, 10 open_lex store_lex P0, "a" # nested lexical scope open_lex find_lex P1, "a" print P

Re: [perl #15800] [PATCH] lexical scope ops, test and example

2002-07-30 Thread Melvin Smith
See my 2 comments: > new P0, .PerlInt > new P1, .PerlInt > new P2, .PerlInt > new P3, .PerlInt > set P0, 10 > set P1, 11 > set P2, 12 > > # outer most lexical scope > open_lex New pad > store_lex P0, "a" > find_lex P3, "a" > print P3 # prints 10 > print "\n" > ># nest

Re: [perl #15800] [PATCH] lexical scope ops, test and example

2002-07-30 Thread Jonathan Sillito
On Mon, 2002-07-29 at 17:12, Simon Glover wrote: > I think you forgot to attach the patch... oops, now the files are attached ... - patch: lex.patch - test file: lexicals.t - example file: lexicals.pasm On Tue, 2002-07-30 at 02:14, Stephen Rawls wrote: > --- Jonathan Sillito > > close_l

Re: [perl #15800] [PATCH] lexical scope ops, test and example

2002-07-30 Thread Stephen Rawls
--- Jonathan Sillito > close_lex # end of nested lexical scope > > find_lex P3, "a" > print P3 # prints 12 > print "\n" > end > That's a typo, right? It should print the first value of "a" (10). Just making sure I'm not crazy ... Stephen Rawls _

Re: [perl #15800] [PATCH] lexical scope ops, test and example

2002-07-29 Thread Simon Glover
I think you forgot to attach the patch... Simon

[perl #15800] [PATCH] lexical scope ops, test and example

2002-07-29 Thread via RT
# New Ticket Created by Jonathan Sillito # Please include the string: [perl #15800] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt2/Ticket/Display.html?id=15800 > The attached patch implements a set of lexical ops. Lexical pads are implemented as