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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 1727873003: [crankshaft] Fix deopt loop in String.fromCharCode on non-int32 inputs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/regress/regress-crbug-587068.js » ('j') | 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 33b0c27565d22ca57c4f05f32fa3c53858848e63..fda129fe9e6c5aa13e700ee1273ed5a927678152 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -8791,6 +8791,9 @@ bool HOptimizedGraphBuilder::TryInlineBuiltinMethodCall(
if (argument_count == 2) {
HValue* argument = Pop();
Drop(2); // Receiver and function.
+ argument = AddUncasted<HForceRepresentation>(
+ argument, Representation::Integer32());
+ argument->SetFlag(HValue::kTruncatingToInt32);
HInstruction* result = NewUncasted<HStringCharFromCode>(argument);
ast_context()->ReturnInstruction(result, expr->id());
return true;
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-587068.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698