Move sp from sp_context_t to PluginContext.

This commit is contained in:
David Anderson
2015-02-24 21:54:30 -08:00
parent 4c9321f02a
commit b2c61a341a
9 changed files with 60 additions and 41 deletions
+1 -3
View File
@@ -239,7 +239,6 @@ int
Environment::Invoke(PluginRuntime *runtime, CompiledFunction *fn, cell_t *result)
{
PluginContext *cx = runtime->GetBaseContext();
sp_context_t *ctx = cx->GetCtx();
// Note that cip, hp, sp are saved and restored by Execute2().
*cx->addressOfCip() = fn->GetCodeOffset();
@@ -247,9 +246,8 @@ Environment::Invoke(PluginRuntime *runtime, CompiledFunction *fn, cell_t *result
InvokeStubFn invoke = code_stubs_->InvokeStub();
EnterInvoke();
int err = invoke(ctx, runtime->plugin()->memory, fn->GetEntryAddress());
int err = invoke(cx, fn->GetEntryAddress(), result);
LeaveInvoke();
*result = ctx->rval;
return err;
}