-eb716b515356166d3177e6244619be5901f31162
+31ff8c31d33c3e77cae4fd55445f12825eb92af5
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Struct_type::is_identical(const Struct_type* t,
bool errors_are_identical) const
{
+ if (this->is_struct_incomparable_ != t->is_struct_incomparable_)
+ return false;
const Struct_field_list* fields1 = this->fields();
const Struct_field_list* fields2 = t->fields();
if (fields1 == NULL || fields2 == NULL)
++pf)
ret = (ret << 1) + pf->type()->hash_for_method(gogo);
}
- return ret <<= 2;
+ ret <<= 2;
+ if (this->is_struct_incomparable_)
+ ret <<= 1;
+ return ret;
}
// Find the local field NAME.
}
}
+ if (this->is_struct_incomparable_)
+ ret->push_back('x');
+
ret->push_back('e');
}
errors_are_identical, NULL))
return false;
+ if (this->is_array_incomparable_ != t->is_array_incomparable_)
+ return false;
+
Expression* l1 = this->length();
Expression* l2 = t->length();
unsigned int
Array_type::do_hash_for_method(Gogo* gogo) const
{
+ unsigned int ret;
+
// There is no very convenient way to get a hash code for the
// length.
- return this->element_type_->hash_for_method(gogo) + 1;
+ ret = this->element_type_->hash_for_method(gogo) + 1;
+ if (this->is_array_incomparable_)
+ ret <<= 1;
+ return ret;
}
// Write the hash function for an array which can not use the identify
ret->append(s);
free(s);
mpz_clear(val);
+ if (this->is_array_incomparable_)
+ ret->push_back('x');
}
ret->push_back('e');
}