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

Unified Diff: test/cctest/compiler/test-js-typed-lowering.cc

Issue 565493003: Fix typed lowering of ToBoolean on NaN input. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 6 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/types.h ('k') | test/mozilla/mozilla.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-js-typed-lowering.cc
diff --git a/test/cctest/compiler/test-js-typed-lowering.cc b/test/cctest/compiler/test-js-typed-lowering.cc
index 5259d7064870bd1f67b4a4b5d4cba634a8ac3904..8bdf67adbc71f4e6fd2577e90b33bf8b49d9af34 100644
--- a/test/cctest/compiler/test-js-typed-lowering.cc
+++ b/test/cctest/compiler/test-js-typed-lowering.cc
@@ -473,12 +473,12 @@ TEST(JSToBoolean) {
CHECK_EQ(IrOpcode::kParameter, r->opcode());
}
- { // ToBoolean(number)
- Node* r = R.ReduceUnop(op, Type::Number());
+ { // ToBoolean(ordered-number)
+ Node* r = R.ReduceUnop(op, Type::OrderedNumber());
CHECK_EQ(IrOpcode::kBooleanNot, r->opcode());
Node* i = r->InputAt(0);
CHECK_EQ(IrOpcode::kNumberEqual, i->opcode());
- // ToBoolean(number) => BooleanNot(NumberEqual(x, #0))
+ // ToBoolean(x:number) => BooleanNot(NumberEqual(x, #0))
}
{ // ToBoolean(string)
@@ -508,7 +508,7 @@ TEST(JSToBoolean_replacement) {
JSTypedLoweringTester R;
Type* types[] = {Type::Null(), Type::Undefined(),
- Type::Boolean(), Type::Number(),
+ Type::Boolean(), Type::OrderedNumber(),
Type::DetectableObject(), Type::Undetectable()};
for (size_t i = 0; i < arraysize(types); i++) {
@@ -523,7 +523,7 @@ TEST(JSToBoolean_replacement) {
if (types[i]->Is(Type::Boolean())) {
CHECK_EQ(n, r);
- } else if (types[i]->Is(Type::Number())) {
+ } else if (types[i]->Is(Type::OrderedNumber())) {
CHECK_EQ(IrOpcode::kBooleanNot, r->opcode());
} else {
CHECK_EQ(IrOpcode::kHeapConstant, r->opcode());
« no previous file with comments | « src/types.h ('k') | test/mozilla/mozilla.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698