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

Unified Diff: src/types.cc

Issue 2310923002: [turbofan] Also nuke Array and Function types. (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 | « src/types.h ('k') | test/cctest/test-types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/types.cc
diff --git a/src/types.cc b/src/types.cc
index 30434bfe3606153f5c5e4130f1d6f98949b68b18..d2b5e2b8e13cc2b75ecacf28d1bfbe76b0f470c9 100644
--- a/src/types.cc
+++ b/src/types.cc
@@ -146,8 +146,6 @@ Type::bitset BitsetType::Lub(Type* type) {
}
if (type->IsConstant()) return type->AsConstant()->Lub();
if (type->IsRange()) return type->AsRange()->Lub();
- if (type->IsArray()) return kOtherObject;
- if (type->IsFunction()) return kFunction;
if (type->IsTuple()) return kOtherInternal;
UNREACHABLE();
return kNone;
@@ -411,24 +409,6 @@ bool Type::SimplyEquals(Type* that) {
return that->IsConstant()
&& *this->AsConstant()->Value() == *that->AsConstant()->Value();
}
- if (this->IsArray()) {
- return that->IsArray()
- && this->AsArray()->Element()->Equals(that->AsArray()->Element());
- }
- if (this->IsFunction()) {
- if (!that->IsFunction()) return false;
- FunctionType* this_fun = this->AsFunction();
- FunctionType* that_fun = that->AsFunction();
- if (this_fun->Arity() != that_fun->Arity() ||
- !this_fun->Result()->Equals(that_fun->Result()) ||
- !this_fun->Receiver()->Equals(that_fun->Receiver())) {
- return false;
- }
- for (int i = 0, n = this_fun->Arity(); i < n; ++i) {
- if (!this_fun->Parameter(i)->Equals(that_fun->Parameter(i))) return false;
- }
- return true;
- }
if (this->IsTuple()) {
if (!that->IsTuple()) return false;
TupleType* this_tuple = this->AsTuple();
@@ -1110,22 +1090,6 @@ void Type::PrintTo(std::ostream& os, PrintDimension dim) {
type_i->PrintTo(os, dim);
}
os << ")";
- } else if (this->IsArray()) {
- os << "Array(";
- AsArray()->Element()->PrintTo(os, dim);
- os << ")";
- } else if (this->IsFunction()) {
- if (!this->AsFunction()->Receiver()->IsAny()) {
- this->AsFunction()->Receiver()->PrintTo(os, dim);
- os << ".";
- }
- os << "(";
- for (int i = 0; i < this->AsFunction()->Arity(); ++i) {
- if (i > 0) os << ", ";
- this->AsFunction()->Parameter(i)->PrintTo(os, dim);
- }
- os << ")->";
- this->AsFunction()->Result()->PrintTo(os, dim);
} else if (this->IsTuple()) {
os << "<";
for (int i = 0, n = this->AsTuple()->Arity(); i < n; ++i) {
« no previous file with comments | « src/types.h ('k') | test/cctest/test-types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698