aboutsummaryrefslogtreecommitdiff
path: root/lparser.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 /lparser.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 'lparser.h')
-rw-r--r--lparser.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lparser.h b/lparser.h
index 16124181..3ab6065d 100644
--- a/lparser.h
+++ b/lparser.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lparser.h,v 1.76 2015/12/30 18:16:13 roberto Exp roberto $ 2** $Id: lparser.h,v 1.77 2017/04/28 20:57:45 roberto Exp roberto $
3** Lua Parser 3** Lua Parser
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -123,14 +123,17 @@ typedef struct FuncState {
123 struct BlockCnt *bl; /* chain of current blocks */ 123 struct BlockCnt *bl; /* chain of current blocks */
124 int pc; /* next position to code (equivalent to 'ncode') */ 124 int pc; /* next position to code (equivalent to 'ncode') */
125 int lasttarget; /* 'label' of last 'jump label' */ 125 int lasttarget; /* 'label' of last 'jump label' */
126 int previousline; /* last line that was saved in 'lineinfo' */
126 int jpc; /* list of pending jumps to 'pc' */ 127 int jpc; /* list of pending jumps to 'pc' */
127 int nk; /* number of elements in 'k' */ 128 int nk; /* number of elements in 'k' */
128 int np; /* number of elements in 'p' */ 129 int np; /* number of elements in 'p' */
130 int nabslineinfo; /* number of elements in 'abslineinfo' */
129 int firstlocal; /* index of first local var (in Dyndata array) */ 131 int firstlocal; /* index of first local var (in Dyndata array) */
130 short nlocvars; /* number of elements in 'f->locvars' */ 132 short nlocvars; /* number of elements in 'f->locvars' */
131 lu_byte nactvar; /* number of active local variables */ 133 lu_byte nactvar; /* number of active local variables */
132 lu_byte nups; /* number of upvalues */ 134 lu_byte nups; /* number of upvalues */
133 lu_byte freereg; /* first free register */ 135 lu_byte freereg; /* first free register */
136 lu_byte iwthabs; /* instructions issued since last absolute line info */
134} FuncState; 137} FuncState;
135 138
136 139