Move cip from sp_context_t to PluginContext.

This commit is contained in:
David Anderson
2015-02-24 20:53:44 -08:00
parent 8817de8a55
commit d2005bd42a
8 changed files with 22 additions and 11 deletions
+3 -2
View File
@@ -238,10 +238,11 @@ Environment::UnpatchAllJumpsFromTimeout()
int
Environment::Invoke(PluginRuntime *runtime, CompiledFunction *fn, cell_t *result)
{
sp_context_t *ctx = runtime->GetBaseContext()->GetCtx();
PluginContext *cx = runtime->GetBaseContext();
sp_context_t *ctx = cx->GetCtx();
// Note that cip, hp, sp are saved and restored by Execute2().
ctx->cip = fn->GetCodeOffset();
*cx->addressOfCip() = fn->GetCodeOffset();
InvokeStubFn invoke = code_stubs_->InvokeStub();