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

Side by Side Diff: src/compiler/verifier.cc

Issue 800833003: [turbofan] Correctify JSToBoolean lowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Improve simplified lowering. Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/compiler/typer.cc ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/verifier.h" 5 #include "src/compiler/verifier.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <queue> 8 #include <queue>
9 #include <sstream> 9 #include <sstream>
10 #include <string> 10 #include <string>
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 case IrOpcode::kJSCallFunction: 475 case IrOpcode::kJSCallFunction:
476 case IrOpcode::kJSCallRuntime: 476 case IrOpcode::kJSCallRuntime:
477 case IrOpcode::kJSYield: 477 case IrOpcode::kJSYield:
478 case IrOpcode::kJSDebugger: 478 case IrOpcode::kJSDebugger:
479 // Type can be anything. 479 // Type can be anything.
480 CheckUpperIs(node, Type::Any()); 480 CheckUpperIs(node, Type::Any());
481 break; 481 break;
482 482
483 // Simplified operators 483 // Simplified operators
484 // ------------------------------- 484 // -------------------------------
485 case IrOpcode::kAnyToBoolean:
486 // Type is Boolean.
487 CheckUpperIs(node, Type::Boolean());
488 break;
485 case IrOpcode::kBooleanNot: 489 case IrOpcode::kBooleanNot:
486 // Boolean -> Boolean 490 // Boolean -> Boolean
487 CheckValueInputIs(node, 0, Type::Boolean()); 491 CheckValueInputIs(node, 0, Type::Boolean());
488 CheckUpperIs(node, Type::Boolean()); 492 CheckUpperIs(node, Type::Boolean());
489 break; 493 break;
490 case IrOpcode::kBooleanToNumber: 494 case IrOpcode::kBooleanToNumber:
491 // Boolean -> Number 495 // Boolean -> Number
492 CheckValueInputIs(node, 0, Type::Boolean()); 496 CheckValueInputIs(node, 0, Type::Boolean());
493 CheckUpperIs(node, Type::Number()); 497 CheckUpperIs(node, Type::Number());
494 break; 498 break;
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 // Check inputs for all nodes in the block. 979 // Check inputs for all nodes in the block.
976 for (size_t i = 0; i < block->NodeCount(); i++) { 980 for (size_t i = 0; i < block->NodeCount(); i++) {
977 Node* node = block->NodeAt(i); 981 Node* node = block->NodeAt(i);
978 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); 982 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1);
979 } 983 }
980 } 984 }
981 } 985 }
982 } 986 }
983 } 987 }
984 } // namespace v8::internal::compiler 988 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/typer.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