Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MMD problem with mmd_dispatch_v_pnp

4 views
Skip to first unread message

Jens Rieks

unread,
Dec 14, 2004, 8:49:21 AM12/14/04
to l...@toetsch.at, perl6-i...@perl.org
Hi!

I have found a problem with with mmd_dispatch_v_pnp.
The function calls (for an Integer-PMC) Parrot_Integer_multiply_int, which
expects an INTVAL, but a FLOATVAL is passed to it.

jens

-------

Breakpoint 1, mmd_dispatch_v_pnp (interpreter=0x8245048, left=0x8401328,
right=1, dest=0x8401328, function=7) <-- right=1 is a FLOATVAL
at mmd.c:265

...

274 (*real_function)(interpreter, left, right, dest); <-- correct
(gdb) print left
$25 = (PMC *) 0x8401328
(gdb) print right
$26 = 1
(gdb) print dest
$27 = (PMC *) 0x8401328
(gdb) s
Parrot_Integer_multiply_int (interpreter=0x8245048, pmc=0x8401328, b=0,
dest=0x3ff00000) at integer.c:511 <-- wrong signature!
511 INTVAL a = PMC_int_val(pmc);
(gdb) print pmc->vtable->base_type
$29 = 31 [[class "Integer"]]
(gdb)

Leopold Toetsch

unread,
Dec 14, 2004, 9:15:49 AM12/14/04
to Jens Rieks, perl6-i...@perl.org
Jens Rieks <par...@jensbeimsurfen.de> wrote:
> Hi!

> I have found a problem with with mmd_dispatch_v_pnp.
> The function calls (for an Integer-PMC) Parrot_Integer_multiply_int, which
> expects an INTVAL, but a FLOATVAL is passed to it.

I can't reproduce that.

new P1, .Integer
set P1, 2
new P2, .Undef
mul P2, P1, 5.0
print P2
end

This calls the inherited C<Parrot_scalar_multiply_float()> function and
works.

> jens

leo

0 new messages