Fix FOR EACH loops translation.

[GB.JIT]
* BUG: Panic if the stack is not void once a function has been translated.
* BUG: Fix FOR EACH loops translation.
This commit is contained in:
gambas 2018-06-13 16:59:10 +02:00
parent b8198005db
commit 08c772a290

View File

@ -107,10 +107,7 @@ static bool end(FUNCTION *func, int index)
GB.FreeArray((void **)&_ctrl_type);
if (_stack_current)
{
fprintf(stderr, "gb.jit: warning: stack mismatch! (%d)\n", _stack_current);
_stack_current = 0;
}
JIT_panic("Stack mismatch: stack is not void");
return FALSE;
}
@ -140,7 +137,7 @@ static void free_stack(int n)
static void check_stack(int n)
{
if (_stack_current < n)
JIT_panic("Stack mismatch");
JIT_panic("Stack mismatch: stack is void");
}
@ -2341,6 +2338,7 @@ _ENUM_NEXT:
if ((code & 1) == 0)
push(T_UNKNOWN, "POP_u()");
p++;
goto _MAIN;
_PUSH_CONST: