On Sun, Sep 16, 2001 at 01:03:17PM -0500, Brian Wheeler wrote:
> Its not going to work, if I understand it correctly.  I tried doing it
> (even set up the symbol '*' to mean the current PC) and do it, but it
> seems the ops take a relative offset.  Take jump_i, for example:
> 
> /* JUMP Ix */
> MANUAL_OP jump_i {
>   RETURN(INT_REG(P1));
> }

> IV *jump_i(IV cur_opcode[], struct Parrot_Interp *interpreter) {
>   IV return_offset = 1;
>   return cur_opcode + INT_REG(cur_opcode[1]);
>   return cur_opcode + return_offset;
> }

I'm pretty sure that's a bug. jump should
    return INT_REG(cur_opcode[1]);

That's to say, it should be an absolute address. (If I'm reading
the documentation correctly.) 

Which is really going to screw up backpatching. :(

-- 
<fimmtiu> Sucks really Forth. Ugh.

Reply via email to