diff options
author | Mike Pall <mike> | 2010-02-08 20:17:34 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2010-02-08 20:17:34 +0100 |
commit | d5a46621f9d1299a7e5c06c59dfc02d61dc04a79 (patch) | |
tree | 633176c0dcd40cf0f67acd27f67c1338cb435e8f /src/lj_obj.h | |
parent | 2ddea3838d476975453973a8164f99699dd78ee0 (diff) | |
download | luajit-d5a46621f9d1299a7e5c06c59dfc02d61dc04a79.tar.gz luajit-d5a46621f9d1299a7e5c06c59dfc02d61dc04a79.tar.bz2 luajit-d5a46621f9d1299a7e5c06c59dfc02d61dc04a79.zip |
Drop bc field in GCproto since the bytecode is colocated.
Diffstat (limited to 'src/lj_obj.h')
-rw-r--r-- | src/lj_obj.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/lj_obj.h b/src/lj_obj.h index d8aab90a..f243a75b 100644 --- a/src/lj_obj.h +++ b/src/lj_obj.h | |||
@@ -351,7 +351,6 @@ typedef struct GCproto { | |||
351 | MSize sizebc; /* Number of bytecode instructions. */ | 351 | MSize sizebc; /* Number of bytecode instructions. */ |
352 | GCRef gclist; | 352 | GCRef gclist; |
353 | MRef k; /* Split constant array (points to the middle). */ | 353 | MRef k; /* Split constant array (points to the middle). */ |
354 | MRef bc; /* Array of bytecode instructions. */ | ||
355 | MRef uv; /* Upvalue list. local slot|0x8000 or parent uv idx. */ | 354 | MRef uv; /* Upvalue list. local slot|0x8000 or parent uv idx. */ |
356 | MSize sizekgc; /* Number of collectable constants. */ | 355 | MSize sizekgc; /* Number of collectable constants. */ |
357 | MSize sizekn; /* Number of lua_Number constants. */ | 356 | MSize sizekn; /* Number of lua_Number constants. */ |
@@ -381,11 +380,7 @@ typedef struct GCproto { | |||
381 | gcref(mref((pt)->k, GCRef)[(idx)])) | 380 | gcref(mref((pt)->k, GCRef)[(idx)])) |
382 | #define proto_knum(pt, idx) \ | 381 | #define proto_knum(pt, idx) \ |
383 | check_exp((uintptr_t)(idx) < (pt)->sizekn, mref((pt)->k, lua_Number)[(idx)]) | 382 | check_exp((uintptr_t)(idx) < (pt)->sizekn, mref((pt)->k, lua_Number)[(idx)]) |
384 | #define proto_bc(pt) (mref((pt)->bc, BCIns)) | 383 | #define proto_bc(pt) ((BCIns *)((char *)(pt) + sizeof(GCproto))) |
385 | #define proto_ins(pt, pos) \ | ||
386 | check_exp((uintptr_t)(pos) < (pt)->sizebc, proto_bc(pt)[(pos)]) | ||
387 | #define proto_insptr(pt, pos) \ | ||
388 | check_exp((uintptr_t)(pos) < (pt)->sizebc, &proto_bc(pt)[(pos)]) | ||
389 | #define proto_bcpos(pt, pc) ((BCPos)((pc) - proto_bc(pt))) | 384 | #define proto_bcpos(pt, pc) ((BCPos)((pc) - proto_bc(pt))) |
390 | #define proto_uv(pt) (mref((pt)->uv, uint16_t)) | 385 | #define proto_uv(pt) (mref((pt)->uv, uint16_t)) |
391 | 386 | ||