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

Unified Diff: test/cctest/types-fuzz.h

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 | « test/cctest/test-types.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/types-fuzz.h
diff --git a/test/cctest/types-fuzz.h b/test/cctest/types-fuzz.h
index ae73da78d06db0618a00b907cf2ef4a12a4f07de..b6d131d0367a55635bee4361eff0a18d8b6ddb6c 100644
--- a/test/cctest/types-fuzz.h
+++ b/test/cctest/types-fuzz.h
@@ -89,15 +89,6 @@ class Types {
Integer = Type::Range(-V8_INFINITY, +V8_INFINITY, zone);
- NumberArray = Type::Array(Number, zone);
- StringArray = Type::Array(String, zone);
- AnyArray = Type::Array(Any, zone);
-
- SignedFunction1 = Type::Function(SignedSmall, SignedSmall, zone);
- NumberFunction1 = Type::Function(Number, Number, zone);
- NumberFunction2 = Type::Function(Number, Number, Number, zone);
- MethodFunction = Type::Function(String, Object, 0, zone);
-
for (int i = 0; i < 30; ++i) {
types.push_back(Fuzz());
}
@@ -131,15 +122,6 @@ class Types {
Type* Integer;
- Type* NumberArray;
- Type* StringArray;
- Type* AnyArray;
-
- Type* SignedFunction1;
- Type* NumberFunction1;
- Type* NumberFunction2;
- Type* MethodFunction;
-
typedef std::vector<Type*> TypeVector;
typedef std::vector<Handle<i::Object> > ValueVector;
@@ -155,22 +137,6 @@ class Types {
Type* Range(double min, double max) { return Type::Range(min, max, zone_); }
- Type* Array1(Type* element) { return Type::Array(element, zone_); }
-
- Type* Function0(Type* result, Type* receiver) {
- return Type::Function(result, receiver, 0, zone_);
- }
-
- Type* Function1(Type* result, Type* receiver, Type* arg) {
- Type* type = Type::Function(result, receiver, 1, zone_);
- type->AsFunction()->InitParameter(0, arg);
- return type;
- }
-
- Type* Function2(Type* result, Type* arg1, Type* arg2) {
- return Type::Function(result, arg1, arg2, zone_);
- }
-
Type* Union(Type* t1, Type* t2) { return Type::Union(t1, t2, zone_); }
Type* Intersect(Type* t1, Type* t2) { return Type::Intersect(t1, t2, zone_); }
@@ -220,22 +186,6 @@ class Types {
if (min > max) std::swap(min, max);
return Type::Range(min, max, zone_);
}
- case 3: { // array
- Type* element = Fuzz(depth / 2);
- return Type::Array(element, zone_);
- }
- case 4:
- case 5: { // function
- Type* result = Fuzz(depth / 2);
- Type* receiver = Fuzz(depth / 2);
- int arity = rng_->NextInt(3);
- Type* type = Type::Function(result, receiver, arity, zone_);
- for (int i = 0; i < type->AsFunction()->Arity(); ++i) {
- Type* parameter = Fuzz(depth / 2);
- type->AsFunction()->InitParameter(i, parameter);
- }
- return type;
- }
default: { // union
int n = rng_->NextInt(10);
Type* type = None;
« no previous file with comments | « test/cctest/test-types.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698