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

Unified Diff: src/utils.h

Issue 1198983002: [turbofan] Revive the VectorSlotPair and also put feedback on JSCallFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Try to address compilation error. Created 5 years, 6 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/handles.cc ('k') | test/unittests/compiler/js-type-feedback-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils.h
diff --git a/src/utils.h b/src/utils.h
index dfdf384587e6293b3c316f90c5db4f01feb37428..582c5769936947698217cf5fd5ef219ab7e919eb 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -1047,17 +1047,19 @@ template <int dummy_parameter>
class VectorSlot {
public:
explicit VectorSlot(int id) : id_(id) {}
+
int ToInt() const { return id_; }
static VectorSlot Invalid() { return VectorSlot(kInvalidSlot); }
bool IsInvalid() const { return id_ == kInvalidSlot; }
VectorSlot next() const {
- DCHECK(id_ != kInvalidSlot);
+ DCHECK_NE(kInvalidSlot, id_);
return VectorSlot(id_ + 1);
}
- bool operator==(const VectorSlot& other) const { return id_ == other.id_; }
+ bool operator==(VectorSlot that) const { return this->id_ == that.id_; }
+ bool operator!=(VectorSlot that) const { return !(*this == that); }
private:
static const int kInvalidSlot = -1;
@@ -1066,6 +1068,12 @@ class VectorSlot {
};
+template <int dummy_parameter>
+size_t hash_value(VectorSlot<dummy_parameter> slot) {
+ return slot.ToInt();
+}
+
+
typedef VectorSlot<0> FeedbackVectorSlot;
typedef VectorSlot<1> FeedbackVectorICSlot;
« no previous file with comments | « src/handles.cc ('k') | test/unittests/compiler/js-type-feedback-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698