MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / LoadFunction

Function LoadFunction

deps/lua/src/lundump.c:161–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161static Proto* LoadFunction(LoadState* S, TString* p)
162{
163 Proto* f;
164 if (++S->L->nCcalls > LUAI_MAXCCALLS) error(S,"code too deep");
165 f=luaF_newproto(S->L);
166 setptvalue2s(S->L,S->L->top,f); incr_top(S->L);
167 f->source=LoadString(S); if (f->source==NULL) f->source=p;
168 f->linedefined=LoadInt(S);
169 f->lastlinedefined=LoadInt(S);
170 f->nups=LoadByte(S);
171 f->numparams=LoadByte(S);
172 f->is_vararg=LoadByte(S);
173 f->maxstacksize=LoadByte(S);
174 LoadCode(S,f);
175 LoadConstants(S,f);
176 LoadDebug(S,f);
177 IF (!luaG_checkcode(f), "bad code");
178 S->L->top--;
179 S->L->nCcalls--;
180 return f;
181}
182
183static void LoadHeader(LoadState* S)
184{

Callers 2

LoadConstantsFunction · 0.85
luaU_undumpFunction · 0.85

Calls 8

luaF_newprotoFunction · 0.85
LoadStringFunction · 0.85
LoadIntFunction · 0.85
LoadCodeFunction · 0.85
LoadConstantsFunction · 0.85
LoadDebugFunction · 0.85
luaG_checkcodeFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected