MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / luaK_code

Function luaK_code

libraries/AP_Scripting/lua/src/lcode.c:300–312  ·  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

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

Callers 3

luaK_codeABCFunction · 0.85
luaK_codeABxFunction · 0.85
codeextraargFunction · 0.85

Calls 1

dischargejpcFunction · 0.85

Tested by

no test coverage detected