aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/interp/resume.c2
-rw-r--r--src/interp/routines/execute.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/interp/resume.c b/src/interp/resume.c
index cf9ece2..2494928 100644
--- a/src/interp/resume.c
+++ b/src/interp/resume.c
@@ -13,6 +13,8 @@
void nwp_interp_resume(struct nw_interp *const i)
{
+ i->fr.prev_op = i->fr.op;
+
if (i->set)
nwp_interp_limited(i);
else
diff --git a/src/interp/routines/execute.c b/src/interp/routines/execute.c
index 49711ae..fe1e8d7 100644
--- a/src/interp/routines/execute.c
+++ b/src/interp/routines/execute.c
@@ -17,12 +17,13 @@
static enum nw_state execute(struct nw_interp *const i)
{
struct nw_i_sm_b *const b = &i->sm.bytecode;
+ const unsigned char op = b->op;
#ifdef NW_LOG
- nwp_log("opcode: %s, pc=%#lx\n", nwp_op_tostr(b->op), b->pc);
+ nwp_log("opcode: %s, pc=%#lx\n", nwp_op_tostr(op), b->pc);
#endif
+ i->fr.op = op;
b->f(i);
- i->fr.prev_op = b->op;
return NW_AGAIN;
}