Remove ICompilationData.

This commit is contained in:
David Anderson
2015-02-24 02:03:57 -08:00
parent 8cf3e227ea
commit 21f5400d9c
7 changed files with 15 additions and 130 deletions
-51
View File
@@ -1876,21 +1876,6 @@ GenerateEntry(void **retp, void **timeoutp)
return code;
}
ICompilation *JITX86::ApplyOptions(ICompilation *_IN, ICompilation *_OUT)
{
if (_IN == NULL)
return _OUT;
CompData *_in = (CompData * )_IN;
CompData *_out = (CompData * )_OUT;
_in->inline_level = _out->inline_level;
_in->profile = _out->profile;
_out->Abort();
return _in;
}
JITX86::JITX86()
{
m_pJitEntry = NULL;
@@ -1967,42 +1952,6 @@ JITX86::DestroyFakeNative(SPVM_NATIVE_FUNC func)
Environment::get()->FreeCode((void *)func);
}
ICompilation *
JITX86::StartCompilation()
{
return new CompData;
}
ICompilation *
JITX86::StartCompilation(PluginRuntime *runtime)
{
return new CompData;
}
void
CompData::Abort()
{
delete this;
}
bool
CompData::SetOption(const char *key, const char *val)
{
if (strcmp(key, SP_JITCONF_DEBUG) == 0)
return true;
if (strcmp(key, SP_JITCONF_PROFILE) == 0) {
profile = atoi(val);
/** Callbacks must be profiled to profile functions! */
if ((profile & SP_PROF_FUNCTIONS) == SP_PROF_FUNCTIONS)
profile |= SP_PROF_CALLBACKS;
return true;
}
return false;
}
int
JITX86::InvokeFunction(PluginRuntime *runtime, CompiledFunction *fn, cell_t *result)
{
-22
View File
@@ -61,25 +61,6 @@ struct CallThunk
}
};
class CompData : public ICompilation
{
public:
CompData()
: profile(0),
inline_level(0)
{
};
bool SetOption(const char *key, const char *val);
void Abort();
public:
cell_t cur_func; /* current func pcode offset */
/* Options */
int profile; /* profiling flags */
int inline_level; /* inline optimization level */
/* Per-compilation properties */
unsigned int func_idx; /* current function index */
};
class Compiler
{
public:
@@ -152,12 +133,9 @@ class JITX86
public:
bool InitializeJIT();
void ShutdownJIT();
ICompilation *StartCompilation(PluginRuntime *runtime);
ICompilation *StartCompilation();
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);
ICompilation *ApplyOptions(ICompilation *_IN, ICompilation *_OUT);
int InvokeFunction(PluginRuntime *runtime, CompiledFunction *fn, cell_t *result);
void *TimeoutStub() const {