Adapt some typed lowering unit tests after r23972.

R=rossberg@chromium.org
TEST=cctest/test-js-typed-lowering

Review URL: https://codereview.chromium.org/574713002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 429924b7
......@@ -684,12 +684,14 @@ TEST(NumberComparison) {
for (size_t i = 0; i < arraysize(kJSTypes); i++) {
Type* t0 = kJSTypes[i];
if (t0->Is(Type::String())) continue; // skip Type::String
// Skip Type::String and Type::Receiver which might coerce into a string.
if (t0->Is(Type::String()) || t0->Is(Type::Receiver())) continue;
Node* p0 = R.Parameter(t0, 0);
for (size_t j = 0; j < arraysize(kJSTypes); j++) {
Type* t1 = kJSTypes[j];
if (t1->Is(Type::String())) continue; // skip Type::String
// Skip Type::String and Type::Receiver which might coerce into a string.
if (t1->Is(Type::String()) || t0->Is(Type::Receiver())) continue;
Node* p1 = R.Parameter(t1, 1);
for (size_t k = 0; k < arraysize(ops); k += 2) {
......@@ -746,7 +748,7 @@ TEST(MixedComparison1) {
TEST(ObjectComparison) {
JSTypedLoweringTester R;
Node* p0 = R.Parameter(Type::Object(), 0);
Node* p0 = R.Parameter(Type::Number(), 0);
Node* p1 = R.Parameter(Type::Object(), 1);
Node* cmp = R.Binop(R.javascript.LessThan(), p0, p1);
......@@ -762,14 +764,13 @@ TEST(ObjectComparison) {
Node* i0 = r->InputAt(0);
Node* i1 = r->InputAt(1);
CHECK_NE(p0, i0);
CHECK_EQ(p0, i0);
CHECK_NE(p1, i1);
CHECK_EQ(IrOpcode::kJSToNumber, i0->opcode());
CHECK_EQ(IrOpcode::kParameter, i0->opcode());
CHECK_EQ(IrOpcode::kJSToNumber, i1->opcode());
// Check effect chain is correct.
R.CheckEffectInput(R.start(), i0);
R.CheckEffectInput(i0, i1);
R.CheckEffectInput(R.start(), i1);
R.CheckEffectInput(i1, effect_use);
}
......@@ -1084,7 +1085,7 @@ TEST(OrderCompareEffects) {
};
for (size_t j = 0; j < arraysize(ops); j += 2) {
BinopEffectsTester B(ops[j], Type::Object(), Type::String());
BinopEffectsTester B(ops[j], Type::Boolean(), Type::String());
CHECK_EQ(ops[j + 1]->opcode(), B.result->op()->opcode());
Node* i0 = B.CheckConvertedInput(IrOpcode::kJSToNumber, 0, true);
......@@ -1099,7 +1100,7 @@ TEST(OrderCompareEffects) {
}
for (size_t j = 0; j < arraysize(ops); j += 2) {
BinopEffectsTester B(ops[j], Type::Number(), Type::Object());
BinopEffectsTester B(ops[j], Type::Number(), Type::Boolean());
Node* i0 = B.CheckConvertedInput(IrOpcode::kJSToNumber, 0, true);
Node* i1 = B.result->InputAt(1);
......@@ -1112,7 +1113,7 @@ TEST(OrderCompareEffects) {
}
for (size_t j = 0; j < arraysize(ops); j += 2) {
BinopEffectsTester B(ops[j], Type::Object(), Type::Number());
BinopEffectsTester B(ops[j], Type::Boolean(), Type::Number());
Node* i0 = B.result->InputAt(0);
Node* i1 = B.CheckConvertedInput(IrOpcode::kJSToNumber, 1, true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment