Index: src/hydrogen-environment-liveness.cc |
diff --git a/src/hydrogen-environment-liveness.cc b/src/hydrogen-environment-liveness.cc |
index d7501ac49e6fd2b519a1471a1f6d88543410d16d..d37731f12d9379c52a5b739cf682a9ad8b434d38 100644 |
--- a/src/hydrogen-environment-liveness.cc |
+++ b/src/hydrogen-environment-liveness.cc |
@@ -84,8 +84,10 @@ void HEnvironmentLivenessAnalysisPhase::ZapEnvironmentSlotsInSuccessors( |
} |
HSimulate* simulate = first_simulate_.at(successor_id); |
if (simulate == NULL) continue; |
- ASSERT(simulate->closure().is_identical_to( |
- block->last_environment()->closure())); |
+ { AllowHandleDereference locked; |
+ ASSERT(simulate->closure().is_identical_to( |
+ block->last_environment()->closure())); |
+ } |
ZapEnvironmentSlot(i, simulate); |
} |
} |
@@ -97,7 +99,9 @@ void HEnvironmentLivenessAnalysisPhase::ZapEnvironmentSlotsForInstruction( |
if (!marker->CheckFlag(HValue::kEndsLiveRange)) return; |
HSimulate* simulate = marker->next_simulate(); |
if (simulate != NULL) { |
- ASSERT(simulate->closure().is_identical_to(marker->closure())); |
+ { AllowHandleDereference locked; |
+ ASSERT(simulate->closure().is_identical_to(marker->closure())); |
+ } |
ZapEnvironmentSlot(marker->index(), simulate); |
} |
} |
@@ -227,11 +231,18 @@ void HEnvironmentLivenessAnalysisPhase::Run() { |
// Analysis finished. Zap dead environment slots. |
for (int i = 0; i < markers_.length(); ++i) { |
+ // Acquire relocation lock to dereference for assertion. |
+#ifdef DEBUG |
+ Heap::RelocationLock for_heap_access(isolate()->heap()); |
Hannes Payer (out of office)
2014/03/27 17:16:20
what about moving that locking code to where it is
Yang
2014/03/28 08:27:40
I refactored the handle comparison.
|
+#endif |
ZapEnvironmentSlotsForInstruction(markers_[i]); |
} |
for (int block_id = block_count_ - 1; block_id >= 0; --block_id) { |
HBasicBlock* block = graph()->blocks()->at(block_id); |
UpdateLivenessAtBlockEnd(block, &live); |
+#ifdef DEBUG |
+ Heap::RelocationLock for_heap_access(isolate()->heap()); |
Hannes Payer (out of office)
2014/03/27 17:16:20
what about moving that locking code to where it is
|
+#endif |
ZapEnvironmentSlotsInSuccessors(block, &live); |
} |