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

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

Issue 533103002: Fix typed lowering of JSToBoolean on number inputs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Extend test to cover this case. 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
Index: src/compiler/js-typed-lowering.cc
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
index 6fad5ab6033527d76d069295c7c7c8e81f95dc1f..772ab0e082a410d28c33e20902e3098726c0dab0 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -491,10 +491,7 @@ Reduction JSTypedLowering::ReduceJSToBooleanInput(Node* input) {
Node* cmp = graph()->NewNode(simplified()->NumberEqual(), input,
jsgraph()->ZeroConstant());
Node* inv = graph()->NewNode(simplified()->BooleanNot(), cmp);
- ReplaceEagerly(input, inv);
- // TODO(titzer): Ugly. ReplaceEagerly smashes all uses. Smash it back here.
- cmp->ReplaceInput(0, input);
- return Changed(inv);
+ return ReplaceWith(inv);
}
// TODO(turbofan): js-typed-lowering of ToBoolean(string)
return NoChange();
« no previous file with comments | « no previous file | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | test/cctest/compiler/test-js-typed-lowering.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698