| Index: src/hydrogen-escape-analysis.cc
|
| diff --git a/src/hydrogen-escape-analysis.cc b/src/hydrogen-escape-analysis.cc
|
| index 0359678ef958bd2621ea4f207be4ca872673308e..311091b6d993ddf78f7b373309d60b6869a249e7 100644
|
| --- a/src/hydrogen-escape-analysis.cc
|
| +++ b/src/hydrogen-escape-analysis.cc
|
| @@ -65,7 +65,8 @@ void HEscapeAnalysisPhase::CollectCapturedValues() {
|
|
|
| HCapturedObject* HEscapeAnalysisPhase::NewState(HInstruction* previous) {
|
| Zone* zone = graph()->zone();
|
| - HCapturedObject* state = new(zone) HCapturedObject(number_of_values_, zone);
|
| + HCapturedObject* state =
|
| + new(zone) HCapturedObject(number_of_values_, number_of_objects_, zone);
|
| state->InsertAfter(previous);
|
| return state;
|
| }
|
| @@ -183,18 +184,9 @@ void HEscapeAnalysisPhase::AnalyzeDataFlow(HInstruction* allocate) {
|
| }
|
| break;
|
| }
|
| - case HValue::kSimulate: {
|
| - HSimulate* simulate = HSimulate::cast(instr);
|
| - // TODO(mstarzinger): This doesn't track deltas for values on the
|
| - // operand stack yet. Find a repro test case and fix this.
|
| - for (int i = 0; i < simulate->OperandCount(); i++) {
|
| - if (simulate->OperandAt(i) != allocate) continue;
|
| - simulate->SetOperandAt(i, state);
|
| - }
|
| - break;
|
| - }
|
| case HValue::kArgumentsObject:
|
| - case HValue::kCapturedObject: {
|
| + case HValue::kCapturedObject:
|
| + case HValue::kSimulate: {
|
| for (int i = 0; i < instr->OperandCount(); i++) {
|
| if (instr->OperandAt(i) != allocate) continue;
|
| instr->SetOperandAt(i, state);
|
| @@ -212,15 +204,8 @@ void HEscapeAnalysisPhase::AnalyzeDataFlow(HInstruction* allocate) {
|
| if (mapcheck->value() != allocate) continue;
|
| // TODO(mstarzinger): This approach breaks if the tracked map value
|
| // is not a HConstant. Find a repro test case and fix this.
|
| - for (HUseIterator it(mapcheck->uses()); !it.Done(); it.Advance()) {
|
| - if (!it.value()->IsLoadNamedField()) continue;
|
| - HLoadNamedField* load = HLoadNamedField::cast(it.value());
|
| - ASSERT(load->typecheck() == mapcheck);
|
| - load->ClearTypeCheck();
|
| - }
|
| - ASSERT(mapcheck->HasNoUses());
|
| -
|
| - mapcheck->DeleteAndReplaceWith(NULL);
|
| + ASSERT(mapcheck->ActualValue() == allocate);
|
| + mapcheck->DeleteAndReplaceWith(mapcheck->ActualValue());
|
| break;
|
| }
|
| default:
|
| @@ -281,6 +266,7 @@ void HEscapeAnalysisPhase::PerformScalarReplacement() {
|
| if (!allocate->size()->IsInteger32Constant()) continue;
|
| int size_in_bytes = allocate->size()->GetInteger32Constant();
|
| number_of_values_ = size_in_bytes / kPointerSize;
|
| + number_of_objects_++;
|
| block_states_.Clear();
|
|
|
| // Perform actual analysis steps.
|
|
|