summaryrefslogtreecommitdiff
path: root/src/lj_obj.h
diff options
context:
space:
mode:
authorMike Pall <mike>2011-11-20 19:14:39 +0100
committerMike Pall <mike>2011-11-20 19:16:40 +0100
commitcecbe3c15fc62921098f3468b9de86cf0b631b9e (patch)
treed1b18c59652a3e163ce050e58b7b647fdf312271 /src/lj_obj.h
parentcc7a12be93660677a5128124c11c68127cfe33eb (diff)
downloadluajit-cecbe3c15fc62921098f3468b9de86cf0b631b9e.tar.gz
luajit-cecbe3c15fc62921098f3468b9de86cf0b631b9e.tar.bz2
luajit-cecbe3c15fc62921098f3468b9de86cf0b631b9e.zip
Specialize to prototype for non-monomorphic functions.
Solves the trace-explosion problem with closure-heavy programming.
Diffstat (limited to 'src/lj_obj.h')
-rw-r--r--src/lj_obj.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lj_obj.h b/src/lj_obj.h
index afb29d0f..4a360df6 100644
--- a/src/lj_obj.h
+++ b/src/lj_obj.h
@@ -318,6 +318,9 @@ typedef struct GCproto {
318/* Only used during parsing. */ 318/* Only used during parsing. */
319#define PROTO_HAS_RETURN 0x20 /* Already emitted a return. */ 319#define PROTO_HAS_RETURN 0x20 /* Already emitted a return. */
320#define PROTO_FIXUP_RETURN 0x40 /* Need to fixup emitted returns. */ 320#define PROTO_FIXUP_RETURN 0x40 /* Need to fixup emitted returns. */
321/* Top bits used for counting created closures. */
322#define PROTO_CLCOUNT 0x20 /* Base of saturating 3 bit counter. */
323#define PROTO_CLC_BITS 3
321 324
322#define proto_kgc(pt, idx) \ 325#define proto_kgc(pt, idx) \
323 check_exp((uintptr_t)(intptr_t)(idx) >= (uintptr_t)-(intptr_t)(pt)->sizekgc, \ 326 check_exp((uintptr_t)(intptr_t)(idx) >= (uintptr_t)-(intptr_t)(pt)->sizekgc, \