** Emit instruction 'i', checking for array sizes and saving also its ** line information. Return 'i' position. */
| 291 | ** line information. Return 'i' position. |
| 292 | */ |
| 293 | static 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 | /* |
no test coverage detected