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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 2423923002: [crankshaft] Eliminate unnecessary ToNumber call (Closed)
Patch Set: [crankshaft] Eliminate unnecessary ToNumber call 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 | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index a2eb0ef7eee214339e3d06639d1148ef21bd25ff..09d1158b12a370cfb488204bab4dc2168c1959eb 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -2271,7 +2271,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());
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698