Fix panic message displayed when a JIT method is not found.
[INTERPRETER] * BUG: Fix panic message displayed when a JIT method is not found.
This commit is contained in:
parent
4471fb350a
commit
7ad56a4adb
1 changed files with 9 additions and 11 deletions
|
@ -52,17 +52,21 @@ static JIT_FUNCTION *_jit_func = NULL;
|
|||
|
||||
static bool _debug = FALSE;
|
||||
|
||||
static void find_method(GB_FUNCTION *func, const char *method, const char *sign, const char *type)
|
||||
{
|
||||
if (GB_GetFunction(func, CLASS_find_global("Jit"), method, sign, type))
|
||||
ERROR_panic("Unable to find JIT.&1() method", method);
|
||||
}
|
||||
|
||||
void JIT_abort(void)
|
||||
{
|
||||
static GB_FUNCTION _func;
|
||||
GB_FUNCTION func;
|
||||
|
||||
if (!_component_loaded || JIT_disabled)
|
||||
return;
|
||||
|
||||
if (GB_GetFunction(&_func, CLASS_find_global("Jit"), "_Abort", NULL, NULL))
|
||||
ERROR_panic("Unable to find JIT._Abort() method");
|
||||
|
||||
GB_Call(&_func, 0, FALSE);
|
||||
find_method(&func, "_Abort", NULL, NULL);
|
||||
GB_Call(&func, 0, FALSE);
|
||||
GB_Wait(0);
|
||||
}
|
||||
|
||||
|
@ -81,12 +85,6 @@ bool JIT_can_compile(ARCHIVE *arch)
|
|||
return get_state(arch) == JIT_NOT_COMPILED;
|
||||
}
|
||||
|
||||
static void find_method(GB_FUNCTION *func, const char *method, const char *sign, const char *type)
|
||||
{
|
||||
if (GB_GetFunction(func, CLASS_find_global("Jit"), method, sign, type))
|
||||
ERROR_panic("Cannot found method 'Jit.&1' in 'gb.jit' component");
|
||||
}
|
||||
|
||||
void JIT_compile(ARCHIVE *arch)
|
||||
{
|
||||
COMPONENT *current;
|
||||
|
|
Loading…
Reference in a new issue