From d61ea6c5eeef4343e40c0225f22ad39c994f84a9 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Mon, 5 Aug 2019 00:03:08 -0500 Subject: 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 --- apps/plugins/lua/lobject.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apps/plugins/lua/lobject.h') diff --git a/apps/plugins/lua/lobject.h b/apps/plugins/lua/lobject.h index 028ff0355b..83651c2c47 100644 --- a/apps/plugins/lua/lobject.h +++ b/apps/plugins/lua/lobject.h @@ -240,7 +240,11 @@ typedef struct Proto { TValue *k; /* constants used by the function */ Instruction *code; struct Proto **p; /* functions defined inside the function */ +#ifdef LUA_OPTIMIZE_DEBUG + unsigned char *packedlineinfo; +#else int *lineinfo; /* map from opcodes to source lines */ +#endif struct LocVar *locvars; /* information about local variables */ TString **upvalues; /* upvalue names */ TString *source; -- cgit v1.2.3