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/lgc.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/lgc.c')
-rw-r--r-- | apps/plugins/lua/lgc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/plugins/lua/lgc.c b/apps/plugins/lua/lgc.c index 17b64a103b..2a4d95aba8 100644 --- a/apps/plugins/lua/lgc.c +++ b/apps/plugins/lua/lgc.c | |||
@@ -318,9 +318,13 @@ static l_mem propagatemark (global_State *g) { | |||
318 | return sizeof(Proto) + sizeof(Instruction) * p->sizecode + | 318 | return sizeof(Proto) + sizeof(Instruction) * p->sizecode + |
319 | sizeof(Proto *) * p->sizep + | 319 | sizeof(Proto *) * p->sizep + |
320 | sizeof(TValue) * p->sizek + | 320 | sizeof(TValue) * p->sizek + |
321 | sizeof(int) * p->sizelineinfo + | ||
322 | sizeof(LocVar) * p->sizelocvars + | 321 | sizeof(LocVar) * p->sizelocvars + |
323 | sizeof(TString *) * p->sizeupvalues; | 322 | sizeof(TString *) * p->sizeupvalues + |
323 | #ifdef LUA_OPTIMIZE_DEBUG | ||
324 | p->sizelineinfo; | ||
325 | #else | ||
326 | sizeof(int) * p->sizelineinfo; | ||
327 | #endif | ||
324 | } | 328 | } |
325 | default: lua_assert(0); return 0; | 329 | default: lua_assert(0); return 0; |
326 | } | 330 | } |