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

Unified Diff: test/cctest/compiler/test-typer.cc

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/compiler/test-simplified-lowering.cc ('k') | test/cctest/test-types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-typer.cc
diff --git a/test/cctest/compiler/test-typer.cc b/test/cctest/compiler/test-typer.cc
index eb5e540881c0e4a331a3f7619eb1bf9fa9a42c2f..d6aaba5927a384df2b7852c454dd34085874750d 100644
--- a/test/cctest/compiler/test-typer.cc
+++ b/test/cctest/compiler/test-typer.cc
@@ -87,11 +87,8 @@ class TyperTester : public HandleAndZoneScope, public GraphAndBuilders {
}
Type* NewRange(double i, double j) {
- Factory* f = isolate()->factory();
- i::Handle<i::Object> min = f->NewNumber(i);
- i::Handle<i::Object> max = f->NewNumber(j);
- if (min->Number() > max->Number()) std::swap(min, max);
- return Type::Range(min, max, main_zone());
+ if (i > j) std::swap(i, j);
+ return Type::Range(i, j, main_zone());
}
double RandomInt(double min, double max) {
@@ -113,7 +110,7 @@ class TyperTester : public HandleAndZoneScope, public GraphAndBuilders {
}
double RandomInt(Type::RangeType* range) {
- return RandomInt(range->Min()->Number(), range->Max()->Number());
+ return RandomInt(range->Min(), range->Max());
}
// Careful, this function runs O(max_width^5) trials.
« no previous file with comments | « test/cctest/compiler/test-simplified-lowering.cc ('k') | test/cctest/test-types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698