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

Unified Diff: src/type-feedback-vector.cc

Issue 633423002: Teach TurboFan to call vector-based ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patch One. 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
Index: src/type-feedback-vector.cc
diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc
index a3fe0707c7d578fbbbcf204dc51a68694308b271..82f6e454d33b15fc85d193e3cdab8bf1d7b14fd4 100644
--- a/src/type-feedback-vector.cc
+++ b/src/type-feedback-vector.cc
@@ -4,12 +4,30 @@
#include "src/v8.h"
+#include "src/base/functional.h"
#include "src/objects.h"
#include "src/type-feedback-vector-inl.h"
namespace v8 {
namespace internal {
+bool operator==(FeedbackNode const& lhs, FeedbackNode const& rhs) {
+ return lhs.slot() == rhs.slot() && lhs.vector().is_identical_to(rhs.vector());
+}
+
+
+bool operator!=(FeedbackNode const& lhs, FeedbackNode const& rhs) {
+ return !(lhs == rhs);
+}
+
+
+size_t hash_value(FeedbackNode const& p) {
+ // TODO(mvstanton): include the vector in the hash.
+ base::hash<int> h;
+ return h(p.slot());
+}
+
+
// static
Handle<TypeFeedbackVector> TypeFeedbackVector::Copy(
Isolate* isolate, Handle<TypeFeedbackVector> vector) {

Powered by Google App Engine
This is Rietveld 408576698