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

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

Issue 2139183002: [turbofan] Unify BooleanToNumber, StringToNumber and PlainPrimitiveToNumber. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | src/compiler/opcodes.h » ('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 985a31e7db80b671b21c80ca9b4fc884266c9fbc..ca88eb49f3590be9f637cd858021c5e12b1a93c7 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -928,14 +928,6 @@ Reduction JSTypedLowering::ReduceJSToNumberInput(Node* input) {
// JSToNumber(null) => #0
return Replace(jsgraph()->ZeroConstant());
}
- if (input_type->Is(Type::Boolean())) {
- // JSToNumber(x:boolean) => BooleanToNumber(x)
- return Replace(graph()->NewNode(simplified()->BooleanToNumber(), input));
- }
- if (input_type->Is(Type::String())) {
- // JSToNumber(x:string) => StringToNumber(x)
- return Replace(graph()->NewNode(simplified()->StringToNumber(), input));
- }
return NoChange();
}
« no previous file with comments | « no previous file | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698