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

Unified Diff: src/compiler/types.h

Issue 2379573002: [turbofan] Type::Contains() and Constants() is unnecessary. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | src/compiler/types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/types.h
diff --git a/src/compiler/types.h b/src/compiler/types.h
index 2ebbe1886c74f3afaa14766c93dbce1f162d596f..ef5bec3f9de63ac179b3526a7499895179e9405a 100644
--- a/src/compiler/types.h
+++ b/src/compiler/types.h
@@ -513,10 +513,6 @@ class Type {
bool Maybe(Type* that);
bool Equals(Type* that) { return this->Is(that) && that->Is(this); }
- // Equivalent to Constant(val)->Is(this), but avoiding allocation.
- bool Contains(i::Object* val);
- bool Contains(i::Handle<i::Object> val) { return this->Contains(*val); }
-
// Inspection.
bool IsRange() { return IsKind(TypeBase::kRange); }
bool IsConstant() { return IsKind(TypeBase::kConstant); }
@@ -544,31 +540,6 @@ class Type {
int NumConstants();
Jarin 2016/09/28 13:27:02 Is this necessary?
mvstanton 2016/09/28 13:46:08 It gets used by tests, I'd prefer to keep it for n
- template <class T>
- class Iterator {
- public:
- bool Done() const { return index_ < 0; }
- i::Handle<T> Current();
- void Advance();
-
- private:
- friend class Type;
-
- Iterator() : index_(-1) {}
- explicit Iterator(Type* type) : type_(type), index_(-1) { Advance(); }
-
- inline bool matches(Type* type);
- inline Type* get_type();
-
- Type* type_;
- int index_;
- };
-
- Iterator<i::Object> Constants() {
- if (this->IsBitset()) return Iterator<i::Object>();
- return Iterator<i::Object>(this);
- }
-
// Printing.
void PrintTo(std::ostream& os);
« no previous file with comments | « no previous file | src/compiler/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698