MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaU_dump

Function luaU_dump

third-party/lua-5.5.0/src/ldump.c:288–306  ·  view source on GitHub ↗

** dump Lua function as precompiled chunk */

Source from the content-addressed store, hash-verified

286** dump Lua function as precompiled chunk
287*/
288int luaU_dump (lua_State *L, const Proto *f, lua_Writer w, void *data,
289 int strip) {
290 DumpState D;
291 D.h = luaH_new(L); /* aux. table to keep strings already dumped */
292 sethvalue2s(L, L->top.p, D.h); /* anchor it */
293 L->top.p++;
294 D.L = L;
295 D.writer = w;
296 D.offset = 0;
297 D.data = data;
298 D.strip = strip;
299 D.status = 0;
300 D.nstr = 0;
301 dumpHeader(&D);
302 dumpByte(&D, f->sizeupvalues);
303 dumpFunction(&D, f);
304 dumpBlock(&D, NULL, 0); /* signal end of dump */
305 return D.status;
306}
307

Callers 2

pmainFunction · 0.70
lua_dumpFunction · 0.70

Calls 5

luaH_newFunction · 0.70
dumpHeaderFunction · 0.70
dumpByteFunction · 0.70
dumpFunctionFunction · 0.70
dumpBlockFunction · 0.70

Tested by

no test coverage detected