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

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

Issue 882063002: [turbofan] Use unboxed doubles in range types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make tests less fragile. Created 5 years, 11 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') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | 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 7bf75122914b65b9856c22edf144286810c07bce..425011d4aec94a81cc6d4684de6baeb365c70ca4 100644
--- a/test/cctest/types-fuzz.h
+++ b/test/cctest/types-fuzz.h
@@ -101,8 +101,7 @@ class Types {
if (!IsMinusZero(x)) integers.push_back(isolate->factory()->NewNumber(x));
}
- Integer = Type::Range(isolate->factory()->NewNumber(-V8_INFINITY),
- isolate->factory()->NewNumber(+V8_INFINITY), region);
+ Integer = Type::Range(-V8_INFINITY, +V8_INFINITY, region);
NumberArray = Type::Array(Number, region);
StringArray = Type::Array(String, region);
@@ -184,7 +183,7 @@ class Types {
return Type::Constant(value, region_);
}
- TypeHandle Range(Handle<i::Object> min, Handle<i::Object> max) {
+ TypeHandle Range(double min, double max) {
return Type::Range(min, max, region_);
}
@@ -263,9 +262,9 @@ class Types {
case 3: { // range
int i = rng_->NextInt(static_cast<int>(integers.size()));
int j = rng_->NextInt(static_cast<int>(integers.size()));
- i::Handle<i::Object> min = integers[i];
- i::Handle<i::Object> max = integers[j];
- if (min->Number() > max->Number()) std::swap(min, max);
+ double min = integers[i]->Number();
+ double max = integers[j]->Number();
+ if (min > max) std::swap(min, max);
return Type::Range(min, max, region_);
}
case 4: { // context
« no previous file with comments | « test/cctest/test-types.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698