Hi again,

<offtopic>
(small note for little jens: first read _everything_, then write an answer, 
then read it and send it afterwards...)
</offtopic>
> On Monday 08 March 2004 13:33, Ilya Martynov wrote:
> > # New Ticket Created by  Ilya Martynov
> > # Please include the string:  [perl #27504]
> > # in the subject line of all future correspondence about this issue.
> > # <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=27504 >
> >
> >
> >
> > 1. find_method crashes parrot when used with dynclasses
> >
> > For example if I build Foo.pmc from "dynclasses" directory following
> > code crashes parrot:
> >
> > .sub main
> >         loadlib $P1, "foo"
> >         $P0 = new Foo
>
> This is wrong. Use $P0 = new "Foo" instead.
> "new Foo" evaules to "new -1" due to a bug (?) in IMCC.
s/evaules/evaluates/

> >         find_method $P1, $P0, 'find_method'
> >         .pcc_begin_return
> >         .pcc_end_return
> > .end
> >
> > Stacktrace:
> >
> > (gdb) bt
> > #0  0x081861d9 in Parrot_default_find_method (interpreter=0x820fa90,
> >     pmc=0x403057c0, method_name=0x40208200) at default.c:314
> > #1  0x080e9a1d in Parrot_find_method_p_p_sc (cur_opcode=0x82352f8,
> >     interpreter=0x820fa90) at ops/pmc.ops:196
> > #2  0x08085241 in runops_slow_core (interpreter=0x820fa90, pc=0x82352f8)
> >     at src/runops_cores.c:144
> > #3  0x0807aed0 in runops_int (interpreter=0x820fa90, offset=0)
> >     at src/interpreter.c:833
> > #4  0x0807af6d in runops_ex (interpreter=0x820fa90, offset=0)
> >     at src/interpreter.c:863
> > #5  0x0807b141 in runops (interpreter=0x820fa90, offset=0)
> >     at src/interpreter.c:921
> > #6  0x080c0fdf in Parrot_runcode (interpreter=0x820fa90, argc=1,
> >     argv=0xbffff9d8) at src/embed.c:692
> > #7  0x08079f62 in main (argc=1, argv=0xbffff9d8) at imcc/main.c:557
> >
> > 2. Why following code emits "Method 'find_method' not found"?
> >    Shouldn't find_method be defined in vtable of Boolean PMC?
> >
> > .sub main
> >         $P0 = new Boolean
> >         find_method $P1, $P0, 'find_method'
> >         .pcc_begin_return
> >         .pcc_end_return
> > .end
This is because find_method is an opcode and not a method.

jens

Reply via email to