Move context var initialization into BaseContext.
This commit is contained in:
@@ -1934,17 +1934,6 @@ JITX86::CompileFunction(PluginRuntime *prt, cell_t pcode_offs, int *err)
|
||||
return fun;
|
||||
}
|
||||
|
||||
void
|
||||
JITX86::SetupContextVars(PluginRuntime *runtime, BaseContext *pCtx, sp_context_t *ctx)
|
||||
{
|
||||
ctx->tracker = new tracker_t;
|
||||
ctx->tracker->pBase = (ucell_t *)malloc(1024);
|
||||
ctx->tracker->pCur = ctx->tracker->pBase;
|
||||
ctx->tracker->size = 1024 / sizeof(cell_t);
|
||||
ctx->basecx = pCtx;
|
||||
ctx->plugin = const_cast<sp_plugin_t *>(runtime->plugin());
|
||||
}
|
||||
|
||||
SPVM_NATIVE_FUNC
|
||||
JITX86::CreateFakeNative(SPVM_FAKENATIVE_FUNC callback, void *pData)
|
||||
{
|
||||
@@ -1996,13 +1985,6 @@ CompData::Abort()
|
||||
delete this;
|
||||
}
|
||||
|
||||
void
|
||||
JITX86::FreeContextVars(sp_context_t *ctx)
|
||||
{
|
||||
free(ctx->tracker->pBase);
|
||||
delete ctx->tracker;
|
||||
}
|
||||
|
||||
bool
|
||||
CompData::SetOption(const char *key, const char *val)
|
||||
{
|
||||
|
||||
@@ -154,8 +154,6 @@ class JITX86
|
||||
void ShutdownJIT();
|
||||
ICompilation *StartCompilation(PluginRuntime *runtime);
|
||||
ICompilation *StartCompilation();
|
||||
void SetupContextVars(PluginRuntime *runtime, BaseContext *pCtx, sp_context_t *ctx);
|
||||
void FreeContextVars(sp_context_t *ctx);
|
||||
SPVM_NATIVE_FUNC CreateFakeNative(SPVM_FAKENATIVE_FUNC callback, void *pData);
|
||||
void DestroyFakeNative(SPVM_NATIVE_FUNC func);
|
||||
CompiledFunction *CompileFunction(PluginRuntime *runtime, cell_t pcode_offs, int *err);
|
||||
|
||||
Reference in New Issue
Block a user