/*static*/ int FuncState::luaK_code (/*FuncState *fs,*/ Instruction i) { //Proto *f = fs->f; dischargejpc(); /* 'pc' will change */ /* put new instruction in code array */ luaM_growvector(ls->L, f->code, pc, f->sizecode, Instruction, MAX_INT, "opcodes"); f->code[pc] = i; /* save corresponding line information */ luaM_growvector(ls->L, f->lineinfo, pc, f->sizelineinfo, int, MAX_INT, "opcodes"); f->lineinfo[pc] = ls->lastline; return pc++; }
static int luaK_code (FuncState *fs, Instruction i) { Proto *f = fs->f; dischargejpc(fs); /* 'pc' will change */ /* put new instruction in code array */ luaM_growvector(fs->ls->L, f->code, fs->pc, f->sizecode, Instruction, MAX_INT, "opcodes"); f->code[fs->pc] = i; /* save corresponding line information */ luaM_growvector(fs->ls->L, f->lineinfo, fs->pc, f->sizelineinfo, int, MAX_INT, "opcodes"); f->lineinfo[fs->pc] = fs->ls->lastline; return fs->pc++; }
static int codegen_code(ktap_funcstate *fs, ktap_instruction i) { ktap_proto *f = fs->f; dischargejpc(fs); /* `pc' will change */ /* put new instruction in code array */ ktapc_growvector(f->code, fs->pc, f->sizecode, ktap_instruction, MAX_INT, "opcodes"); f->code[fs->pc] = i; /* save corresponding line information */ ktapc_growvector(f->lineinfo, fs->pc, f->sizelineinfo, int, MAX_INT, "opcodes"); f->lineinfo[fs->pc] = fs->ls->lastline; return fs->pc++; }