From b42430fd3a6200eaaf4020be90c4d47f7e251b67 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 27 Jun 2017 08:35:31 -0300 Subject: '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.) --- ldebug.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ldebug.h') diff --git a/ldebug.h b/ldebug.h index 9c0a03a6..9062f4bd 100644 --- a/ldebug.h +++ b/ldebug.h @@ -1,5 +1,5 @@ /* -** $Id: ldebug.h,v 2.13 2015/03/11 16:10:41 roberto Exp roberto $ +** $Id: ldebug.h,v 2.14 2015/05/22 17:45:56 roberto Exp roberto $ ** Auxiliary functions from Debug Interface module ** See Copyright Notice in lua.h */ @@ -13,11 +13,15 @@ #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) -#define getfuncline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : -1) - #define resethookcount(L) (L->hookcount = L->basehookcount) +/* +** mark for entries in 'lineinfo' array that has absolute information in +** 'abslineinfo' array +*/ +#define ABSLINEINFO (-0x80) +LUAI_FUNC int luaG_getfuncline (Proto *f, int pc); LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, const char *opname); LUAI_FUNC l_noret luaG_concaterror (lua_State *L, const TValue *p1, -- cgit v1.2.3-55-g6feb