Multiple dispatch branch merged

Will Coleda will at coleda.com
Mon Oct 6 13:51:24 UTC 2008


On Sun, Oct 5, 2008 at 11:56 PM, Will Coleda <will at coleda.com> wrote:
> On Sun, Oct 5, 2008 at 12:29 PM, Will Coleda <will at coleda.com> wrote:
>> A quick 'make test' in tcl hangs, on this code in t/cmd_break.t
>>
>>  for {set a 0} {$a < 20} {incr a} {
>>   if {$a > 10} { break }
>>  }
>>  set a
>>
>> which should result in '11', but instead loops infinitely. (apparently
>> the conditonal is never satisfied)
>>
>> Haven't found the culprit yet, assuming it's related to the MMD merge.
>
> In Parrot_integer_multi_cmp_DEFAULT, invoked with two TclInts, the
> original code:
>
> const INTVAL selfint = SELF.get_integer();
>
> seems to always set selfint to be 0, so the cmp is always -1, so islt
> is always true. Changing that line to:
>
> const INTVAL selfint = VTABLE_get_integer(INTERP, SELF);
>
> to mirror the following valueint line causes the problem to go away,
> and tcl's test suite continues past this test with no problem.
>
> While the updated version is passed through to the .c with no changes,
> the original version is converted to:
>
> pmc->real_self->vtable->get_integer(interp, pmc->real_self);
>
> This change has no impact on t/pmc/integer.t, though I didn't run the
> full test suite against it.
>
> Thoughts?
> --
> Will "Coke" Coleda
>

Even once this issue is papered over, there appear to be more SELF
related issues; [expr 2**3] fails, for example, apparently as a result
of the call to SELF.pow() in integer.pmc

-- 
Will "Coke" Coleda


More information about the parrot-dev mailing list