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

Unified Diff: test/cctest/test-types.cc

Issue 2305383002: [turbofan] Nuke the context 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.cc ('k') | test/cctest/types-fuzz.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-types.cc
diff --git a/test/cctest/test-types.cc b/test/cctest/test-types.cc
index df38e87f0505776099a619a7cd6d7fbf3d83a6e6..3d295ccd4e336962d13282ea491ec0791a7b1f4f 100644
--- a/test/cctest/test-types.cc
+++ b/test/cctest/test-types.cc
@@ -113,8 +113,7 @@ struct Tests {
Type* t = *it;
CHECK(1 ==
this->IsBitset(t) + t->IsConstant() + t->IsRange() +
- this->IsUnion(t) + t->IsArray() + t->IsFunction() +
- t->IsContext());
+ this->IsUnion(t) + t->IsArray() + t->IsFunction());
}
}
@@ -379,33 +378,6 @@ struct Tests {
}
}
- void Context() {
- // Constructor
- for (int i = 0; i < 20; ++i) {
- Type* type = T.Random();
- Type* context = T.Context(type);
- CHECK(context->IsContext());
- }
-
- // Attributes
- for (int i = 0; i < 20; ++i) {
- Type* type = T.Random();
- Type* context = T.Context(type);
- CheckEqual(type, context->AsContext()->Outer());
- }
-
- // Functionality & Injectivity: Context(T1) = Context(T2) iff T1 = T2
- for (int i = 0; i < 20; ++i) {
- for (int j = 0; j < 20; ++j) {
- Type* type1 = T.Random();
- Type* type2 = T.Random();
- Type* context1 = T.Context(type1);
- Type* context2 = T.Context(type2);
- CHECK(Equal(context1, context2) == Equal(type1, type2));
- }
- }
- }
-
void Array() {
// Constructor
for (int i = 0; i < 20; ++i) {
@@ -714,7 +686,6 @@ struct Tests {
(type1->IsConstant() && type2->IsRange()) ||
(this->IsBitset(type1) && type2->IsRange()) ||
(type1->IsRange() && type2->IsRange()) ||
- (type1->IsContext() && type2->IsContext()) ||
(type1->IsArray() && type2->IsArray()) ||
(type1->IsFunction() && type2->IsFunction()) ||
!type1->IsInhabited());
@@ -757,17 +728,6 @@ struct Tests {
}
}
- // Context(T1)->Is(Context(T2)) iff T1 = T2
- for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) {
- for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) {
- Type* outer1 = *it1;
- Type* outer2 = *it2;
- Type* type1 = T.Context(outer1);
- Type* type2 = T.Context(outer2);
- CHECK(type1->Is(type2) == outer1->Equals(outer2));
- }
- }
-
// Array(T1)->Is(Array(T2)) iff T1 = T2
for (TypeIterator it1 = T.types.begin(); it1 != T.types.end(); ++it1) {
for (TypeIterator it2 = T.types.begin(); it2 != T.types.end(); ++it2) {
« no previous file with comments | « src/types.cc ('k') | test/cctest/types-fuzz.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698