Use 0/1 macro for Lua 5.2 compatibility.
This commit is contained in:
@@ -793,7 +793,7 @@ static void build_subroutines(BuildCtx *ctx)
|
||||
| bl extern lj_meta_len // (lua_State *L, TValue *o)
|
||||
| // Returns NULL (retry) or TValue * (metamethod base).
|
||||
| .IOS ldr BASE, L->base
|
||||
#ifdef LUAJIT_ENABLE_LUA52COMPAT
|
||||
#if LJ_52
|
||||
| cmp CRET1, #0
|
||||
| bne ->vmeta_binop // Binop call for compatibility.
|
||||
| ldr TAB:CARG1, [BASE, RC]
|
||||
@@ -1085,12 +1085,12 @@ static void build_subroutines(BuildCtx *ctx)
|
||||
|
|
||||
|.ffunc_1 pairs
|
||||
| checktab CARG2, ->fff_fallback
|
||||
#ifdef LUAJIT_ENABLE_LUA52COMPAT
|
||||
#if LJ_52
|
||||
| ldr TAB:RB, TAB:CARG1->metatable
|
||||
#endif
|
||||
| ldrd CFUNC:CARG34, CFUNC:CARG3->upvalue[0]
|
||||
| ldr PC, [BASE, FRAME_PC]
|
||||
#ifdef LUAJIT_ENABLE_LUA52COMPAT
|
||||
#if LJ_52
|
||||
| cmp TAB:RB, #0
|
||||
| bne ->fff_fallback
|
||||
#endif
|
||||
@@ -1135,12 +1135,12 @@ static void build_subroutines(BuildCtx *ctx)
|
||||
|
|
||||
|.ffunc_1 ipairs
|
||||
| checktab CARG2, ->fff_fallback
|
||||
#ifdef LUAJIT_ENABLE_LUA52COMPAT
|
||||
#if LJ_52
|
||||
| ldr TAB:RB, TAB:CARG1->metatable
|
||||
#endif
|
||||
| ldrd CFUNC:CARG34, CFUNC:CARG3->upvalue[0]
|
||||
| ldr PC, [BASE, FRAME_PC]
|
||||
#ifdef LUAJIT_ENABLE_LUA52COMPAT
|
||||
#if LJ_52
|
||||
| cmp TAB:RB, #0
|
||||
| bne ->fff_fallback
|
||||
#endif
|
||||
@@ -2906,7 +2906,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
|
||||
| ins_next3
|
||||
|2:
|
||||
| checktab CARG2, ->vmeta_len
|
||||
#ifdef LUAJIT_ENABLE_LUA52COMPAT
|
||||
#if LJ_52
|
||||
| ldr TAB:CARG3, TAB:CARG1->metatable
|
||||
| cmp TAB:CARG3, #0
|
||||
| bne >9
|
||||
@@ -2918,7 +2918,7 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
|
||||
| // Returns uint32_t (but less than 2^31).
|
||||
| .IOS mov BASE, RC
|
||||
| b <1
|
||||
#ifdef LUAJIT_ENABLE_LUA52COMPAT
|
||||
#if LJ_52
|
||||
|9:
|
||||
| ldrb CARG4, TAB:CARG3->nomm
|
||||
| tst CARG4, #1<<MM_len
|
||||
|
||||
Reference in New Issue
Block a user