diff options
author | William Wilgus <me.theuser@yahoo.com> | 2019-08-05 00:03:08 -0500 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2019-08-08 07:11:30 +0200 |
commit | d61ea6c5eeef4343e40c0225f22ad39c994f84a9 (patch) | |
tree | 13a5e6261dda3fda33aa7ae743105fc3f2bc2e39 /apps/plugins/lua/lundump.c | |
parent | 1dabca6c267c2f8dfc8c0fb9269877856c00d4f1 (diff) | |
download | rockbox-d61ea6c5eeef4343e40c0225f22ad39c994f84a9.tar.gz rockbox-d61ea6c5eeef4343e40c0225f22ad39c994f84a9.zip |
lua LCD (Lua Compact Debug) patch
LCD developed 9/2015 by Terry Ellison
We've already discarded the ldebug module from lua
it only makes sense to discard the debug info as well
adds 1.5 K to the binary
saves 8 Kb on the base state
once scripts start getting called i've seen 10-50Kb savings but it all depends on
what exactly you are running
Change-Id: Ibb74f344df1c4c96380ec6c98b010a810e9ae9cc
Diffstat (limited to 'apps/plugins/lua/lundump.c')
-rw-r--r-- | apps/plugins/lua/lundump.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/plugins/lua/lundump.c b/apps/plugins/lua/lundump.c index 967b45c94b..13f910edd7 100644 --- a/apps/plugins/lua/lundump.c +++ b/apps/plugins/lua/lundump.c | |||
@@ -140,9 +140,18 @@ static void LoadDebug(LoadState* S, Proto* f) | |||
140 | { | 140 | { |
141 | int i,n; | 141 | int i,n; |
142 | n=LoadInt(S); | 142 | n=LoadInt(S); |
143 | #ifdef LUA_OPTIMIZE_DEBUG | ||
144 | if(n) { | ||
145 | f->packedlineinfo=luaM_newvector(S->L,n,unsigned char); | ||
146 | LoadBlock(S,f->packedlineinfo,n); | ||
147 | } else { | ||
148 | f->packedlineinfo=NULL; | ||
149 | } | ||
150 | #else | ||
143 | f->lineinfo=luaM_newvector(S->L,n,int); | 151 | f->lineinfo=luaM_newvector(S->L,n,int); |
144 | f->sizelineinfo=n; | 152 | f->sizelineinfo=n; |
145 | LoadVector(S,f->lineinfo,n,sizeof(int)); | 153 | LoadVector(S,f->lineinfo,n,sizeof(int)); |
154 | #endif | ||
146 | n=LoadInt(S); | 155 | n=LoadInt(S); |
147 | f->locvars=luaM_newvector(S->L,n,LocVar); | 156 | f->locvars=luaM_newvector(S->L,n,LocVar); |
148 | f->sizelocvars=n; | 157 | f->sizelocvars=n; |