Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created March 1, 2014 12:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnthn/9289075 to your computer and use it in GitHub Desktop.
Save jnthn/9289075 to your computer and use it in GitHub Desktop.
diff --git a/src/core/interp.c b/src/core/interp.c
index a1bc5cf..a6216eb 100644
--- a/src/core/interp.c
+++ b/src/core/interp.c
@@ -50,6 +50,8 @@ void MVM_interp_run(MVMThreadContext *tc, void (*initial_invoke)(MVMThreadContex
/* The current call site we're constructing. */
MVMCallsite *cur_callsite = NULL;
+ MVMuint16 op, last_op;
+
/* Stash addresses of current op, register base and SC deref base
* in the TC; this will be used by anything that needs to switch
* the current place we're interpreting. */
@@ -69,7 +71,7 @@ void MVM_interp_run(MVMThreadContext *tc, void (*initial_invoke)(MVMThreadContex
/* Enter runloop. */
runloop: {
- MVMuint16 op;
+ last_op = op;
#if MVM_TRACING
if (tracing_enabled) {
@@ -3962,7 +3964,7 @@ void MVM_interp_run(MVMThreadContext *tc, void (*initial_invoke)(MVMThreadContex
goto NEXT;
}
- MVM_panic(MVM_exitcode_invalidopcode, "Invalid opcode executed (corrupt bytecode stream?) opcode %u", op);
+ MVM_panic(MVM_exitcode_invalidopcode, "Invalid opcode executed (corrupt bytecode stream?) opcode %u, prev %u", op, last_op);
}
#endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment