diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-06-27 08:35:31 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-06-27 08:35:31 -0300 |
commit | b42430fd3a6200eaaf4020be90c4d47f7e251b67 (patch) | |
tree | c47c23ac9d461b79554986769375019dc6dc469c /ldebug.h | |
parent | 60a7492d249860d20098ac2f0b9d863606c38450 (diff) | |
download | lua-b42430fd3a6200eaaf4020be90c4d47f7e251b67.tar.gz lua-b42430fd3a6200eaaf4020be90c4d47f7e251b67.tar.bz2 lua-b42430fd3a6200eaaf4020be90c4d47f7e251b67.zip |
'lineinfo' in prototypes saved as differences instead of absolute
values, so that the array can use bytes instead of ints, reducing
its size. (A new array 'abslineinfo' is used when line differences
do not fit in a byte.)
Diffstat (limited to 'ldebug.h')
-rw-r--r-- | ldebug.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.h,v 2.13 2015/03/11 16:10:41 roberto Exp roberto $ | 2 | ** $Id: ldebug.h,v 2.14 2015/05/22 17:45:56 roberto Exp roberto $ |
3 | ** Auxiliary functions from Debug Interface module | 3 | ** Auxiliary functions from Debug Interface module |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -13,11 +13,15 @@ | |||
13 | 13 | ||
14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) | 14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) |
15 | 15 | ||
16 | #define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : -1) | ||
17 | |||
18 | #define resethookcount(L) (L->hookcount = L->basehookcount) | 16 | #define resethookcount(L) (L->hookcount = L->basehookcount) |
19 | 17 | ||
18 | /* | ||
19 | ** mark for entries in 'lineinfo' array that has absolute information in | ||
20 | ** 'abslineinfo' array | ||
21 | */ | ||
22 | #define ABSLINEINFO (-0x80) | ||
20 | 23 | ||
24 | LUAI_FUNC int luaG_getfuncline (Proto *f, int pc); | ||
21 | LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, | 25 | LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, |
22 | const char *opname); | 26 | const char *opname); |
23 | LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1, | 27 | LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1, |