diff --git a/sourcepawn/jit/debug-trace.cpp b/sourcepawn/jit/debug-trace.cpp index df857d8f..32e3fc81 100644 --- a/sourcepawn/jit/debug-trace.cpp +++ b/sourcepawn/jit/debug-trace.cpp @@ -26,7 +26,6 @@ CContextTrace::CContextTrace(PluginRuntime *pRuntime, int err, const char *errst m_StartRp(start_rp), m_Level(0) { - m_ctx = pRuntime->m_pCtx->GetCtx(); m_pDebug = m_pRuntime->GetDebugInfo(); } diff --git a/sourcepawn/jit/debug-trace.h b/sourcepawn/jit/debug-trace.h index acecae2c..a59fa11e 100644 --- a/sourcepawn/jit/debug-trace.h +++ b/sourcepawn/jit/debug-trace.h @@ -39,7 +39,6 @@ class CContextTrace : public IContextTrace private: PluginRuntime *m_pRuntime; PluginContext *context_; - sp_context_t *m_ctx; int m_Error; const char *m_pMsg; cell_t m_StartRp; diff --git a/sourcepawn/jit/interpreter.cpp b/sourcepawn/jit/interpreter.cpp index 096049c6..90404866 100644 --- a/sourcepawn/jit/interpreter.cpp +++ b/sourcepawn/jit/interpreter.cpp @@ -45,7 +45,7 @@ Write(const sp_plugin_t *plugin, cell_t offset, cell_t value) } static inline cell_t * -Jump(const sp_plugin_t *plugin, sp_context_t *ctx, cell_t target) +Jump(const sp_plugin_t *plugin, cell_t target) { if (!IsValidOffset(target) || uint32_t(target) >= plugin->pcode_size) return NULL; @@ -53,7 +53,7 @@ Jump(const sp_plugin_t *plugin, sp_context_t *ctx, cell_t target) } static inline cell_t * -JumpTarget(const sp_plugin_t *plugin, sp_context_t *ctx, cell_t *cip, bool cond, int *errp) +JumpTarget(const sp_plugin_t *plugin, cell_t *cip, bool cond, int *errp) { if (!cond) return cip + 1; @@ -84,7 +84,6 @@ Interpret(PluginRuntime *rt, uint32_t aCodeStart, cell_t *rval) return SP_ERROR_INVALID_INSTRUCTION; PluginContext *cx = rt->GetBaseContext(); - sp_context_t *ctx = cx->GetCtx(); int err = SP_ERROR_NONE; @@ -675,41 +674,41 @@ Interpret(PluginRuntime *rt, uint32_t aCodeStart, cell_t *rval) } case OP_JUMP: - if ((cip = JumpTarget(plugin, ctx, cip, true, &err)) == NULL) + if ((cip = JumpTarget(plugin, cip, true, &err)) == NULL) goto error; break; case OP_JZER: - if ((cip = JumpTarget(plugin, ctx, cip, pri == 0, &err)) == NULL) + if ((cip = JumpTarget(plugin, cip, pri == 0, &err)) == NULL) goto error; break; case OP_JNZ: - if ((cip = JumpTarget(plugin, ctx, cip, pri != 0, &err)) == NULL) + if ((cip = JumpTarget(plugin, cip, pri != 0, &err)) == NULL) goto error; break; case OP_JEQ: - if ((cip = JumpTarget(plugin, ctx, cip, pri == alt, &err)) == NULL) + if ((cip = JumpTarget(plugin, cip, pri == alt, &err)) == NULL) goto error; break; case OP_JNEQ: - if ((cip = JumpTarget(plugin, ctx, cip, pri != alt, &err)) == NULL) + if ((cip = JumpTarget(plugin, cip, pri != alt, &err)) == NULL) goto error; break; case OP_JSLESS: - if ((cip = JumpTarget(plugin, ctx, cip, pri < alt, &err)) == NULL) + if ((cip = JumpTarget(plugin, cip, pri < alt, &err)) == NULL) goto error; break; case OP_JSLEQ: - if ((cip = JumpTarget(plugin, ctx, cip, pri <= alt, &err)) == NULL) + if ((cip = JumpTarget(plugin, cip, pri <= alt, &err)) == NULL) goto error; break; case OP_JSGRTR: - if ((cip = JumpTarget(plugin, ctx, cip, pri > alt, &err)) == NULL) + if ((cip = JumpTarget(plugin, cip, pri > alt, &err)) == NULL) goto error; break; case OP_JSGEQ: - if ((cip = JumpTarget(plugin, ctx, cip, pri >= alt, &err)) == NULL) + if ((cip = JumpTarget(plugin, cip, pri >= alt, &err)) == NULL) goto error; break; @@ -831,7 +830,7 @@ Interpret(PluginRuntime *rt, uint32_t aCodeStart, cell_t *rval) } } - if ((cip = Jump(plugin, ctx, target)) == NULL) { + if ((cip = Jump(plugin, target)) == NULL) { err = SP_ERROR_INVALID_INSTRUCTION; goto error; } diff --git a/sourcepawn/jit/jit_shared.h b/sourcepawn/jit/jit_shared.h index 6e918f39..ef1c7ec1 100644 --- a/sourcepawn/jit/jit_shared.h +++ b/sourcepawn/jit/jit_shared.h @@ -70,10 +70,6 @@ namespace SourcePawn class PluginContext; -typedef struct sp_context_s -{ -} sp_context_t; - //#define SPFLAG_PLUGIN_DEBUG (1<<0) #define SPFLAG_PLUGIN_PAUSED (1<<1) diff --git a/sourcepawn/jit/plugin-context.cpp b/sourcepawn/jit/plugin-context.cpp index 0754f40c..22dd7ef1 100644 --- a/sourcepawn/jit/plugin-context.cpp +++ b/sourcepawn/jit/plugin-context.cpp @@ -80,12 +80,6 @@ PluginContext::GetContext() return reinterpret_cast((IPluginContext * )this); } -sp_context_t * -PluginContext::GetCtx() -{ - return &m_ctx; -} - bool PluginContext::IsDebugging() { diff --git a/sourcepawn/jit/plugin-context.h b/sourcepawn/jit/plugin-context.h index 65a0a243..278a776a 100644 --- a/sourcepawn/jit/plugin-context.h +++ b/sourcepawn/jit/plugin-context.h @@ -39,7 +39,6 @@ class PluginContext : public IPluginContext public: //IPluginContext IVirtualMachine *GetVirtualMachine(); sp_context_t *GetContext(); - sp_context_t *GetCtx(); bool IsDebugging(); int SetDebugBreak(void *newpfn, void *oldpfn); IPluginDebugInfo *GetDebugInfo(); @@ -187,7 +186,6 @@ class PluginContext : public IPluginContext bool m_CustomMsg; bool m_InExec; PluginRuntime *m_pRuntime; - sp_context_t m_ctx; void *m_keys[4]; bool m_keys_set[4];