diff options
author | Mike Pall <mike> | 2010-01-18 00:42:34 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-01-18 00:42:34 +0100 |
commit | 32969abe404b99c05c745695c1e6d6bab3565cd5 (patch) | |
tree | b27cdce3c90df38059fdef5757d8388f1106528d /src | |
parent | 379b8c5fe4cc2a2872c0d7f88cbc2a44d8097246 (diff) | |
download | luajit-32969abe404b99c05c745695c1e6d6bab3565cd5.tar.gz luajit-32969abe404b99c05c745695c1e6d6bab3565cd5.tar.bz2 luajit-32969abe404b99c05c745695c1e6d6bab3565cd5.zip |
Reduce non-numeric tag range by bumping up 64 bit lightud tag.
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_obj.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lj_obj.h b/src/lj_obj.h index ecce03ed..fbc1eff9 100644 --- a/src/lj_obj.h +++ b/src/lj_obj.h | |||
@@ -152,7 +152,7 @@ typedef const TValue cTValue; | |||
152 | ** ---MSW---.---LSW--- | 152 | ** ---MSW---.---LSW--- |
153 | ** primitive types | itype | | | 153 | ** primitive types | itype | | |
154 | ** lightuserdata | itype | void * | (32 bit platforms) | 154 | ** lightuserdata | itype | void * | (32 bit platforms) |
155 | ** lightuserdata |fffc| void * | (64 bit platforms, 48 bit pointers) | 155 | ** lightuserdata |ffff| void * | (64 bit platforms, 47 bit pointers) |
156 | ** GC objects | itype | GCRef | | 156 | ** GC objects | itype | GCRef | |
157 | ** number -------double------ | 157 | ** number -------double------ |
158 | ** | 158 | ** |
@@ -177,7 +177,7 @@ typedef const TValue cTValue; | |||
177 | #define LJ_TNUMX (-13) | 177 | #define LJ_TNUMX (-13) |
178 | 178 | ||
179 | #if LJ_64 | 179 | #if LJ_64 |
180 | #define LJ_TISNUM ((uint32_t)0xfff80000) | 180 | #define LJ_TISNUM ((uint32_t)0xfffeffff) |
181 | #else | 181 | #else |
182 | #define LJ_TISNUM ((uint32_t)LJ_TNUMX) | 182 | #define LJ_TISNUM ((uint32_t)LJ_TNUMX) |
183 | #endif | 183 | #endif |
@@ -196,7 +196,7 @@ typedef const TValue cTValue; | |||
196 | #define tvistrue(o) (itype(o) == LJ_TTRUE) | 196 | #define tvistrue(o) (itype(o) == LJ_TTRUE) |
197 | #define tvisbool(o) (tvisfalse(o) || tvistrue(o)) | 197 | #define tvisbool(o) (tvisfalse(o) || tvistrue(o)) |
198 | #if LJ_64 | 198 | #if LJ_64 |
199 | #define tvislightud(o) ((itype(o) >> 16) == LJ_TLIGHTUD) | 199 | #define tvislightud(o) ((itype(o) >> 15) == -2) |
200 | #else | 200 | #else |
201 | #define tvislightud(o) (itype(o) == LJ_TLIGHTUD) | 201 | #define tvislightud(o) (itype(o) == LJ_TLIGHTUD) |
202 | #endif | 202 | #endif |
@@ -234,7 +234,7 @@ typedef const TValue cTValue; | |||
234 | #define boolV(o) check_exp(tvisbool(o), (LJ_TFALSE - (o)->it)) | 234 | #define boolV(o) check_exp(tvisbool(o), (LJ_TFALSE - (o)->it)) |
235 | #if LJ_64 | 235 | #if LJ_64 |
236 | #define lightudV(o) check_exp(tvislightud(o), \ | 236 | #define lightudV(o) check_exp(tvislightud(o), \ |
237 | (void *)((o)->u64 & U64x(0000ffff,ffffffff))) | 237 | (void *)((o)->u64 & U64x(00007fff,ffffffff))) |
238 | #else | 238 | #else |
239 | #define lightudV(o) check_exp(tvislightud(o), gcrefp((o)->gcr, void)) | 239 | #define lightudV(o) check_exp(tvislightud(o), gcrefp((o)->gcr, void)) |
240 | #endif | 240 | #endif |
@@ -254,9 +254,9 @@ typedef const TValue cTValue; | |||
254 | 254 | ||
255 | #if LJ_64 | 255 | #if LJ_64 |
256 | #define checklightudptr(L, p) \ | 256 | #define checklightudptr(L, p) \ |
257 | (((uint64_t)(p) >> 48) ? (lj_err_msg(L, LJ_ERR_BADLU), NULL) : (p)) | 257 | (((uint64_t)(p) >> 47) ? (lj_err_msg(L, LJ_ERR_BADLU), NULL) : (p)) |
258 | #define setlightudV(o, x) \ | 258 | #define setlightudV(o, x) \ |
259 | ((o)->u64 = (uint64_t)(x) | (((uint64_t)LJ_TLIGHTUD) << 48)) | 259 | ((o)->u64 = (uint64_t)(x) | (((uint64_t)0xffff) << 48)) |
260 | #define setcont(o, x) \ | 260 | #define setcont(o, x) \ |
261 | ((o)->u64 = (uint64_t)(x) - (uint64_t)lj_vm_asm_begin) | 261 | ((o)->u64 = (uint64_t)(x) - (uint64_t)lj_vm_asm_begin) |
262 | #else | 262 | #else |