MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / luaK_code

Function luaK_code

3rd/lua-5.4.3/src/lcode.c:381–389  ·  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

379** line information. Return 'i' position.
380*/
381int luaK_code (FuncState *fs, Instruction i) {
382 Proto *f = fs->f;
383 /* put new instruction in code array */
384 luaM_growvector(fs->ls->L, f->code, fs->pc, f->sizecode, Instruction,
385 MAX_INT, "opcodes");
386 f->code[fs->pc++] = i;
387 savelineinfo(fs, f, fs->ls->lastline);
388 return fs->pc - 1; /* index of new instruction */
389}
390
391
392/*

Callers 6

constructorFunction · 0.85
luaK_codeABCkFunction · 0.85
luaK_codeABxFunction · 0.85
luaK_codeAsBxFunction · 0.85
codesJFunction · 0.85
codeextraargFunction · 0.85

Calls 1

savelineinfoFunction · 0.85

Tested by

no test coverage detected