diff options
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 |
