mp_free(p, M_Vector, a);
}
-ANN static inline int is_array(const Type *types, const Type type) {
- const Type base = array_base(type);
- return isa(base, types[et_object]) > 0;
-}
-
static DTOR(array_dtor) {
const Type t = unflag_type(o->type_ref);
if(*(void**)(o->data + SZ_INT))
instr->m_val2 = size;
}
-ANN static inline void emit_struct_addr(const Emitter emit, const Value v) {
- const Instr set = emit_add_instr(emit, StructMemberAddr);
- set->m_val = v->from->offset;
-}
-
-ANN static inline void emit_struct_var(const Emitter emit, const Value v) {
- for(m_uint i = 0; i < v->type->size; i += SZ_INT) {
- const Instr set = emit_add_instr(emit, Reg2Reg);
- set->m_val2 = -v->type->size + i;
- set->m_val = -v->type->size + v->from->offset + i;
- }
-}
-
ANN static inline void emit_struct_data(const Emitter emit, const Value v, const uint emit_addr) {
const Instr instr = emit_kind(emit, v->type->size, emit_addr, structmember);
instr->m_val = v->from->offset;
return t;
}
-ANN static inline void clear_decl(const Env env, const Exp_Decl *decl) {
- Var_Decl_List list = decl->list;
- do scope_add(env->curr->info->value, (vtype)list->self->xid, (vtype)NULL);
- while((list = list->next));
-}
-
ANN static Type no_xid(const Env env, const Exp_Decl *decl) {
CHECK_OO((((Exp_Decl*)decl)->type = check_td(env, decl->td)))
-// clear_decl(env, decl);
CHECK_BO(traverse_exp(env, exp_self(decl)))
return decl->type;
}