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

Unified Diff: src/hydrogen.cc

Issue 15735012: Fix bogus deopt in BuildEmitDeepCopy for holey arrays. (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 | test/mjsunit/regress/regress-crbug-242924.js » ('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 097216ef830b9660042ee31ee2bb82a618ca5e23..4cf86136bdce2d612d254b1e8b57b234c76e57de 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -11012,9 +11012,11 @@ void HOptimizedGraphBuilder::BuildEmitDeepCopy(
AddInstruction(new(zone) HConstant(i, Representation::Integer32()));
HInstruction* value_instruction =
AddInstruction(new(zone) HLoadKeyed(
- boilerplate_elements, key_constant, NULL, kind));
- AddInstruction(new(zone) HStoreKeyed(
+ boilerplate_elements, key_constant, NULL, kind,
+ ALLOW_RETURN_HOLE));
+ HInstruction* store = AddInstruction(new(zone) HStoreKeyed(
object_elements, key_constant, value_instruction, kind));
+ store->ClearFlag(HValue::kDeoptimizeOnUndefined);
}
} else if (elements->IsFixedArray()) {
Handle<FixedArray> fast_elements = Handle<FixedArray>::cast(elements);
@@ -11037,7 +11039,8 @@ void HOptimizedGraphBuilder::BuildEmitDeepCopy(
} else {
HInstruction* value_instruction =
AddInstruction(new(zone) HLoadKeyed(
- boilerplate_elements, key_constant, NULL, kind));
+ boilerplate_elements, key_constant, NULL, kind,
+ ALLOW_RETURN_HOLE));
AddInstruction(new(zone) HStoreKeyed(
object_elements, key_constant, value_instruction, kind));
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-242924.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698