mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
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
This commit is contained in:
parent
1dabca6c26
commit
d61ea6c5ee
13 changed files with 373 additions and 6 deletions
|
@ -140,9 +140,18 @@ static void LoadDebug(LoadState* S, Proto* f)
|
|||
{
|
||||
int i,n;
|
||||
n=LoadInt(S);
|
||||
#ifdef LUA_OPTIMIZE_DEBUG
|
||||
if(n) {
|
||||
f->packedlineinfo=luaM_newvector(S->L,n,unsigned char);
|
||||
LoadBlock(S,f->packedlineinfo,n);
|
||||
} else {
|
||||
f->packedlineinfo=NULL;
|
||||
}
|
||||
#else
|
||||
f->lineinfo=luaM_newvector(S->L,n,int);
|
||||
f->sizelineinfo=n;
|
||||
LoadVector(S,f->lineinfo,n,sizeof(int));
|
||||
#endif
|
||||
n=LoadInt(S);
|
||||
f->locvars=luaM_newvector(S->L,n,LocVar);
|
||||
f->sizelocvars=n;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue