Yes, that's what the patch already does, see:

opcode_t *
cg_core(opcode_t *cur_opcode, struct Parrot_Interp *interpreter)
{
    static void *ops_addr[] = {
        &&PC_0,
        &&PC_1,
        &&PC_2,
        &&PC_3,
        &&PC_4,
....

PC_3: /* Parrot_close_ic */
{
  close(cur_opcode[1]);
  goto *ops_addr[*(cur_opcode += 2)];
}

PC_4: /* Parrot_err_i */
{
  interpreter->int_reg->registers[cur_opcode[1]] = errno;
  goto *ops_addr[*(cur_opcode += 2)];
}

....

}

Thanks,
Daniel Grunblatt.


On Thu, 15 Nov 2001, Simon Cozens wrote:

> I haven't forgotten about this patch, but I've had other things going
> on. I'd like to see the computed goto done as a complete state machine,
> with
>
>     goto *pc_l[(int)dest];
>
> after *every single op definition* so it just jumps between labels, without
> any looping at all. (Apologies if that's what your patch already does, I
> still haven't had time to get a very good look at it.)
>
> --
> "MSDOS didn't get as bad as it is overnight -- it took over ten years
> of careful development."
> (By [EMAIL PROTECTED])
>

Reply via email to