Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 97e95e906f03d5126cc5cab9cc17068c1f9f0343..29426236e53bd43453b9c44ebc367faaef8fa889 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -7689,10 +7689,12 @@ HValue* HOptimizedGraphBuilder::HandlePolymorphicElementAccess( |
} |
*has_side_effects |= access->HasObservableSideEffects(); |
+ // The caller will use has_side_effects and add correct Simulate. |
+ access->SetFlag(HValue::kHasNoObservableSideEffects); |
if (position != -1) { |
access->set_position(position); |
} |
- if_jsarray->Goto(join); |
+ if_jsarray->GotoNoSimulate(join); |
set_current_block(if_fastobject); |
length = AddInstruction(new(zone()) HFixedArrayBaseLength(elements)); |
@@ -7712,18 +7714,19 @@ HValue* HOptimizedGraphBuilder::HandlePolymorphicElementAccess( |
elements_kind_branch, elements_kind, is_store)); |
} |
*has_side_effects |= access->HasObservableSideEffects(); |
+ // The caller will use has_side_effects and add correct Simulate. |
+ access->SetFlag(HValue::kHasNoObservableSideEffects); |
if (position != RelocInfo::kNoPosition) access->set_position(position); |
if (!is_store) { |
Push(access); |
} |
- current_block()->Goto(join); |
+ current_block()->GotoNoSimulate(join); |
set_current_block(if_false); |
} |
} |
// Deopt if none of the cases matched. |
current_block()->FinishExitWithDeoptimization(HDeoptimize::kNoUses); |
- join->SetJoinId(ast_id); |
set_current_block(join); |
return is_store ? NULL : Pop(); |
} |