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

Unified Diff: src/compiler/js-builtin-reducer.cc

Issue 2432143002: [turbofan] Fix invalid Number.parseInt inlining. (Closed)
Patch Set: Fix unittests. Created 4 years, 2 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 | test/mjsunit/compiler/regress-5538.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-builtin-reducer.cc
diff --git a/src/compiler/js-builtin-reducer.cc b/src/compiler/js-builtin-reducer.cc
index b1acd85b5827cf17a2c13dbfb4b2fc9fc8874894..103bb09947103a36012daf7578da944e4a03e799 100644
--- a/src/compiler/js-builtin-reducer.cc
+++ b/src/compiler/js-builtin-reducer.cc
@@ -887,11 +887,10 @@ Reduction JSBuiltinReducer::ReduceNumberParseInt(Node* node) {
r.InputsMatchTwo(type_cache_.kSafeInteger,
type_cache_.kZeroOrUndefined) ||
r.InputsMatchTwo(type_cache_.kSafeInteger, type_cache_.kTenOrUndefined)) {
- // Number.parseInt(a:safe-integer) -> NumberToInt32(a)
- // Number.parseInt(a:safe-integer,b:#0\/undefined) -> NumberToInt32(a)
- // Number.parseInt(a:safe-integer,b:#10\/undefined) -> NumberToInt32(a)
- Node* input = r.GetJSCallInput(0);
- Node* value = graph()->NewNode(simplified()->NumberToInt32(), input);
+ // Number.parseInt(a:safe-integer) -> a
+ // Number.parseInt(a:safe-integer,b:#0\/undefined) -> a
+ // Number.parseInt(a:safe-integer,b:#10\/undefined) -> a
+ Node* value = r.GetJSCallInput(0);
return Replace(value);
}
return NoChange();
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-5538.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698