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 /ldump.c | |
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 'ldump.c')
-rw-r--r-- | ldump.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldump.c,v 2.36 2015/03/30 15:43:51 roberto Exp roberto $ | 2 | ** $Id: ldump.c,v 2.37 2015/10/08 15:53:49 roberto Exp roberto $ |
3 | ** save precompiled Lua chunks | 3 | ** save precompiled Lua chunks |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -149,6 +149,12 @@ static void DumpDebug (const Proto *f, DumpState *D) { | |||
149 | n = (D->strip) ? 0 : f->sizelineinfo; | 149 | n = (D->strip) ? 0 : f->sizelineinfo; |
150 | DumpInt(n, D); | 150 | DumpInt(n, D); |
151 | DumpVector(f->lineinfo, n, D); | 151 | DumpVector(f->lineinfo, n, D); |
152 | n = (D->strip) ? 0 : f->sizeabslineinfo; | ||
153 | DumpInt(n, D); | ||
154 | for (i = 0; i < n; i++) { | ||
155 | DumpInt(f->abslineinfo[i].pc, D); | ||
156 | DumpInt(f->abslineinfo[i].line, D); | ||
157 | } | ||
152 | n = (D->strip) ? 0 : f->sizelocvars; | 158 | n = (D->strip) ? 0 : f->sizelocvars; |
153 | DumpInt(n, D); | 159 | DumpInt(n, D); |
154 | for (i = 0; i < n; i++) { | 160 | for (i = 0; i < n; i++) { |