302636d5e0
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%4073
41 lines
712 B
C++
41 lines
712 B
C++
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include "jit_x86.h"
|
|
|
|
const char *JITX86::GetVMName()
|
|
{
|
|
return "JIT (x86)";
|
|
}
|
|
|
|
ICompilation *JITX86::StartCompilation(sp_plugin_t *plugin)
|
|
{
|
|
CompData *data = new CompData;
|
|
|
|
data->plugin = plugin;
|
|
|
|
return data;
|
|
}
|
|
|
|
void JITX86::AbortCompilation(ICompilation *co)
|
|
{
|
|
delete (CompData *)co;
|
|
}
|
|
|
|
bool JITX86::SetCompilationOption(ICompilation *co, const char *key, const char *val)
|
|
{
|
|
CompData *data = (CompData *)co;
|
|
|
|
if (strcmp(key, "debug") == 0)
|
|
{
|
|
data->debug = (atoi(val) == 1);
|
|
if (data->debug && !(data->plugin->flags & SP_FLAG_DEBUG))
|
|
{
|
|
data->debug = false;
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|