diff --git a/main/lib/jit/gb.jit/jit.h b/main/lib/jit/gb.jit/jit.h index a127a0633..56c48feb2 100644 --- a/main/lib/jit/gb.jit/jit.h +++ b/main/lib/jit/gb.jit/jit.h @@ -529,7 +529,7 @@ enum #define CALL_UNKNOWN(_pc) ({ JIT.call_unknown(&pc[_pc], &sp); }) -#define ENUM_FIRST(_code, _plocal, _penum) ({ GB.Unref(&(_penum).value); (_penum).type = 0; JIT.enum_first(_code, (GB_VALUE *)&_plocal, (GB_VALUE*)&_penum); }) +#define ENUM_FIRST(_code, _plocal, _penum) ({ GB.Unref(&(_penum).value); (_penum).type = 0; JIT.enum_first(_code, (GB_VALUE *)&_plocal, (GB_VALUE *)&_penum); }) #define ENUM_NEXT(_code, _plocal, _penum, _label) ({ \ SP = sp; \ diff --git a/main/lib/jit/jit_body.c b/main/lib/jit/jit_body.c index 35cc41986..97bd040b6 100644 --- a/main/lib/jit/jit_body.c +++ b/main/lib/jit/jit_body.c @@ -3078,7 +3078,7 @@ _ENUM_FIRST: index = GET_XX() - func->n_local; type = get_type(-1); - if (!TYPE_is_object(type)) + if (!TYPE_is_object(type) && type != T_UNKNOWN) { JIT_print(" THROW(E_NOBJECT);\n"); pop_stack(1);