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.) --- lparser.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lparser.h') diff --git a/lparser.h b/lparser.h index 16124181..3ab6065d 100644 --- a/lparser.h +++ b/lparser.h @@ -1,5 +1,5 @@ /* -** $Id: lparser.h,v 1.76 2015/12/30 18:16:13 roberto Exp roberto $ +** $Id: lparser.h,v 1.77 2017/04/28 20:57:45 roberto Exp roberto $ ** Lua Parser ** See Copyright Notice in lua.h */ @@ -123,14 +123,17 @@ typedef struct FuncState { struct BlockCnt *bl; /* chain of current blocks */ int pc; /* next position to code (equivalent to 'ncode') */ int lasttarget; /* 'label' of last 'jump label' */ + int previousline; /* last line that was saved in 'lineinfo' */ int jpc; /* list of pending jumps to 'pc' */ int nk; /* number of elements in 'k' */ int np; /* number of elements in 'p' */ + int nabslineinfo; /* number of elements in 'abslineinfo' */ int firstlocal; /* index of first local var (in Dyndata array) */ short nlocvars; /* number of elements in 'f->locvars' */ lu_byte nactvar; /* number of active local variables */ lu_byte nups; /* number of upvalues */ lu_byte freereg; /* first free register */ + lu_byte iwthabs; /* instructions issued since last absolute line info */ } FuncState; -- cgit v1.2.3-55-g6feb