instr->m_val2 = val2;
} else if(f->value_ref->from->owner_class && f != emit->env->func && !f->code&& ! is_fptr(emit->gwion, f->value_ref->type)){
/* not yet emitted static func */
- const Instr instr = (Instr)vector_back(&emit->code->instr);
+ const Instr instr = vector_size(&emit->code->instr) ?
+ (Instr)vector_back(&emit->code->instr) : emit_add_instr(emit, PushStaticCode);
assert(instr->opcode == ePushStaticCode);
instr->opcode = eRegPushImm;
const Instr pushcode = emit_add_instr(emit, PushStaticCode);