mk_xtor(gwi->gwion->mp, t, (m_uint)dtor, ae_flag_dtor);
}
-ANN static Type type_finish(const Gwi gwi, const Type t) {
+ANN static inline void gwi_type_flag(const Type t) {
SET_FLAG(t, scan1 | ae_flag_scan2 | ae_flag_check | ae_flag_emit);
+}
+
+ANN static Type type_finish(const Gwi gwi, const Type t) {
gwi_add_type(gwi, t);
import_class_ini(gwi->gwion->env, t);
return t;
SET_FLAG(t, typedef);
if(ck.tmpl)
SET_FLAG(t, template);
+ else
+ gwi_type_flag(t);
return type_finish(gwi, t);
}
CHECK_OO(str2sym(gwi, name))
const Type t = new_type(gwi->gwion->mp, ++gwi->gwion->env->scope->type_xid, name, NULL);
t->size = size;
+ gwi_type_flag(t);
return type_finish(gwi, t);
}
GWI_BB(gwi_item_ini(gwi, "@internal", "@val"))
GWI_BB(gwi_item_end(gwi, 0, NULL))
GWI_BB(gwi_class_end(gwi))
- t_ptr->nspc->info->offset = SZ_INT; // TODO: should be an assert
+ t_ptr->nspc->info->offset = SZ_INT;
GWI_BB(gwi_oper_ini(gwi, (m_str)OP_ANY_TYPE, "Ptr", NULL))
GWI_BB(gwi_oper_add(gwi, opck_ptr_assign))
GWI_BB(gwi_oper_emi(gwi, opem_ptr_assign))
td.array = &array;
}
ptr = known_type(env, &td);
- assert(GET_FLAG(ptr, checked));
+ if(!GET_FLAG(ptr, checked) && ptr->e->def)
+ CHECK_BB(traverse_cdef(env, ptr->e->def))
}
t = depth ? array_type(env, ptr, depth) : ptr;
stmt->v = new_value(env->gwion->mp, t, s_name(stmt->sym));