From 9ed02bcb27ce190ec042b35b6508e46795a79eea Mon Sep 17 00:00:00 2001 From: Laurence Tratt Date: Tue, 22 Sep 2026 17:22:02 +0100 Subject: [PATCH] Don't bypass `load_inst` at conditional jumps. --- src/lvm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lvm.c b/src/lvm.c index ed5ea39..d0f8057 100644 --- a/src/lvm.c +++ b/src/lvm.c @@ -1211,7 +1211,14 @@ GCObject *load_gcobj(const TValue *o) { /* for test instructions, execute the jump instruction that follows it */ +#ifdef USE_YK +#define donextjump(ci) { \ + Instruction ni = yk_is_interpreting() ? *pc : load_inst(cl_proto_version, pc); \ + dojump(ci, ni, 1); \ +} +#else #define donextjump(ci) { Instruction ni = *pc; dojump(ci, ni, 1); } +#endif /* ** do a conditional jump: skip next instruction if 'cond' is not what