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

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

Issue 636893002: [turbofan] Drop broken StaticParameterTraits. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix typo... 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/compiler/machine-operator.h ('k') | src/compiler/node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/machine-operator.cc
diff --git a/src/compiler/machine-operator.cc b/src/compiler/machine-operator.cc
index e88c792ec1d0b4934633c264b77943367486f8b9..cf10b2f4541243d17016f0d41d891d1449e87411 100644
--- a/src/compiler/machine-operator.cc
+++ b/src/compiler/machine-operator.cc
@@ -12,9 +12,8 @@ namespace v8 {
namespace internal {
namespace compiler {
-std::ostream& operator<<(std::ostream& os,
- const WriteBarrierKind& write_barrier_kind) {
- switch (write_barrier_kind) {
+std::ostream& operator<<(std::ostream& os, WriteBarrierKind kind) {
+ switch (kind) {
case kNoWriteBarrier:
return os << "NoWriteBarrier";
case kFullWriteBarrier:
@@ -25,39 +24,26 @@ std::ostream& operator<<(std::ostream& os,
}
-std::ostream& operator<<(std::ostream& os, const StoreRepresentation& rep) {
- return os << "(" << rep.machine_type() << " : " << rep.write_barrier_kind()
- << ")";
+bool operator==(StoreRepresentation lhs, StoreRepresentation rhs) {
+ return lhs.machine_type() == rhs.machine_type() &&
+ lhs.write_barrier_kind() == rhs.write_barrier_kind();
}
-template <>
-struct StaticParameterTraits<StoreRepresentation> {
- static std::ostream& PrintTo(std::ostream& os,
- const StoreRepresentation& rep) {
- return os << rep;
- }
- static int HashCode(const StoreRepresentation& rep) {
- return rep.machine_type() + rep.write_barrier_kind();
- }
- static bool Equals(const StoreRepresentation& rep1,
- const StoreRepresentation& rep2) {
- return rep1 == rep2;
- }
-};
+bool operator!=(StoreRepresentation lhs, StoreRepresentation rhs) {
+ return !(lhs == rhs);
+}
-template <>
-struct StaticParameterTraits<LoadRepresentation> {
- static std::ostream& PrintTo(std::ostream& os,
- LoadRepresentation type) { // NOLINT
- return os << type;
- }
- static int HashCode(LoadRepresentation type) { return type; }
- static bool Equals(LoadRepresentation lhs, LoadRepresentation rhs) {
- return lhs == rhs;
- }
-};
+size_t hash_value(StoreRepresentation rep) {
+ return base::hash_combine(rep.machine_type(), rep.write_barrier_kind());
+}
+
+
+std::ostream& operator<<(std::ostream& os, StoreRepresentation rep) {
+ return os << "(" << rep.machine_type() << " : " << rep.write_barrier_kind()
+ << ")";
+}
#define PURE_OP_LIST(V) \
« no previous file with comments | « src/compiler/machine-operator.h ('k') | src/compiler/node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698