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

Unified Diff: src/utils.h

Issue 650073002: vector-based ICs did not update type feedback counts correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. 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/type-info.cc ('k') | src/x64/code-stubs-x64.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 5c58ff8e608d03df56ea9b1b082dffc726d95ec8..58bcb3ae746c4955e8b7957ccdc07527a1a57c26 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -951,21 +951,22 @@ class TypeFeedbackId {
};
-class FeedbackVectorSlot {
+template <int dummy_parameter>
+class VectorSlot {
public:
- explicit FeedbackVectorSlot(int id) : id_(id) {}
+ explicit VectorSlot(int id) : id_(id) {}
int ToInt() const { return id_; }
- static FeedbackVectorSlot Invalid() {
- return FeedbackVectorSlot(kInvalidSlot);
- }
+ static VectorSlot Invalid() { return VectorSlot(kInvalidSlot); }
bool IsInvalid() const { return id_ == kInvalidSlot; }
- FeedbackVectorSlot next() const {
+ VectorSlot next() const {
DCHECK(id_ != kInvalidSlot);
- return FeedbackVectorSlot(id_ + 1);
+ return VectorSlot(id_ + 1);
}
+ bool operator==(const VectorSlot& other) const { return id_ == other.id_; }
+
private:
static const int kInvalidSlot = -1;
@@ -973,6 +974,10 @@ class FeedbackVectorSlot {
};
+typedef VectorSlot<0> FeedbackVectorSlot;
+typedef VectorSlot<1> FeedbackVectorICSlot;
+
+
class BailoutId {
public:
explicit BailoutId(int id) : id_(id) { }
« no previous file with comments | « src/type-info.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698