Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: src/compiler/common-operator.cc

Issue 636953002: [turbofan] Fix HashCode/Equals for floating point operators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address offline comments. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/base/functional.h ('k') | test/unittests/base/functional-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/common-operator.cc
diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc
index cf85017bed0eacf1b0572f010dbc2d0aa619fc0c..5d42d7e84b3ed5413a5d81b955827d41f12bd0cf 100644
--- a/src/compiler/common-operator.cc
+++ b/src/compiler/common-operator.cc
@@ -150,15 +150,17 @@ const Operator* CommonOperatorBuilder::Int64Constant(int64_t value) {
const Operator* CommonOperatorBuilder::Float32Constant(volatile float value) {
return new (zone())
- Operator1<float>(IrOpcode::kFloat32Constant, Operator::kPure, 0, 1,
- "Float32Constant", value);
+ Operator1<float, base::bit_equal_to<float>, base::bit_hash<float>>(
+ IrOpcode::kFloat32Constant, Operator::kPure, 0, 1, "Float32Constant",
+ value);
}
const Operator* CommonOperatorBuilder::Float64Constant(volatile double value) {
return new (zone())
- Operator1<double>(IrOpcode::kFloat64Constant, Operator::kPure, 0, 1,
- "Float64Constant", value);
+ Operator1<double, base::bit_equal_to<double>, base::bit_hash<double>>(
+ IrOpcode::kFloat64Constant, Operator::kPure, 0, 1, "Float64Constant",
+ value);
}
@@ -172,8 +174,9 @@ const Operator* CommonOperatorBuilder::ExternalConstant(
const Operator* CommonOperatorBuilder::NumberConstant(volatile double value) {
return new (zone())
- Operator1<double>(IrOpcode::kNumberConstant, Operator::kPure, 0, 1,
- "NumberConstant", value);
+ Operator1<double, base::bit_equal_to<double>, base::bit_hash<double>>(
+ IrOpcode::kNumberConstant, Operator::kPure, 0, 1, "NumberConstant",
+ value);
}
« no previous file with comments | « src/base/functional.h ('k') | test/unittests/base/functional-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698