News for hackers. Stuff that matters.
Re:Exploring GNU extensions in the Linux kernel by AstroJetson on Wednesday May 15, 2024 @12:36PM (#40369168)
I've done a few bytecode interpreters but have mostly used the case of Operator type of driving loop. I was impressed by this

static void tbl[] = {&&do_ret, &&do_inc, &&do_dec};

#define NEXT goto tbl[*pc++]

NEXT;

for(;;) {

do_ret: return val;

do_inc: val++; NEXT;

do_dec: val--; NEXT;

}

There are no comments on this comment yet.