From c93138b59e8f28b3d412cd7ec0c6631fd27e3e1b Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sat, 13 Feb 2010 04:51:56 +0100 Subject: Major redesign of function call handling. Drop call gates. Use function headers, dispatched like bytecodes. Emit BC_FUNCF/BC_FUNCV bytecode at PC 0 for all Lua functions. C functions and ASM fast functions get extra bytecodes. Modify internal calling convention: new base in BASE (formerly in RA). Can now use better C function wrapper semantics (dynamic on/off). Prerequisite for call hooks with zero-overhead if disabled. Prerequisite for compiling recursive calls. Prerequisite for efficient 32/64 bit prototype guards. --- src/lj_record.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/lj_record.c') diff --git a/src/lj_record.c b/src/lj_record.c index 49e3d3b5..2709ea01 100644 --- a/src/lj_record.c +++ b/src/lj_record.c @@ -1671,14 +1671,8 @@ static int rec_call(jit_State *J, BCReg func, ptrdiff_t cres, ptrdiff_t nargs) GCproto *pt = funcproto(rd.fn); if ((pt->flags & PROTO_NO_JIT)) lj_trace_err(J, LJ_TRERR_CJITOFF); - if ((pt->flags & PROTO_IS_VARARG)) { - if (rd.fn->l.gate != lj_gate_lv) - lj_trace_err(J, LJ_TRERR_NYILNKF); + if ((pt->flags & PROTO_IS_VARARG)) lj_trace_err(J, LJ_TRERR_NYIVF); - } else { - if (rd.fn->l.gate != lj_gate_lf) - lj_trace_err(J, LJ_TRERR_NYILNKF); - } if (cres == CALLRES_TAILCALL) { ptrdiff_t i; /* Tailcalls can form a loop, so count towards the loop unroll limit. */ -- cgit v1.2.3-55-g6feb