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

Unified Diff: src/hydrogen.cc

Issue 16126002: Always deoptimize on undefined if a double value implicitly gets converted. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index b473f58933d2975a9430e0368c16a88e02889d3a..6655187f677624c3efb685558433618fce8b07cf 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -3247,7 +3247,11 @@ void HGraph::MarkDeoptimizeOnUndefined() {
HPhi* phi = phi_list()->at(i);
if (phi->representation().IsDouble()) {
for (HUseIterator it(phi->uses()); !it.Done(); it.Advance()) {
- if (it.value()->CheckFlag(HValue::kDeoptimizeOnUndefined)) {
+ int use_index = it.index();
+ HValue* use_value = it.value();
+ Representation req = use_value->RequiredInputRepresentation(use_index);
+ if (!req.IsDouble() ||
+ use_value->CheckFlag(HValue::kDeoptimizeOnUndefined)) {
RecursivelyMarkPhiDeoptimizeOnUndefined(phi);
break;
}
@@ -3988,8 +3992,8 @@ bool HGraph::Optimize(SmartArrayPointer<char>* bailout_reason) {
// This must happen after inferring representations.
MergeRemovableSimulates();
- InsertRepresentationChanges();
MarkDeoptimizeOnUndefined();
+ InsertRepresentationChanges();
InitializeInferredTypes();
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698