I tracked this problem down. NQP-RX uses these lines in the offending function:

$P0 = context['current_sub']
context = context['caller_ctx']

With the new CallContext PMC, string keys are used to lookup named
arguments, not look up attributes. To get attributes, we need the
getattribute opcode:

$P0 = getattribute context, 'current_sub'
context = getattribute context, 'caller_ctx'

I don't know if the getattribute syntax will work in current trunk.

Technically the Context PMC wasn't introduced in Parrot until the 1.6
release, so it hasn't appeared in a supported release and is
experimental. We should make sure we coordinate a fix with pmichaud,
so that when the branch does land there won't be any issues in our
HLLs.

--Andrew Whitworth



On Fri, Dec 18, 2009 at 11:09 AM, Patrick R. Michaud <[email protected]> wrote:
> I'm able to get context_unify3 to build and install, but "parrot-nqp" fails:
>
>  pmich...@orange:~/parrot/context_unify3$ cat x
>  say('hello');
>  pmich...@orange:~/parrot/context_unify3$ ./parrot-nqp x
>  Null PMC access in get_string()
>  current instr.: 'parrot;Regex;Cursor;!PREFIX__!subrule' pc 2410 
> (src/stage0/Regex-s0.pir:1321)
>  called from Sub 'parrot;NQP;Grammar;!PREFIX__term:sym<colonpair>' pc 17734 
> (src/stage0/NQP-s0.pir:4747)
>  called from Sub 'parrot;Regex;Cursor;!protoregex_tokrx' pc 1971 
> (src/stage0/Regex-s0.pir:1077)
>  called from Sub 'parrot;Regex;Cursor;!protoregex' pc 1752 
> (src/stage0/Regex-s0.pir:971)
>  ...
>
> Since parrot-nqp fails, I can't build the rakudo-ng branch at all.
> Also cannot build nqp-rx for similar reasons.
>
> Attempting to build Rakudo 'master' branch gives me:
>
>    cc -c -o perl6_group.o -Isrc/pmc 
> -I/home/pmichaud/parrot/context_unify3/install/include/1.8.0-devel 
> -I/home/pmichaud/parrot/context_unify3/install/include/1.8.0-devel/pmc 
> -D_REENTRANT -D_GNU_SOURCE -DDEBIAN  -pipe -I/usr/local/include 
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHASATTRIBUTE_CONST  
> -DHASATTRIBUTE_DEPRECATED  -DHASATTRIBUTE_MALLOC  -DHASATTRIBUTE_NONNULL  
> -DHASATTRIBUTE_NORETURN  -DHASATTRIBUTE_PURE  -DHASATTRIBUTE_UNUSED  
> -DHASATTRIBUTE_WARN_UNUSED_RESULT  -falign-functions=16 -fvisibility=hidden 
> -funit-at-a-time -maccumulate-outgoing-args -W -Wall -Waggregate-return 
> -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wdisabled-optimization 
> -Wendif-labels -Wextra -Wformat -Wformat-extra-args -Wformat-nonliteral 
> -Wformat-security -Wformat-y2k -Wimplicit -Wimport -Winit-self -Winline 
> -Winvalid-pch -Wlogical-op -Wmissing-braces -Wmissing-field-initializers 
> -Wno-missing-format-attribute -Wmissing-include-dirs -Wpacked -Wparentheses 
> -Wpointer-arith -Wreturn-
>  type -Wsequence-point -Wno-shadow -Wsign-compare -Wstrict-aliasing 
> -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs -Wundef 
> -Wunknown-pragmas -Wno-unused -Wvariadic-macros -Wwrite-strings 
> -Wbad-function-cast -Wc++-compat -Wdeclaration-after-statement 
> -Werror=declaration-after-statement -Wimplicit-function-declaration 
> -Wimplicit-int -Wmain -Wmissing-declarations -Wmissing-prototypes 
> -Wnested-externs -Wnonnull -DDISABLE_GC_DEBUG=1 -DNDEBUG -O2 -g -DHAS_GETTEXT 
> -fPIC    -DHAVE_COMPUTED_GOTO  perl6_group.c
>  In file included from 
> /home/pmichaud/parrot/context_unify3/install/include/1.8.0-devel/parrot/interpreter.h:132,
>                 from 
> /home/pmichaud/parrot/context_unify3/install/include/1.8.0-devel/parrot/platform_interface.h:12,
>                 from 
> /home/pmichaud/parrot/context_unify3/install/include/1.8.0-devel/parrot/parrot.h:257,
>                 from perl6_group.c:17:
>    
> /home/pmichaud/parrot/context_unify3/install/include/1.8.0-devel/parrot/context.h:27:33:
>  error: pmc/pmc_callcontext.h: No such file or directory
> make: *** [src/pmc/perl6_group.so] Error 1
>
> Pm
> _______________________________________________
> http://lists.parrot.org/mailman/listinfo/parrot-dev
>
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to