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

Unified Diff: src/hydrogen-escape-analysis.cc

Issue 151163005: A64: Synchronize with r16356. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 | « src/hydrogen-escape-analysis.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « src/hydrogen-escape-analysis.h ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698