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

Unified Diff: test/unittests/compiler/typer-unittest.cc

Issue 2381523002: [Turbofan] Introduce OtherNumberConstant. (Closed)
Patch Set: Better DCHECK in HeapConstantType(). Created 4 years, 2 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/unittests/compiler/typed-optimization-unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/typer-unittest.cc
diff --git a/test/unittests/compiler/typer-unittest.cc b/test/unittests/compiler/typer-unittest.cc
index ca5c1cae455be896be8bd8f735a67fca96c396f7..1e860ae1ad4a7fa41971b955eadc360dc48c1143 100644
--- a/test/unittests/compiler/typer-unittest.cc
+++ b/test/unittests/compiler/typer-unittest.cc
@@ -135,7 +135,7 @@ class TyperTest : public TypedGraphTest {
for (int x1 = lmin; x1 < lmin + width; x1++) {
for (int x2 = rmin; x2 < rmin + width; x2++) {
double result_value = opfun(x1, x2);
- Type* result_type = Type::Constant(
+ Type* result_type = Type::NewConstant(
isolate()->factory()->NewNumber(result_value), zone());
EXPECT_TRUE(result_type->Is(expected_type));
}
@@ -156,7 +156,7 @@ class TyperTest : public TypedGraphTest {
double x1 = RandomInt(r1->AsRange());
double x2 = RandomInt(r2->AsRange());
double result_value = opfun(x1, x2);
- Type* result_type = Type::Constant(
+ Type* result_type = Type::NewConstant(
isolate()->factory()->NewNumber(result_value), zone());
EXPECT_TRUE(result_type->Is(expected_type));
}
@@ -173,10 +173,10 @@ class TyperTest : public TypedGraphTest {
double x1 = RandomInt(r1->AsRange());
double x2 = RandomInt(r2->AsRange());
bool result_value = opfun(x1, x2);
- Type* result_type =
- Type::Constant(result_value ? isolate()->factory()->true_value()
- : isolate()->factory()->false_value(),
- zone());
+ Type* result_type = Type::NewConstant(
+ result_value ? isolate()->factory()->true_value()
+ : isolate()->factory()->false_value(),
+ zone());
EXPECT_TRUE(result_type->Is(expected_type));
}
}
@@ -192,7 +192,7 @@ class TyperTest : public TypedGraphTest {
int32_t x1 = static_cast<int32_t>(RandomInt(r1->AsRange()));
int32_t x2 = static_cast<int32_t>(RandomInt(r2->AsRange()));
double result_value = opfun(x1, x2);
- Type* result_type = Type::Constant(
+ Type* result_type = Type::NewConstant(
isolate()->factory()->NewNumber(result_value), zone());
EXPECT_TRUE(result_type->Is(expected_type));
}
« no previous file with comments | « test/unittests/compiler/typed-optimization-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698