aboutsummaryrefslogtreecommitdiff
path: root/ldebug.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-06-27 08:35:31 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-06-27 08:35:31 -0300
commitb42430fd3a6200eaaf4020be90c4d47f7e251b67 (patch)
treec47c23ac9d461b79554986769375019dc6dc469c /ldebug.h
parent60a7492d249860d20098ac2f0b9d863606c38450 (diff)
downloadlua-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.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/ldebug.h b/ldebug.h
index 9c0a03a6..9062f4bd 100644
--- a/ldebug.h
+++ b/ldebug.h
@@ -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
24LUAI_FUNC int luaG_getfuncline (Proto *f, int pc);
21LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, 25LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o,
22 const char *opname); 26 const char *opname);
23LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1, 27LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1,