Re: weird perl6/plumhead problem
On Tue, 29 Apr 2008, Patrick R. Michaud wrote: On Tue, Apr 29, 2008 at 12:34:47PM -0400, Jeff Horwitz wrote: mod_parrot can load multiple HLL compilers in the same interpreter, and on my server i'm using both perl6 and plumhead. this works fine if i load perl6 before plumhead. however, if i load perl6 *after* plumhead, i get a nasty error: push_pmc() not implemented in class 'Sub' ... My complete off-the-wall guess is that perl6.pbc has a :multi sub that happens to have the same name as a non-multi sub in plumhead. Or something like that. So, when perl6 is loaded first, the :multi sub in perl6 gets replaced by the non-multi sub in plumhead. When plumhead is loaded first, Parrot tries to push the :multi sub in perl6 onto the (non-:multi) sub in plumhead and throws the exception. i think you're right -- i dove into the backtrace and found that the sub in question was 'infix:+&', which is multi in perl6 and non-multi in plumhead. assuming this is the problem, it seems to me that the .HLL sandbox that coke mentioned would solve this. correct? -jeff
Re: weird perl6/plumhead problem
On Tue, Apr 29, 2008 at 1:54 PM, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > On Tue, Apr 29, 2008 at 01:48:52PM -0400, Jeff Horwitz wrote: > > On Tue, 29 Apr 2008, Patrick R. Michaud wrote: > > > > >On Tue, Apr 29, 2008 at 12:34:47PM -0400, Jeff Horwitz wrote: > > >>mod_parrot can load multiple HLL compilers in the same interpreter, and > on > > >>my server i'm using both perl6 and plumhead. this works fine if i load > > >>perl6 before plumhead. however, if i load perl6 *after* plumhead, i get > a > > >>nasty error: > > >> > > >> push_pmc() not implemented in class 'Sub' > > ... > > My complete off-the-wall guess is that perl6.pbc has a :multi sub > that happens to have the same name as a non-multi sub in plumhead. > Or something like that. > > So, when perl6 is loaded first, the :multi sub in perl6 gets > replaced by the non-multi sub in plumhead. When plumhead is > loaded first, Parrot tries to push the :multi sub in perl6 onto > the (non-:multi) sub in plumhead and throws the exception. > > Again, it's just a guess based on only a cursory reading of the > backtraces, so don't put too much stock into it. > > Pm More guessing: this will go away once the PCT provides each language an .HLL sandbox in which to play. -- Will "Coke" Coleda
Re: weird perl6/plumhead problem
On Tue, 29 Apr 2008, Patrick R. Michaud wrote: On Tue, Apr 29, 2008 at 12:34:47PM -0400, Jeff Horwitz wrote: mod_parrot can load multiple HLL compilers in the same interpreter, and on my server i'm using both perl6 and plumhead. this works fine if i load perl6 before plumhead. however, if i load perl6 *after* plumhead, i get a nasty error: push_pmc() not implemented in class 'Sub' i get the same error with this plain PIR: .sub main :main print "loading plumhead\n" load_bytecode "languages/plumhead/plumhead.pbc" print "loading perl6\n" load_bytecode "languages/perl6/perl6.pbc" print "done\n" .end [EMAIL PROTECTED]:~/build/parrot$ ./parrot foo.pir loading plumhead loading perl6 push_pmc() not implemented in class 'Sub' current instr.: 'main' pc 6 (foo.pir:5) any ideas? backtrace is below. How about with a -t 1 ? duh, should've given you that in the first place. the trace is HUGE, so here's the last 50 lines. you should be able to reproduce the error using the code above if you need more detail. 21 load_bytecode "compilers/tge/TGE/Tr" 0 newclass P0, "TGE::Tree" P0=PMCNULL 3 addattribute P0, "cell" P0=Class=PMC(0x845f814) 6 addattribute P0, "visit" P0=Class=PMC(0x845f814) 9 addattribute P0, "data" P0=Class=PMC(0x845f814) 12 addattribute P0, "grammar" P0=Class=PMC(0x845f814) 15 addattribute P0, "agid" P0=Class=PMC(0x845f814) 18 set_returns PC7 20 returncc 23 load_bytecode "compilers/tge/TGE/Pa" 0 push_eh 7 2 subclass P0, "PGE::Grammar", "TGE::Parser" P0=PMCNULL 6 pop_eh 7 set_returns PC3 9 returncc 25 load_bytecode "compilers/tge/TGE/Gr" 0 newclass P0, "TGE::Grammar" P0=PMCNULL 3 addattribute P0, "rules" P0=Class=PMC(0x8516ce4) 6 addattribute P0, "symbols" P0=Class=PMC(0x8516ce4) 9 set_returns PC5 11 returncc 27 load_bytecode "compilers/tge/TGE/Co" 0 load_bytecode "TGE.pbc" 2 get_class P0, "TGE::Grammar" P0=PMCNULL 5 subclass P1, P0, "TGE::Compiler" P1=PMCNULL P0=Class=PMC(0x8516ce4) 9 set_returns PC5 11 returncc 29 get_class P0, PC22 P0=Integer=PMC(0x846304c: 1) PC22=Key=PMC(0x820f890) 32 get_hll_global P1, PC24, "die" P1=PMCNULL PC24=Key=PMC(0x820f874) 36 set_args PC2 (3), P0, "die", P1 PC2=FixedIntegerArray=PMC(0x8463394) P0=Class=PMC(0x8518d28) P1=Sub=PMC(0x846836c pc:7) 41 get_results PC19 43 callmethodcc P0, "add_method"P0=Class=PMC(0x8518d28) 46 get_hll_global P1, PC24, "line_number" P1=Sub=PMC(0x846836c pc:7) PC24=Key=PMC(0x820f874) 50 set_args PC2 (3), P0, "line_number", P1 PC2=FixedIntegerArray=PMC(0x8463394) P0=Class=PMC(0x8518d28) P1=Sub=PMC(0x8467e80 pc:229) 55 get_results PC19 57 callmethodcc P0, "add_method"P0=Class=PMC(0x8518d28) 60 set_returns PC19 62 returncc 32824 push_eh 7 32826 subclass P0, "TGE::Grammar", "Plumhead::PAST::Gram" P0=PMCNULL 32830 pop_eh 32831 set_returns PC22 32833 returncc loading perl6 4 print "loading perl6\n" 6 load_bytecode "languages/perl6/perl" push_pmc() not implemented in class 'Sub' current instr.: 'main' pc 6 (foo.pir:5) ParrotIO objects (like stdout and stderr)are about to be closed, so clearing trace flags.
Re: weird perl6/plumhead problem
On Tue, Apr 29, 2008 at 12:34:47PM -0400, Jeff Horwitz wrote: > mod_parrot can load multiple HLL compilers in the same interpreter, and on > my server i'm using both perl6 and plumhead. this works fine if i load > perl6 before plumhead. however, if i load perl6 *after* plumhead, i get a > nasty error: > > push_pmc() not implemented in class 'Sub' > > i get the same error with this plain PIR: > > .sub main :main > print "loading plumhead\n" > load_bytecode "languages/plumhead/plumhead.pbc" > print "loading perl6\n" > load_bytecode "languages/perl6/perl6.pbc" > print "done\n" > .end > > [EMAIL PROTECTED]:~/build/parrot$ ./parrot foo.pir > loading plumhead > loading perl6 > push_pmc() not implemented in class 'Sub' > current instr.: 'main' pc 6 (foo.pir:5) > > any ideas? backtrace is below. How about with a -t 1 ? Pm
Re: weird perl6/plumhead problem
On Tue, Apr 29, 2008 at 01:48:52PM -0400, Jeff Horwitz wrote: > On Tue, 29 Apr 2008, Patrick R. Michaud wrote: > > >On Tue, Apr 29, 2008 at 12:34:47PM -0400, Jeff Horwitz wrote: > >>mod_parrot can load multiple HLL compilers in the same interpreter, and on > >>my server i'm using both perl6 and plumhead. this works fine if i load > >>perl6 before plumhead. however, if i load perl6 *after* plumhead, i get a > >>nasty error: > >> > >> push_pmc() not implemented in class 'Sub' > ... My complete off-the-wall guess is that perl6.pbc has a :multi sub that happens to have the same name as a non-multi sub in plumhead. Or something like that. So, when perl6 is loaded first, the :multi sub in perl6 gets replaced by the non-multi sub in plumhead. When plumhead is loaded first, Parrot tries to push the :multi sub in perl6 onto the (non-:multi) sub in plumhead and throws the exception. Again, it's just a guess based on only a cursory reading of the backtraces, so don't put too much stock into it. Pm
weird perl6/plumhead problem
mod_parrot can load multiple HLL compilers in the same interpreter, and on my server i'm using both perl6 and plumhead. this works fine if i load perl6 before plumhead. however, if i load perl6 *after* plumhead, i get a nasty error: push_pmc() not implemented in class 'Sub' i get the same error with this plain PIR: .sub main :main print "loading plumhead\n" load_bytecode "languages/plumhead/plumhead.pbc" print "loading perl6\n" load_bytecode "languages/perl6/perl6.pbc" print "done\n" .end [EMAIL PROTECTED]:~/build/parrot$ ./parrot foo.pir loading plumhead loading perl6 push_pmc() not implemented in class 'Sub' current instr.: 'main' pc 6 (foo.pir:5) any ideas? backtrace is below. Breakpoint 2, cant_do_method (interp=0x804f048, pmc=0x829d204, methname=0x403cda8d "push_pmc") at default.pmc:63 63 real_exception(interp, NULL, ILL_INHERIT, (gdb) bt #0 cant_do_method (interp=0x804f048, pmc=0x829d204, methname=0x403cda8d "push_pmc") at default.pmc:63 #1 0x402a732e in Parrot_default_push_pmc (interp=0x804f048, pmc=0x829d204, value=0x82fcbac) at default.c:1632 #2 0x4016130a in store_sub_in_multi (interp=0x804f048, sub=0x82fcbac, ns=0x8092ec4) at src/global.c:739 #3 0x40161410 in Parrot_store_sub_in_namespace (interp=0x804f048, sub=0x82fcbac) at src/global.c:777 #4 0x401934de in PackFile_Constant_unpack_pmc (interp=0x804f048, constt=0x83271d0, self=0x81167e0, cursor=0x40aa94f4) at src/packfile.c:3584 #5 0x401933d8 in PackFile_Constant_unpack (interp=0x804f048, constt=0x83271d0, self=0x81167e0, cursor=0x40aa9428) at src/packfile.c:3526 #6 0x401930dc in PackFile_ConstTable_unpack (interp=0x804f048, seg=0x83271d0, cursor=0x40aa9424) at src/packfile.c:3322 #7 0x401907ea in PackFile_Segment_unpack (interp=0x804f048, self=0x83271d0, cursor=0x40a9ff50) at src/packfile.c:1601 #8 0x40190cfd in directory_unpack (interp=0x804f048, segp=0x8327028, cursor=0x40a9ff40) at src/packfile.c:1795 #9 0x401907ea in PackFile_Segment_unpack (interp=0x804f048, self=0x8327028, cursor=0x40a24040) at src/packfile.c:1601 #10 0x4018f8b1 in PackFile_unpack (interp=0x804f048, self=0x8327028, packed=0x40a24000, packed_size=1254976) at src/packfile.c:867 #11 0x40153b10 in Parrot_readbc (interp=0x804f048, fullname=0x8326fb8 "/home/jeff/build/parrot/./languages/perl6/perl6.pbc") at src/embed.c:503 #12 0x401937d4 in PackFile_append_pbc (interp=0x804f048, filename=0x8326fb8 "/home/jeff/build/parrot/./languages/perl6/perl6.pbc") at src/packfile.c:3701 #13 0x401939b2 in Parrot_load_bytecode (interp=0x804f048, file_str=0x81fba50) at src/packfile.c:3758 #14 0x400f5c4c in Parrot_load_bytecode_sc (cur_opcode=0x8248918, interp=0x804f048) at core.ops:151 #15 0x40199984 in runops_slow_core (interp=0x804f048, pc=0x8248918) at src/runops_cores.c:219 #16 0x4016ac26 in runops_int (interp=0x804f048, offset=0) at src/interpreter.c:916 #17 0x4016b525 in runops (interp=0x804f048, offs=0) at src/inter_run.c:104 #18 0x4016b7aa in runops_args (interp=0x804f048, sub=0x822ac6c, obj=0x8096098, meth_unused=0x0, sig=0x403c3727 "vP", ap=0xbbbc "P\"\b\220") at src/inter_run.c:230 #19 0x4016b8ec in Parrot_runops_fromc_args (interp=0x804f048, sub=0x822ac6c, sig=0x403c3727 "vP") at src/inter_run.c:299 #20 0x401545a7 in Parrot_runcode (interp=0x804f048, argc=1, argv=0xbd18) at src/embed.c:941 #21 0x4039f044 in imcc_run_pbc (interp=0x804f048, obj_file=0, output_file=0x0, argc=1, argv=0xbd18) at compilers/imcc/main.c:781 #22 0x4039faf2 in imcc_run (interp=0x804f048, sourcefile=0xbe33 "foo.pir", argc=1, argv=0xbd18) at compilers/imcc/main.c:1069 #23 0x080488d8 in main (argc=1, argv=0xbd18) at src/main.c:61