On Fri, Oct 31, 2008 at 3:18 PM, via RT Will Coleda <[EMAIL PROTECTED]> wrote: > # New Ticket Created by Will Coleda > # Please include the string: [perl #60268] > # in the subject line of all future correspondence about this issue. > # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60268 > > > > When running parrot with -t4, this impacts the running bytecode. > > This isn't obvious with a small program; however, you can see this > issue in partcl at least > (http://code.google.com/p/partcl/wiki/PartclSource) > > then, in tcl, > > ../../parrot tcl.pbc -e 'puts {hello world}' > > prints "hello world\n" > > ../../parrot -t4 tcl.pbc -e 'puts {hello world}' > > Among all the debug output, this instead dies with > > # Calling sub 'parrot;PGE;Match;new' > # current instr.: 'parrot;PGE;Perl6Regex;parse_term_backslash' pc 7472 > (compilers/pge/PGE/Perl6Regex.pir:367) > No such attribute '$.target' > > -t4 sets the flag PARROT_TRACE_SUB_CALL_FLAG, which has 4 relevant tests: > > src/packfile.c > 2714: if (really && Interp_trace_TEST(interp, PARROT_TRACE_SUB_CALL_FLAG)) > { > > src/pmc/coroutine.pmc > 129: if (Interp_trace_TEST(INTERP, PARROT_TRACE_SUB_CALL_FLAG)) > > src/pmc/sub.pmc > 208: if (Interp_trace_TEST(INTERP, PARROT_TRACE_SUB_CALL_FLAG)) > > src/sub.c > 599: if (Interp_trace_TEST(interp, PARROT_TRACE_SUB_CALL_FLAG)) { > > commenting out the bits in coroutine & sub PMCs allow the code to run as > normal. > > -- > Will "Coke" Coleda >
Turns out this was because at some point during -t4, we invoke Parrot_full_sub_name, which calls Parrot_ns_get_name, which uses PCC_INVOKE, which stomps some settings in the current interpreter. jonathan++ pointed out that he worked around similar issues for the perl6multisub, so I added in the same guards used in invoke in Parrot_full_sub_name; the -t4 case works with this patch, and 'make test' works too. If I don't hear any objection, I'll apply this in the next day or so. -- Will "Coke" Coleda
t4.diff
Description: Binary data