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

Unified Diff: src/hydrogen.cc

Issue 7471034: Fix deopts caused by misplaced COW checks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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 69a060df56ac1d5743ed71a82fe8b6d08aadd59f..78ea443e76519a2d0e9a2bf8ce0f0829c15c19c1 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -3911,7 +3911,7 @@ HInstruction* HGraphBuilder::BuildMonomorphicElementAccess(HValue* object,
HInstruction* mapcheck = AddInstruction(new(zone()) HCheckMap(object, map));
HInstruction* elements = AddInstruction(new(zone()) HLoadElements(object));
bool fast_double_elements = map->has_fast_double_elements();
- if (is_store && !fast_double_elements) {
+ if (is_store && map->has_fast_elements()) {
AddInstruction(new(zone()) HCheckMap(
elements, isolate()->factory()->fixed_array_map()));
}
@@ -4024,7 +4024,8 @@ HValue* HGraphBuilder::HandlePolymorphicElementAccess(HValue* object,
elements_kind == JSObject::FAST_DOUBLE_ELEMENTS;
if (is_store && !fast_double_elements) {
danno 2011/07/21 11:44:02 Should also be map->has_fast_elements()
Jakob Kummerow 2011/07/21 12:01:32 Except that we don't have an object called |map| a
AddInstruction(new(zone()) HCheckMap(
- elements, isolate()->factory()->fixed_array_map()));
+ elements, isolate()->factory()->fixed_array_map(),
+ elements_kind_branch));
}
HBasicBlock* if_jsarray = graph()->CreateBasicBlock();
HBasicBlock* if_fastobject = graph()->CreateBasicBlock();
« 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