context_unify3 branch is almost ready to merge back into trunk. Two
major changes in branch:
* Merging CallSignature and Context into single CallContext PMC.
* Refactor whole VTABLE_invoke/invokecc/invoke_from_sigobject
interaction to push new CallContext on caller side, not callee side.
There is 1 (one) failing test at the moment which fails on my box
("standard" Debian Linux/i386). I will be very appreciated to have more
comprehensive testing on other platforms.
Last, but not least, thanks to chromatic++ and whiteknight++ for fixing
outstanding issues with branch.
--
Bacek.
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev
I wanted to test that branch with rakudo, but it failed to build:
make[1]: Entering directory `/home/moritz/tmp/context_unify3/compilers/nqp'
../../parrot
/home/moritz/tmp/context_unify3/runtime/parrot/library/PGE/Perl6Grammar.pir
\
--output=src/Grammar_gen.pir src/Grammar.pg
src/gc/api.c:260: failed assertion 'PObj_is_PMC_TEST(obj)'
Backtrace - Obtained 32 stack frames (max trace depth is 32).
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709ba73f3]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0(Parrot_confess+0x87)
[0x2af709ba7527]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0(Parrot_gc_mark_PMC_alive_fun+0x7f)
[0x2af709bb6c5f]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709d5ddcd]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0(Parrot_gc_mark_PMC_alive_fun+0x12e)
[0x2af709bb6d0e]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709d5e044]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0(Parrot_gc_mark_PMC_alive_fun+0x12e)
[0x2af709bb6d0e]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709bbafff]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709bb92a2]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709bb9550]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709bb69dd]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709bb9153]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709bb8fab]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709bb6a48]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709bb73d4]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0(Parrot_str_new_COW+0x85)
[0x2af709b05175]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709bcfe31]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709d0c56c]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709bbeba4]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709d52f72]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709d64c5c]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709d90386]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709b1e538]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709c21319]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709c1f7ac]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709bcbed4]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0(Parrot_pcc_invoke_from_sig_object+0x14c)
[0x2af709bc19ac]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0(Parrot_pcc_invoke_sub_from_c_args+0x182)
[0x2af709bc1b42]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0(Parrot_runcode+0x146)
[0x2af709ba4316]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0 [0x2af709dce421]
/home/moritz/tmp/context_unify3/blib/lib/libparrot.so.1.8.0(imcc_run+0x381)
[0x2af709dcf091]
../../parrot [0x400bb4]
make[1]: *** [nqp.pbc] Aborted
make[1]: Leaving directory `/home/moritz/tmp/context_unify3/compilers/nqp'
make: *** [compilers.dummy] Error 2
Cheers,
Moritz
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev
pmichaud@orange:~/parrot/context_unify3$ cat x
say('hello');
pmichaud@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
$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
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev
It doesn't. But I can add it now for "transition period" to support both
forms.
--
Bacek
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev
Here is a paste which will point you to the errors.
I took care of the trailing_space error. I think we should try to get
'make fulltest' passing before the merge; otherwise we will have
headaches going into the 2.0 release next month.
Thank you very much.
kid51
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev
ok, benchmark_tests fixed in r43155. streams and libraries is same
failure. I'm trying to fix it.
(Just in case if someone will able to hack on this branch for next ~12
hours.)
To simplify life of HLL developers I'm going to do next things:
1. Implement new function Parrot_pcc_(get|set)_next_call_context (or
similar with better name) which will be accessor to
"interp->current_sig". It will be used in "build_sigobject",
"invoke_from_sigobject" and various "op invoke".
2. Switch Parrot_pcc_get_signature to return current context.
Main reason is - HLL devs depends on getting current "CallSignature"
from CURRENT_CONTEXT using Parrot_pcc_get_signature. PCC depends on
building CallContext on same functions. But PCC builds signature for
future use, HLL - for current use. So, it's better to use different
accessors.
--
Bacek,
falling asleep at face of future.
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev