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_def.h | |
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_def.h')
-rw-r--r-- | src/lj_def.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/lj_def.h b/src/lj_def.h index 64b08f7b..83b1935c 100644 --- a/src/lj_def.h +++ b/src/lj_def.h | |||
@@ -193,18 +193,14 @@ static LJ_AINLINE uint32_t lj_fls(uint32_t x) | |||
193 | #endif | 193 | #endif |
194 | 194 | ||
195 | /* Attributes for internal functions. */ | 195 | /* Attributes for internal functions. */ |
196 | #if defined(ljamalg_c) | ||
197 | #define LJ_DATA static | ||
198 | #define LJ_DATADEF static | ||
199 | #define LJ_FUNC static | ||
200 | #define LJ_ASMF LJ_NOAPI | ||
201 | #define LJ_FUNCA LJ_NOAPI | ||
202 | #else | ||
203 | #define LJ_DATA LJ_NOAPI | 196 | #define LJ_DATA LJ_NOAPI |
204 | #define LJ_DATADEF | 197 | #define LJ_DATADEF |
205 | #define LJ_FUNC LJ_NOAPI | ||
206 | #define LJ_ASMF LJ_NOAPI | 198 | #define LJ_ASMF LJ_NOAPI |
207 | #define LJ_FUNCA LJ_NOAPI | 199 | #define LJ_FUNCA LJ_NOAPI |
200 | #if defined(ljamalg_c) | ||
201 | #define LJ_FUNC static | ||
202 | #else | ||
203 | #define LJ_FUNC LJ_NOAPI | ||
208 | #endif | 204 | #endif |
209 | #define LJ_FUNC_NORET LJ_FUNC LJ_NORET | 205 | #define LJ_FUNC_NORET LJ_FUNC LJ_NORET |
210 | #define LJ_FUNCA_NORET LJ_FUNCA LJ_NORET | 206 | #define LJ_FUNCA_NORET LJ_FUNCA LJ_NORET |