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.
This commit is contained in:
@@ -44,12 +44,6 @@ LJ_ASMF void lj_vm_exp2(void);
|
||||
LJ_ASMF void lj_vm_pow_sse(void);
|
||||
LJ_ASMF void lj_vm_powi_sse(void);
|
||||
|
||||
/* Call gates for functions. */
|
||||
LJ_ASMF void lj_gate_lf(void);
|
||||
LJ_ASMF void lj_gate_lv(void);
|
||||
LJ_ASMF void lj_gate_c(void);
|
||||
LJ_ASMF void lj_gate_cwrap(void);
|
||||
|
||||
/* Continuations for metamethods. */
|
||||
LJ_ASMF void lj_cont_cat(void); /* Continue with concatenation. */
|
||||
LJ_ASMF void lj_cont_ra(void); /* Store result in RA from instruction. */
|
||||
|
||||
Reference in New Issue
Block a user