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:
12
src/lj_def.h
12
src/lj_def.h
@@ -193,18 +193,14 @@ static LJ_AINLINE uint32_t lj_fls(uint32_t x)
|
||||
#endif
|
||||
|
||||
/* Attributes for internal functions. */
|
||||
#if defined(ljamalg_c)
|
||||
#define LJ_DATA static
|
||||
#define LJ_DATADEF static
|
||||
#define LJ_FUNC static
|
||||
#define LJ_ASMF LJ_NOAPI
|
||||
#define LJ_FUNCA LJ_NOAPI
|
||||
#else
|
||||
#define LJ_DATA LJ_NOAPI
|
||||
#define LJ_DATADEF
|
||||
#define LJ_FUNC LJ_NOAPI
|
||||
#define LJ_ASMF LJ_NOAPI
|
||||
#define LJ_FUNCA LJ_NOAPI
|
||||
#if defined(ljamalg_c)
|
||||
#define LJ_FUNC static
|
||||
#else
|
||||
#define LJ_FUNC LJ_NOAPI
|
||||
#endif
|
||||
#define LJ_FUNC_NORET LJ_FUNC LJ_NORET
|
||||
#define LJ_FUNCA_NORET LJ_FUNCA LJ_NORET
|
||||
|
||||
Reference in New Issue
Block a user