Chromium Code Reviews| Index: src/hydrogen-environment-liveness.cc |
| diff --git a/src/hydrogen-environment-liveness.cc b/src/hydrogen-environment-liveness.cc |
| index d7501ac49e6fd2b519a1471a1f6d88543410d16d..cc80880f2eb48491273f61519cc3cd60a2715380 100644 |
| --- a/src/hydrogen-environment-liveness.cc |
| +++ b/src/hydrogen-environment-liveness.cc |
| @@ -84,8 +84,8 @@ void HEnvironmentLivenessAnalysisPhase::ZapEnvironmentSlotsInSuccessors( |
| } |
| HSimulate* simulate = first_simulate_.at(successor_id); |
| if (simulate == NULL) continue; |
| - ASSERT(simulate->closure().is_identical_to( |
| - block->last_environment()->closure())); |
| + ASSERT(VerifyClosures(simulate->closure(), |
| + block->last_environment()->closure())); |
|
Hannes Payer (out of office)
2014/03/28 08:32:19
+4 spaces indent
|
| ZapEnvironmentSlot(i, simulate); |
| } |
| } |
| @@ -97,7 +97,7 @@ 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())); |
| + ASSERT(VerifyClosures(simulate->closure(), marker->closure())); |
| ZapEnvironmentSlot(marker->index(), simulate); |
| } |
| } |
| @@ -227,6 +227,7 @@ void HEnvironmentLivenessAnalysisPhase::Run() { |
| // Analysis finished. Zap dead environment slots. |
| for (int i = 0; i < markers_.length(); ++i) { |
| + // Acquire relocation lock to dereference for assertion. |
|
Hannes Payer (out of office)
2014/03/28 08:32:19
remove this comments
|
| ZapEnvironmentSlotsForInstruction(markers_[i]); |
| } |
| for (int block_id = block_count_ - 1; block_id >= 0; --block_id) { |
| @@ -241,4 +242,14 @@ void HEnvironmentLivenessAnalysisPhase::Run() { |
| } |
| } |
| + |
| +#ifdef DEBUG |
| +bool HEnvironmentLivenessAnalysisPhase::VerifyClosures( |
| + Handle<JSFunction> a, Handle<JSFunction> b) { |
| + Heap::RelocationLock for_heap_access(isolate()->heap()); |
| + AllowHandleDereference for_verification; |
| + return a.is_identical_to(b); |
| +} |
| +#endif |
| + |
| } } // namespace v8::internal |