emit_local(emit, emit->gwion->type[et_int]);
const Instr tomem = emit_add_instr(emit, Reg2Mem);
tomem->m_val = offset;
- const Instr s1 = emit_add_instr(emit, MemSetImm);
- s1->m_val = offset + SZ_INT;
const Instr loop_idx = emit_add_instr(emit, MemSetImm);
loop_idx->m_val = offset + SZ_INT;
loop_idx->m_val2 = -1;
fbflag(f2->def->base, fbflag_unary) &&
fbflag(f1->def->base, fbflag_postfix) ==
fbflag(f2->def->base, fbflag_postfix))
- ERR_B(f2->def->base->td->pos,
+ ERR_B(f2->def->base->pos,
_("global function '%s' already defined"
" for those arguments"),
s_name(fdef->base->xid))
set_vflag(v, vflag_fglobal); // file global
} else if (GET_FLAG(decl->td, global))
SET_FLAG(v, global);
- else if(v->type != env->gwion->type[et_auto] && v->type != env->class_def) {
+ else if(v->type != env->gwion->type[et_auto] && (v->type != env->class_def || env->scope->depth)) {
type_addref(v->type);
set_vflag(v, vflag_inner); // file global
}
autoloop:
*(m_bit **)(mem + VAL2 + SZ_INT) =
m_vector_addr(ARRAY(*(M_Object *)(mem + VAL2 - SZ_INT)),
- *(m_uint *)(mem + VAL2) + 1);
+ ++*(m_uint *)(mem + VAL2));
BRANCH_DISPATCH(
m_vector_size(ARRAY(*(M_Object *)(mem + VAL2 - SZ_INT))) ==
- ++*(m_uint *)(mem + VAL2));
+ *(m_uint *)(mem + VAL2));
arraytop:
if (*(m_uint *)(reg - SZ_INT * 2) < *(m_uint *)(reg - SZ_INT))
goto newobj;