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

Side by Side Diff: src/compiler/typer.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/simplified-operator-reducer.cc ('k') | src/compiler/verifier.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/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 #include "src/compiler/graph-inl.h" 6 #include "src/compiler/graph-inl.h"
7 #include "src/compiler/graph-reducer.h" 7 #include "src/compiler/graph-reducer.h"
8 #include "src/compiler/js-operator.h" 8 #include "src/compiler/js-operator.h"
9 #include "src/compiler/node.h" 9 #include "src/compiler/node.h"
10 #include "src/compiler/node-properties-inl.h" 10 #include "src/compiler/node-properties-inl.h"
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 1431
1432 1432
1433 Bounds Typer::Visitor::TypeJSDebugger(Node* node) { 1433 Bounds Typer::Visitor::TypeJSDebugger(Node* node) {
1434 return Bounds::Unbounded(zone()); 1434 return Bounds::Unbounded(zone());
1435 } 1435 }
1436 1436
1437 1437
1438 // Simplified operators. 1438 // Simplified operators.
1439 1439
1440 1440
1441 Bounds Typer::Visitor::TypeAnyToBoolean(Node* node) {
1442 return TypeUnaryOp(node, ToBoolean);
1443 }
1444
1445
1441 Bounds Typer::Visitor::TypeBooleanNot(Node* node) { 1446 Bounds Typer::Visitor::TypeBooleanNot(Node* node) {
1442 return Bounds(Type::None(zone()), Type::Boolean(zone())); 1447 return Bounds(Type::None(zone()), Type::Boolean(zone()));
1443 } 1448 }
1444 1449
1445 1450
1446 Bounds Typer::Visitor::TypeBooleanToNumber(Node* node) { 1451 Bounds Typer::Visitor::TypeBooleanToNumber(Node* node) {
1447 return Bounds(Type::None(zone()), typer_->zero_or_one); 1452 return Bounds(Type::None(zone()), typer_->zero_or_one);
1448 } 1453 }
1449 1454
1450 1455
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
2097 // TODO(rossberg): Do we want some ClampedArray type to express this? 2102 // TODO(rossberg): Do we want some ClampedArray type to express this?
2098 break; 2103 break;
2099 } 2104 }
2100 } 2105 }
2101 return Type::Constant(value, zone()); 2106 return Type::Constant(value, zone());
2102 } 2107 }
2103 2108
2104 } // namespace compiler 2109 } // namespace compiler
2105 } // namespace internal 2110 } // namespace internal
2106 } // namespace v8 2111 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator-reducer.cc ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698