Commit f87d19c4 authored by sander's avatar sander Committed by Commit bot

[crankshaft] Eliminate unnecessary ToNumber call

This is a fix for a regression that started ~6 months ago when
https://codereview.chromium.org/1757013002 landed. This patch will remove the
unnecessary Change/CallWithDescriptor/Change opcodes causing the regression.

BUG=v8:5373
R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2423923002
Cr-Commit-Position: refs/heads/master@{#40345}
parent e0b4b1b6
......@@ -110,6 +110,7 @@ Robert Mustacchi <rm@fingolfin.org>
Robert Nagy <robert.nagy@gmail.com>
Ryan Dahl <ry@tinyclouds.org>
Sakthipriyan Vairamani (thefourtheye) <thechargingvolcano@gmail.com>
Sander Mathijs van Veen <sander@leaningtech.com>
Sandro Santilli <strk@keybit.net>
Sanjoy Das <sanjoy@playingwithpointers.com>
Seo Sanghyeon <sanxiyn@gmail.com>
......
......@@ -2232,7 +2232,8 @@ HValue* HGraphBuilder::BuildNumberToString(HValue* object, AstType* type) {
}
HValue* HGraphBuilder::BuildToNumber(HValue* input) {
if (input->type().IsTaggedNumber()) {
if (input->type().IsTaggedNumber() ||
input->representation().IsSpecialization()) {
return input;
}
Callable callable = CodeFactory::ToNumber(isolate());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment