develooper Front page | perl.perl6.internals | Postings from February 2006

Re: Allowing push/pop across sub calls

Thread Previous | Thread Next
From:
Patrick R. Michaud
Date:
February 22, 2006 19:08
Subject:
Re: Allowing push/pop across sub calls
Message ID:
20060223030752.GB17378@host.pmichaud.com
On Wed, Feb 22, 2006 at 09:52:34PM -0500, Bob Rogers wrote:
Content-Description: message body text
>    The good news is that the attached patch makes this work.  The bad
> news is that it also breaks PGE, albeit in a small way.  Six of the
> "<after>" tests (mostly, but not exclusively, involving "<!after>") in
> t/compilers/pge/p6rules/builtins.t seem to go into an infinite loop.  I
> have been unable to figure this out, so I'm hoping it will be easy for
> someone who understands PGE.  (Maybe there's something in PGE that
> assumes that returning from a sub restores the state of the user stack?)

Surprisingly, the following rule infinite loops when applied to
a target string of "cb":

    <!after c>b

Perhaps equally surprisingly, neither the code generated for the
above rule nor the <after> subrule itself make use of either the 
"push" or "pop" opcodes.  

Still looking...

Pm

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About