On Tue, Sep 18, 2007 at 6:59 PM, via RT Nuno Carvalho
<[EMAIL PROTECTED]> wrote:

>   While running 'make fulltest', for today's release, we noticed there
>  is a test failling for 't/op/string.t' when using jit runcore. This
>  test is currently being skipped.
>
>   The test that's failling is test number #91 "if_s_ic", the last part 'ok 
> 10':
>
>         clears
>         if      S1, BAD10
>         branch  OK10
>
>  the if op for S1, which is null, is giving an assertion error. I tried
>  to poke around the jit core source code for a bit, but wasn't able to
>  fix it. My parrot's jit knowledge is not that good, I admit. Can
>  anyone more confortable on this area shed some light on the subject.

The problem is that the opcode checks for nullness before calling string_bool:

op if (invar STR, labelconst INT) {
    if ($1 && string_bool(interp, $1))
        goto OFFSET($2);
}

And the jitted code apparently calls string_bool unconditionally.

The easier solution is to redefine string_bool to allow a NULL
argument and return false in that case. Many places in the code does
that check before the call, so this change will simplify it.

I expect to hear some comments before preparing a patch, given that
this will change the signature of a widely used function.

-- 
Salu2

Reply via email to