Add a '-j' option to the interpreter that disable the JIT compiler.
[INTERPRETER] * NEW: Add a '-j' option to the interpreter that disable the JIT compiler.
This commit is contained in:
parent
28b52f2de0
commit
aa33e0ddad
3 changed files with 13 additions and 3 deletions
|
@ -243,6 +243,7 @@ int main(int argc, char *argv[])
|
|||
" -p <path> activate profiling and debugging mode\n"
|
||||
" -k do not unload shared libraries\n"
|
||||
" -H --httpd run through an embedded http server\n"
|
||||
" -j disable just-in-time compiler\n"
|
||||
);
|
||||
|
||||
if (!EXEC_arch)
|
||||
|
@ -343,6 +344,10 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
PROJECT_run_httpd = TRUE;
|
||||
}
|
||||
else if (is_option(argv[i], 'j'))
|
||||
{
|
||||
JIT_disabled = TRUE;
|
||||
}
|
||||
else if (is_option(argv[i], '-'))
|
||||
{
|
||||
i++;
|
||||
|
|
|
@ -39,10 +39,11 @@ typedef
|
|||
}
|
||||
JIT_FUNCTION;
|
||||
|
||||
bool JIT_disabled = FALSE;
|
||||
|
||||
static bool _component_loaded = FALSE;
|
||||
static GB_FUNCTION _jit_compile_func;
|
||||
|
||||
static bool _no_jit = FALSE;
|
||||
static bool _jit_compiling = FALSE;
|
||||
static void *_jit_library = NULL;
|
||||
|
||||
|
@ -68,7 +69,7 @@ bool JIT_compile(ARCHIVE *arch)
|
|||
void **iface;
|
||||
COMPONENT *current;
|
||||
|
||||
if (_no_jit)
|
||||
if (JIT_disabled)
|
||||
return TRUE;
|
||||
|
||||
if (arch)
|
||||
|
@ -91,7 +92,7 @@ bool JIT_compile(ARCHIVE *arch)
|
|||
var = getenv("GB_NO_JIT");
|
||||
if (var && var[0] && !(var[0] == '0' && var[1] == 0))
|
||||
{
|
||||
_no_jit = TRUE;
|
||||
JIT_disabled = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,10 @@
|
|||
typedef
|
||||
void (*JIT_FUNC)(uchar nparam);
|
||||
|
||||
#ifndef __GBX_JIT_C
|
||||
extern bool JIT_disabled;
|
||||
#endif
|
||||
|
||||
bool JIT_compile(ARCHIVE *arch);
|
||||
void JIT_debug(const char *fmt, ...);
|
||||
void JIT_exec(bool ret_on_stack);
|
||||
|
|
Loading…
Reference in a new issue