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

Function luaK_code

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

** Emit instruction 'i', checking for array sizes and saving also its ** line information. Return 'i' position. */

Source from the content-addressed store, hash-verified

289** line information. Return 'i' position.
290*/
291static int luaK_code (FuncState *fs, Instruction i) {
292 Proto *f = fs->f;
293 dischargejpc(fs); /* 'pc' will change */
294 /* put new instruction in code array */
295 luaM_growvector(fs->ls->L, f->code, fs->pc, f->sizecode, Instruction,
296 MAX_INT, "opcodes");
297 f->code[fs->pc] = i;
298 /* save corresponding line information */
299 luaM_growvector(fs->ls->L, f->lineinfo, fs->pc, f->sizelineinfo, int,
300 MAX_INT, "opcodes");
301 f->lineinfo[fs->pc] = fs->ls->lastline;
302 return fs->pc++;
303}
304
305
306/*

Callers 3

luaK_codeABCFunction · 0.85
luaK_codeABxFunction · 0.85
codeextraargFunction · 0.85

Calls 1

dischargejpcFunction · 0.85

Tested by

no test coverage detected