Skip to content

Commit

Permalink
Merge pull request #94 from ltratt/promote_i
Browse files Browse the repository at this point in the history
Promote instructions.
  • Loading branch information
vext01 authored Oct 30, 2024
2 parents fc1df20 + bc8d54d commit deab5b5
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/lvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1168,13 +1168,23 @@ void luaV_finishOp (lua_State *L) {


/* fetch an instruction and prepare its execution */
#define vmfetch() { \
#ifdef USE_YK
# define vmfetch() { \
if (l_unlikely(trap)) { /* stack reallocation or hooks? */ \
trap = luaG_traceexec(L, pc); /* handle hooks */ \
updatebase(ci); /* correct stack */ \
} \
i = (Instruction) yk_promote(*(pc++)); \
}
#else
# define vmfetch() { \
if (l_unlikely(trap)) { /* stack reallocation or hooks? */ \
trap = luaG_traceexec(L, pc); /* handle hooks */ \
updatebase(ci); /* correct stack */ \
} \
i = *(pc++); \
i = (Instruction) *(pc++); \
}
#endif

#define vmdispatch(o) switch(o)
#define vmcase(l) case l:
Expand Down

0 comments on commit deab5b5

Please sign in to comment.