On Sun, Oct 5, 2008 at 12:29 PM, Will Coleda <[EMAIL PROTECTED]> 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
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to