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/compiler/test-js-constant-cache.cc

Issue 1348073002: [turbofan] Get rid of type lower bounds. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 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/compiler/verifier.cc ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-js-constant-cache.cc
diff --git a/test/cctest/compiler/test-js-constant-cache.cc b/test/cctest/compiler/test-js-constant-cache.cc
index f4120b050bef365e5a6326cc9a3870f1820fa08b..ce0c2241b778949ed460bf7c291a7b9320504e5c 100644
--- a/test/cctest/compiler/test-js-constant-cache.cc
+++ b/test/cctest/compiler/test-js-constant-cache.cc
@@ -45,7 +45,7 @@ class JSConstantCacheTester : public HandleAndZoneScope,
main_typer_.Run();
}
- Type* upper(Node* node) { return NodeProperties::GetBounds(node).upper; }
+ Type* TypeOf(Node* node) { return NodeProperties::GetType(node); }
Handle<HeapObject> handle(Node* node) {
CHECK_EQ(IrOpcode::kHeapConstant, node->opcode());
@@ -69,7 +69,7 @@ TEST(ZeroConstant1) {
CHECK_NE(zero, T.Float64Constant(0));
CHECK_NE(zero, T.Int32Constant(0));
- Type* t = T.upper(zero);
+ Type* t = T.TypeOf(zero);
CHECK(t->Is(Type::Number()));
CHECK(t->Is(Type::Integral32()));
@@ -90,7 +90,7 @@ TEST(MinusZeroConstant) {
CHECK_EQ(minus_zero, T.Constant(-0.0));
CHECK_NE(zero, minus_zero);
- Type* t = T.upper(minus_zero);
+ Type* t = T.TypeOf(minus_zero);
CHECK(t->Is(Type::Number()));
CHECK(t->Is(Type::MinusZero()));
@@ -123,7 +123,7 @@ TEST(ZeroConstant2) {
CHECK_NE(zero, T.Float64Constant(0));
CHECK_NE(zero, T.Int32Constant(0));
- Type* t = T.upper(zero);
+ Type* t = T.TypeOf(zero);
CHECK(t->Is(Type::Number()));
CHECK(t->Is(Type::Integral32()));
@@ -148,7 +148,7 @@ TEST(OneConstant1) {
CHECK_NE(one, T.Float64Constant(1.0));
CHECK_NE(one, T.Int32Constant(1));
- Type* t = T.upper(one);
+ Type* t = T.TypeOf(one);
CHECK(t->Is(Type::Number()));
CHECK(t->Is(Type::Integral32()));
@@ -173,7 +173,7 @@ TEST(OneConstant2) {
CHECK_NE(one, T.Float64Constant(1.0));
CHECK_NE(one, T.Int32Constant(1));
- Type* t = T.upper(one);
+ Type* t = T.TypeOf(one);
CHECK(t->Is(Type::Number()));
CHECK(t->Is(Type::Integral32()));
@@ -233,7 +233,7 @@ TEST(NumberTypes) {
FOR_FLOAT64_INPUTS(i) {
double value = *i;
Node* node = T.Constant(value);
- CHECK(T.upper(node)->Is(Type::Of(value, T.main_zone())));
+ CHECK(T.TypeOf(node)->Is(Type::Of(value, T.main_zone())));
}
}
@@ -280,15 +280,15 @@ TEST(OddballValues) {
TEST(OddballTypes) {
JSConstantCacheTester T;
- CHECK(T.upper(T.UndefinedConstant())->Is(Type::Undefined()));
+ CHECK(T.TypeOf(T.UndefinedConstant())->Is(Type::Undefined()));
// TODO(dcarney): figure this out.
- // CHECK(T.upper(T.TheHoleConstant())->Is(Type::Internal()));
- CHECK(T.upper(T.TrueConstant())->Is(Type::Boolean()));
- CHECK(T.upper(T.FalseConstant())->Is(Type::Boolean()));
- CHECK(T.upper(T.NullConstant())->Is(Type::Null()));
- CHECK(T.upper(T.ZeroConstant())->Is(Type::Number()));
- CHECK(T.upper(T.OneConstant())->Is(Type::Number()));
- CHECK(T.upper(T.NaNConstant())->Is(Type::NaN()));
+ // CHECK(T.TypeOf(T.TheHoleConstant())->Is(Type::Internal()));
+ CHECK(T.TypeOf(T.TrueConstant())->Is(Type::Boolean()));
+ CHECK(T.TypeOf(T.FalseConstant())->Is(Type::Boolean()));
+ CHECK(T.TypeOf(T.NullConstant())->Is(Type::Null()));
+ CHECK(T.TypeOf(T.ZeroConstant())->Is(Type::Number()));
+ CHECK(T.TypeOf(T.OneConstant())->Is(Type::Number()));
+ CHECK(T.TypeOf(T.NaNConstant())->Is(Type::NaN()));
}
« no previous file with comments | « src/compiler/verifier.cc ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698