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
+1
View File
@@ -303,6 +303,7 @@ CompileFromThunk(PluginRuntime *runtime, cell_t pcode_offs, void **addrp, char *
Compiler::Compiler(PluginRuntime *rt, cell_t pcode_offs)
: env_(Environment::get()),
rt_(rt),
context_(rt->GetBaseContext()),
plugin_(rt->plugin()),
error_(SP_ERROR_NONE),
pcode_start_(pcode_offs),
+2 -2
View File
@@ -91,8 +91,7 @@ class Compiler
void emitFloatCmp(ConditionCode cc);
ExternalAddress cipAddr() {
sp_context_t *ctx = rt_->GetBaseContext()->GetCtx();
return ExternalAddress(&ctx->cip);
return ExternalAddress(context_->addressOfCip());
}
ExternalAddress hpAddr() {
sp_context_t *ctx = rt_->GetBaseContext()->GetCtx();
@@ -107,6 +106,7 @@ class Compiler
AssemblerX86 masm;
sp::Environment *env_;
PluginRuntime *rt_;
PluginContext *context_;
const sp_plugin_t *plugin_;
int error_;
uint32_t pcode_start_;