diff options
Diffstat (limited to 'src/lj_obj.h')
-rw-r--r-- | src/lj_obj.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lj_obj.h b/src/lj_obj.h index a0dc689c..d8aab90a 100644 --- a/src/lj_obj.h +++ b/src/lj_obj.h | |||
@@ -355,19 +355,18 @@ typedef struct GCproto { | |||
355 | MRef uv; /* Upvalue list. local slot|0x8000 or parent uv idx. */ | 355 | MRef uv; /* Upvalue list. local slot|0x8000 or parent uv idx. */ |
356 | MSize sizekgc; /* Number of collectable constants. */ | 356 | MSize sizekgc; /* Number of collectable constants. */ |
357 | MSize sizekn; /* Number of lua_Number constants. */ | 357 | MSize sizekn; /* Number of lua_Number constants. */ |
358 | MSize sizept; /* Total size including colocated arrays. */ | ||
358 | uint8_t sizeuv; /* Number of upvalues. */ | 359 | uint8_t sizeuv; /* Number of upvalues. */ |
359 | uint8_t flags; /* Miscellaneous flags (see below). */ | 360 | uint8_t flags; /* Miscellaneous flags (see below). */ |
360 | uint16_t trace; /* Anchor for chain of root traces. */ | 361 | uint16_t trace; /* Anchor for chain of root traces. */ |
361 | /* ------ The following fields are for debugging/tracebacks only ------ */ | 362 | /* ------ The following fields are for debugging/tracebacks only ------ */ |
362 | MSize sizelineinfo; /* Size of lineinfo array (may be 0). */ | 363 | GCRef chunkname; /* Name of the chunk this function was defined in. */ |
363 | MSize sizevarinfo; /* Size of local var info array (may be 0). */ | ||
364 | MSize sizeuvname; /* Size of upvalue names array (may be 0). */ | ||
365 | BCLine linedefined; /* First line of the function definition. */ | 364 | BCLine linedefined; /* First line of the function definition. */ |
366 | BCLine lastlinedefined; /* Last line of the function definition. */ | 365 | BCLine lastlinedefined; /* Last line of the function definition. */ |
367 | MRef lineinfo; /* Map from bytecode instructions to source lines. */ | 366 | MSize sizevarinfo; /* Size of local var info array. */ |
368 | MRef varinfo; /* Names and extents of local variables. */ | 367 | MRef varinfo; /* Names and extents of local variables. */ |
369 | MRef uvname; /* Array of upvalue names (GCRef of GCstr). */ | 368 | MRef uvname; /* Array of upvalue names (GCRef of GCstr). */ |
370 | GCRef chunkname; /* Name of the chunk this function was defined in. */ | 369 | MRef lineinfo; /* Map from bytecode instructions to source lines. */ |
371 | } GCproto; | 370 | } GCproto; |
372 | 371 | ||
373 | #define PROTO_IS_VARARG 0x01 | 372 | #define PROTO_IS_VARARG 0x01 |
@@ -389,9 +388,10 @@ typedef struct GCproto { | |||
389 | check_exp((uintptr_t)(pos) < (pt)->sizebc, &proto_bc(pt)[(pos)]) | 388 | check_exp((uintptr_t)(pos) < (pt)->sizebc, &proto_bc(pt)[(pos)]) |
390 | #define proto_bcpos(pt, pc) ((BCPos)((pc) - proto_bc(pt))) | 389 | #define proto_bcpos(pt, pc) ((BCPos)((pc) - proto_bc(pt))) |
391 | #define proto_uv(pt) (mref((pt)->uv, uint16_t)) | 390 | #define proto_uv(pt) (mref((pt)->uv, uint16_t)) |
391 | |||
392 | #define proto_uvname(pt, idx) \ | 392 | #define proto_uvname(pt, idx) \ |
393 | check_exp((uintptr_t)(idx) < (pt)->sizeuvname, \ | 393 | check_exp((uintptr_t)(idx) < (pt)->sizeuv, \ |
394 | gcref(mref((pt)->uvname, GCRef)[(idx)])) | 394 | gco2str(gcref(mref((pt)->uvname, GCRef)[(idx)]))) |
395 | #define proto_chunkname(pt) (gco2str(gcref((pt)->chunkname))) | 395 | #define proto_chunkname(pt) (gco2str(gcref((pt)->chunkname))) |
396 | #define proto_lineinfo(pt) (mref((pt)->lineinfo, BCLine)) | 396 | #define proto_lineinfo(pt) (mref((pt)->lineinfo, BCLine)) |
397 | #define proto_line(pt, pos) \ | 397 | #define proto_line(pt, pos) \ |