Bug 1044256: Fix hash policy of SimdConstant; r=nbp

This commit is contained in:
Benjamin Bouvier 2014-10-08 15:20:32 +02:00
parent 9b08febe58
commit 5c3d81507d
2 changed files with 3 additions and 2 deletions

View File

@ -341,7 +341,8 @@ class SimdConstant {
// SimdConstant is a HashPolicy
typedef SimdConstant Lookup;
static HashNumber hash(const SimdConstant &val) {
return mozilla::HashBytes(&val.u, sizeof(SimdConstant));
uint32_t hash = mozilla::HashBytes(&val.u, sizeof(val.u));
return mozilla::AddToHash(hash, val.type_);
}
static bool match(const SimdConstant &lhs, const SimdConstant &rhs) {
return lhs == rhs;

View File

@ -194,7 +194,7 @@ class LSimdInsertElementBase : public LInstructionHelper<1, 2, 0>
const LAllocation *value() {
return getOperand(1);
}
const SimdLane lane() const {
SimdLane lane() const {
return mir_->toSimdInsertElement()->lane();
}
};