MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / LoadDebug

Function LoadDebug

src/Chain/libraries/glua/lundump.cpp:214–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212// 500M
213const int g_lineslimit = 1024 * 1024 * 500;
214static bool LoadDebug(LoadState *S, Proto *f) {
215 int i, n;
216 n = LoadInt(S);
217 if (n > g_lineslimit)
218 {
219 return false;
220 }
221
222 f->lineinfo = luaM_newvector(S->L, n, int);
223 f->sizelineinfo = n;
224 LoadVector(S, f->lineinfo, n);
225 n = LoadInt(S);
226 f->locvars = luaM_newvector(S->L, n, LocVar);
227 f->sizelocvars = n;
228 for (i = 0; i < n; i++)
229 f->locvars[i].varname = nullptr;
230 for (i = 0; i < n; i++) {
231 f->locvars[i].varname = LoadString(S);
232 f->locvars[i].startpc = LoadInt(S);
233 f->locvars[i].endpc = LoadInt(S);
234 }
235 n = LoadInt(S);
236 for (i = 0; i < n; i++)
237 f->upvalues[i].name = LoadString(S);
238
239 return true;
240}
241
242
243static void LoadFunction(LoadState *S, Proto *f, TString *psource) {

Callers 1

LoadFunctionFunction · 0.85

Calls 2

LoadIntFunction · 0.85
LoadStringFunction · 0.85

Tested by

no test coverage detected