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

Unified Diff: src/compiler/js-typed-lowering.cc

Issue 1071333004: [turbofan] JSUnaryNot and JSToBoolean have exactly 2 inputs, no need to trim. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-typed-lowering.cc
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
index 3d80a275f3ab07956da6c84c40f7d0abe13a7288..50ad918684816663261a91ea8910328de7f5e4c3 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -537,7 +537,7 @@ Reduction JSTypedLowering::ReduceJSUnaryNot(Node* node) {
// JSUnaryNot(x:number) => NumberEqual(x,#0)
node->set_op(simplified()->NumberEqual());
node->ReplaceInput(1, jsgraph()->ZeroConstant());
- node->TrimInputCount(2);
+ DCHECK_EQ(2, node->InputCount());
return Changed(node);
} else if (input_type->Is(Type::String())) {
// JSUnaryNot(x:string) => NumberEqual(x.length,#0)
@@ -549,8 +549,8 @@ Reduction JSTypedLowering::ReduceJSUnaryNot(Node* node) {
node->set_op(simplified()->NumberEqual());
node->ReplaceInput(0, length);
node->ReplaceInput(1, jsgraph()->ZeroConstant());
- node->TrimInputCount(2);
NodeProperties::ReplaceWithValue(node, node, length);
+ DCHECK_EQ(2, node->InputCount());
return Changed(node);
}
return NoChange();
@@ -580,7 +580,7 @@ Reduction JSTypedLowering::ReduceJSToBoolean(Node* node) {
node->set_op(simplified()->NumberLessThan());
node->ReplaceInput(0, jsgraph()->ZeroConstant());
node->ReplaceInput(1, length);
- node->TrimInputCount(2);
+ DCHECK_EQ(2, node->InputCount());
return Changed(node);
}
return NoChange();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698