MCPcopy Create free account
hub / github.com/Tencent/sluaunreal / luaK_patchclose

Function luaK_patchclose

Plugins/slua_unreal/External/lua/lcode.cpp:276–284  ·  view source on GitHub ↗

** Path all jumps in 'list' to close upvalues up to given 'level' ** (The assertion checks that jumps either were closing nothing ** or were closing higher levels, from inner blocks.) */

Source from the content-addressed store, hash-verified

274** or were closing higher levels, from inner blocks.)
275*/
276void luaK_patchclose (FuncState *fs, int list, int level) {
277 level++; /* argument is +1 to reserve 0 as non-op */
278 for (; list != NO_JUMP; list = getjump(fs, list)) {
279 lua_assert(GET_OPCODE(fs->f->code[list]) == OP_JMP &&
280 (GETARG_A(fs->f->code[list]) == 0 ||
281 GETARG_A(fs->f->code[list]) >= level));
282 SETARG_A(fs->f->code[list], level);
283 }
284}
285
286
287/*

Callers 4

findlabelFunction · 0.85
movegotosoutFunction · 0.85
leaveblockFunction · 0.85
repeatstatFunction · 0.85

Calls 1

getjumpFunction · 0.85

Tested by

no test coverage detected