| 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 06169f3ba6f2423639c86adfbbeb5a325e9654fd..3b8f3f982b986a1247139a5e96104f215c906b7c 100644
|
| --- a/test/cctest/compiler/test-js-constant-cache.cc
|
| +++ b/test/cctest/compiler/test-js-constant-cache.cc
|
| @@ -5,8 +5,6 @@
|
| #include "src/assembler.h"
|
| #include "src/compiler/js-graph.h"
|
| #include "src/compiler/node-properties.h"
|
| -#include "src/compiler/typer.h"
|
| -#include "src/types.h"
|
| #include "test/cctest/cctest.h"
|
| #include "test/cctest/compiler/value-helper.h"
|
|
|
| @@ -20,12 +18,10 @@ class JSCacheTesterHelper {
|
| : main_graph_(zone),
|
| main_common_(zone),
|
| main_javascript_(zone),
|
| - main_typer_(isolate, &main_graph_),
|
| main_machine_(zone) {}
|
| Graph main_graph_;
|
| CommonOperatorBuilder main_common_;
|
| JSOperatorBuilder main_javascript_;
|
| - Typer main_typer_;
|
| MachineOperatorBuilder main_machine_;
|
| };
|
|
|
| @@ -42,11 +38,8 @@ class JSConstantCacheTester : public HandleAndZoneScope,
|
| main_graph_.SetStart(main_graph_.NewNode(common()->Start(0)));
|
| main_graph_.SetEnd(
|
| main_graph_.NewNode(common()->End(1), main_graph_.start()));
|
| - main_typer_.Run();
|
| }
|
|
|
| - Type* TypeOf(Node* node) { return NodeProperties::GetType(node); }
|
| -
|
| Handle<HeapObject> handle(Node* node) {
|
| CHECK_EQ(IrOpcode::kHeapConstant, node->opcode());
|
| return OpParameter<Handle<HeapObject>>(node);
|
| @@ -68,15 +61,6 @@ TEST(ZeroConstant1) {
|
| CHECK_NE(zero, T.Constant(std::numeric_limits<double>::quiet_NaN()));
|
| CHECK_NE(zero, T.Float64Constant(0));
|
| CHECK_NE(zero, T.Int32Constant(0));
|
| -
|
| - Type* t = T.TypeOf(zero);
|
| -
|
| - CHECK(t->Is(Type::Number()));
|
| - CHECK(t->Is(Type::Integral32()));
|
| - CHECK(t->Is(Type::Signed32()));
|
| - CHECK(t->Is(Type::Unsigned32()));
|
| - CHECK(t->Is(Type::SignedSmall()));
|
| - CHECK(t->Is(Type::UnsignedSmall()));
|
| }
|
|
|
|
|
| @@ -90,16 +74,6 @@ TEST(MinusZeroConstant) {
|
| CHECK_EQ(minus_zero, T.Constant(-0.0));
|
| CHECK_NE(zero, minus_zero);
|
|
|
| - Type* t = T.TypeOf(minus_zero);
|
| -
|
| - CHECK(t->Is(Type::Number()));
|
| - CHECK(t->Is(Type::MinusZero()));
|
| - CHECK(!t->Is(Type::Integral32()));
|
| - CHECK(!t->Is(Type::Signed32()));
|
| - CHECK(!t->Is(Type::Unsigned32()));
|
| - CHECK(!t->Is(Type::SignedSmall()));
|
| - CHECK(!t->Is(Type::UnsignedSmall()));
|
| -
|
| double zero_value = OpParameter<double>(zero);
|
| double minus_zero_value = OpParameter<double>(minus_zero);
|
|
|
| @@ -122,15 +96,6 @@ TEST(ZeroConstant2) {
|
| CHECK_NE(zero, T.Constant(std::numeric_limits<double>::quiet_NaN()));
|
| CHECK_NE(zero, T.Float64Constant(0));
|
| CHECK_NE(zero, T.Int32Constant(0));
|
| -
|
| - Type* t = T.TypeOf(zero);
|
| -
|
| - CHECK(t->Is(Type::Number()));
|
| - CHECK(t->Is(Type::Integral32()));
|
| - CHECK(t->Is(Type::Signed32()));
|
| - CHECK(t->Is(Type::Unsigned32()));
|
| - CHECK(t->Is(Type::SignedSmall()));
|
| - CHECK(t->Is(Type::UnsignedSmall()));
|
| }
|
|
|
|
|
| @@ -147,15 +112,6 @@ TEST(OneConstant1) {
|
| CHECK_NE(one, T.Constant(std::numeric_limits<double>::quiet_NaN()));
|
| CHECK_NE(one, T.Float64Constant(1.0));
|
| CHECK_NE(one, T.Int32Constant(1));
|
| -
|
| - Type* t = T.TypeOf(one);
|
| -
|
| - CHECK(t->Is(Type::Number()));
|
| - CHECK(t->Is(Type::Integral32()));
|
| - CHECK(t->Is(Type::Signed32()));
|
| - CHECK(t->Is(Type::Unsigned32()));
|
| - CHECK(t->Is(Type::SignedSmall()));
|
| - CHECK(t->Is(Type::UnsignedSmall()));
|
| }
|
|
|
|
|
| @@ -172,15 +128,6 @@ TEST(OneConstant2) {
|
| CHECK_NE(one, T.Constant(std::numeric_limits<double>::quiet_NaN()));
|
| CHECK_NE(one, T.Float64Constant(1.0));
|
| CHECK_NE(one, T.Int32Constant(1));
|
| -
|
| - Type* t = T.TypeOf(one);
|
| -
|
| - CHECK(t->Is(Type::Number()));
|
| - CHECK(t->Is(Type::Integral32()));
|
| - CHECK(t->Is(Type::Signed32()));
|
| - CHECK(t->Is(Type::Unsigned32()));
|
| - CHECK(t->Is(Type::SignedSmall()));
|
| - CHECK(t->Is(Type::UnsignedSmall()));
|
| }
|
|
|
|
|
| @@ -227,17 +174,6 @@ TEST(CanonicalizingNumbers) {
|
| }
|
|
|
|
|
| -TEST(NumberTypes) {
|
| - JSConstantCacheTester T;
|
| -
|
| - FOR_FLOAT64_INPUTS(i) {
|
| - double value = *i;
|
| - Node* node = T.Constant(value);
|
| - CHECK(T.TypeOf(node)->Is(Type::Of(value, T.main_zone())));
|
| - }
|
| -}
|
| -
|
| -
|
| TEST(HeapNumbers) {
|
| JSConstantCacheTester T;
|
|
|
| @@ -277,21 +213,6 @@ TEST(OddballValues) {
|
| }
|
|
|
|
|
| -TEST(OddballTypes) {
|
| - JSConstantCacheTester T;
|
| -
|
| - CHECK(T.TypeOf(T.UndefinedConstant())->Is(Type::Undefined()));
|
| - // TODO(dcarney): figure this out.
|
| - // 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()));
|
| -}
|
| -
|
| -
|
| TEST(ExternalReferences) {
|
| // TODO(titzer): test canonicalization of external references.
|
| }
|
|
|