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