示例#1
0
bool_t
Compiler_equals(Compiler *self, Obj *other) {
    Compiler *twin = (Compiler*)other;
    if (twin == self)                                    { return true; }
    if (!Obj_Is_A(other, COMPILER))                      { return false; }
    if (self->boost != twin->boost)                      { return false; }
    if (!Query_Equals(self->parent, (Obj*)twin->parent)) { return false; }
    if (!Sim_Equals(self->sim, (Obj*)twin->sim))         { return false; }
    return true;
}
示例#2
0
bool
Schema_Equals_IMP(Schema *self, Obj *other) {
    if ((Schema*)other == self)                         { return true; }
    if (!Obj_is_a(other, SCHEMA))                       { return false; }
    SchemaIVARS *const ivars = Schema_IVARS(self);
    SchemaIVARS *const ovars = Schema_IVARS((Schema*)other);
    if (!Arch_Equals(ivars->arch, (Obj*)ovars->arch))   { return false; }
    if (!Sim_Equals(ivars->sim, (Obj*)ovars->sim))      { return false; }
    if (!Hash_Equals(ivars->types, (Obj*)ovars->types)) { return false; }
    return true;
}