Reviewers: titzer,
Description:
Fix typed lowering of JSToBoolean on number inputs.
[email protected]
Please review this at https://codereview.chromium.org/533103002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+1, -4 lines):
M src/compiler/js-typed-lowering.cc
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();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.