On Mon, Mar 17, 2008 at 10:21 AM, Will Coleda via RT
<[EMAIL PROTECTED]> wrote:
> On Mon Mar 17 09:34:24 2008, cognominal wrote:
> > $?SUB is not reset between two evals so the outer to an undefined
> > block. I am not sure this is
> > the best place to reset $?SUB.
> > At least if seems to fix the bug.
> >
> >
> > Index: /Users/stef/svn/parrot/compilers/pct/src/PAST/Compiler.pir
> > =========================================================
> > ==========
> > --- /Users/stef/svn/parrot/compilers/pct/src/PAST/Compiler.pir
> > (revision 26447)
> > +++ /Users/stef/svn/parrot/compilers/pct/src/PAST/Compiler.pir
> > (working copy)
> > @@ -71,7 +71,9 @@
> > unless null blockpast goto have_blockpast
> > blockpast = new 'ResizablePMCArray'
> > set_global '@?BLOCK', blockpast
> > - have_blockpast:
> > +have_blockpast:
> > + null $P0
> > + set_global '$?SUB', $P0
> > .return self.'as_post'(past, 'rtype'=>'v')
> > .end
>
> This avoids the segfault, so +1.
>
> This does make me notice, though, that PAST::Compiler is using several
> perl6 variables, which confuses me.
>
PAST::Compiler uses the Perl 6 naming convention for variables because
it's *waaaaay* better than hungarian notation, however it does assume
HLL writers know some Perl 6. i don't think this is too much of a
stretch, since parsers and action grammars are written in subsets of
Perl 6 already if using PCT and NQP.
~jerry