Revision: 23973
Author: [email protected]
Date: Tue Sep 16 12:17:40 2014 UTC
Log: Adapt some typed lowering unit tests after r23972.
[email protected]
TEST=cctest/test-js-typed-lowering
Review URL: https://codereview.chromium.org/574713002
https://code.google.com/p/v8/source/detail?r=23973
Modified:
/branches/bleeding_edge/test/cctest/compiler/test-js-typed-lowering.cc
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-js-typed-lowering.cc
Tue Sep 16 08:29:46 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/test-js-typed-lowering.cc
Tue Sep 16 12:17:40 2014 UTC
@@ -684,12 +684,14 @@
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(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 @@
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 @@
};
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 @@
}
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 @@
}
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);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.