MCPcopy Create free account
hub / github.com/DFHack/dfhack / luaK_code

Function luaK_code

depends/lua/src/lcode.c:293–305  ·  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

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

Callers 3

luaK_codeABCFunction · 0.85
luaK_codeABxFunction · 0.85
codeextraargFunction · 0.85

Calls 1

dischargejpcFunction · 0.85

Tested by

no test coverage detected