diff options
author | Mike Pall <mike> | 2010-02-13 04:51:56 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-02-13 04:51:56 +0100 |
commit | c93138b59e8f28b3d412cd7ec0c6631fd27e3e1b (patch) | |
tree | 8c0ffe2086ab0b032ed8e9f92ae6fb9d4d040d66 /src/lj_record.c | |
parent | 4f8d7be8ea8a103f4d9046188d6005740b74f3d4 (diff) | |
download | luajit-c93138b59e8f28b3d412cd7ec0c6631fd27e3e1b.tar.gz luajit-c93138b59e8f28b3d412cd7ec0c6631fd27e3e1b.tar.bz2 luajit-c93138b59e8f28b3d412cd7ec0c6631fd27e3e1b.zip |
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.
Diffstat (limited to 'src/lj_record.c')
-rw-r--r-- | src/lj_record.c | 8 |
1 files changed, 1 insertions, 7 deletions
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) | |||
1671 | GCproto *pt = funcproto(rd.fn); | 1671 | GCproto *pt = funcproto(rd.fn); |
1672 | if ((pt->flags & PROTO_NO_JIT)) | 1672 | if ((pt->flags & PROTO_NO_JIT)) |
1673 | lj_trace_err(J, LJ_TRERR_CJITOFF); | 1673 | lj_trace_err(J, LJ_TRERR_CJITOFF); |
1674 | if ((pt->flags & PROTO_IS_VARARG)) { | 1674 | if ((pt->flags & PROTO_IS_VARARG)) |
1675 | if (rd.fn->l.gate != lj_gate_lv) | ||
1676 | lj_trace_err(J, LJ_TRERR_NYILNKF); | ||
1677 | lj_trace_err(J, LJ_TRERR_NYIVF); | 1675 | lj_trace_err(J, LJ_TRERR_NYIVF); |
1678 | } else { | ||
1679 | if (rd.fn->l.gate != lj_gate_lf) | ||
1680 | lj_trace_err(J, LJ_TRERR_NYILNKF); | ||
1681 | } | ||
1682 | if (cres == CALLRES_TAILCALL) { | 1676 | if (cres == CALLRES_TAILCALL) { |
1683 | ptrdiff_t i; | 1677 | ptrdiff_t i; |
1684 | /* Tailcalls can form a loop, so count towards the loop unroll limit. */ | 1678 | /* Tailcalls can form a loop, so count towards the loop unroll limit. */ |