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

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

Issue 523633002: Fix typed lowering of JSUnaryNot to work with graph reducer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased and comments fixed. Created 6 years, 4 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/compiler/js-generic-lowering.cc ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | 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 64663df9aec4d553d9ba8ae2fd018c08ec728b55..0cf53373f637645ce74f73cdd5a367e23c495d08 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -587,19 +587,19 @@ Reduction JSTypedLowering::Reduce(Node* node) {
Reduction result = ReduceJSToBooleanInput(node->InputAt(0));
Node* value;
if (result.Changed()) {
- // !x => BooleanNot(x)
+ // JSUnaryNot(x) => BooleanNot(x)
value =
graph()->NewNode(simplified()->BooleanNot(), result.replacement());
NodeProperties::ReplaceWithValue(node, value);
return Changed(value);
} else {
- // !x => BooleanNot(JSToBoolean(x))
+ // JSUnaryNot(x) => BooleanNot(JSToBoolean(x))
value = graph()->NewNode(simplified()->BooleanNot(), node);
node->set_op(javascript()->ToBoolean());
NodeProperties::ReplaceWithValue(node, value, node);
// Note: ReplaceUses() smashes all uses, so smash it back here.
value->ReplaceInput(0, node);
- return ReplaceWith(value);
+ return Changed(node);
}
}
case IrOpcode::kJSToBoolean:
« no previous file with comments | « src/compiler/js-generic-lowering.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