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

Side by Side Diff: src/compiler/escape-analysis.cc

Issue 2571793002: [turbofan] fixed escape analysis crash because of incomplete replacements (Closed)
Patch Set: missing file Created 4 years 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 unified diff | Download patch
« no previous file with comments | « src/compiler/escape-analysis.h ('k') | src/compiler/escape-analysis-reducer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/escape-analysis.h" 5 #include "src/compiler/escape-analysis.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/flags.h" 9 #include "src/base/flags.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 node->opcode() == IrOpcode::kAllocate) && 1579 node->opcode() == IrOpcode::kAllocate) &&
1580 IsVirtual(node)) { 1580 IsVirtual(node)) {
1581 if (VirtualObject* vobj = GetVirtualObject(virtual_states_[effect->id()], 1581 if (VirtualObject* vobj = GetVirtualObject(virtual_states_[effect->id()],
1582 ResolveReplacement(node))) { 1582 ResolveReplacement(node))) {
1583 if (Node* object_state = vobj->GetObjectState()) { 1583 if (Node* object_state = vobj->GetObjectState()) {
1584 return object_state; 1584 return object_state;
1585 } else { 1585 } else {
1586 cache_->fields().clear(); 1586 cache_->fields().clear();
1587 for (size_t i = 0; i < vobj->field_count(); ++i) { 1587 for (size_t i = 0; i < vobj->field_count(); ++i) {
1588 if (Node* field = vobj->GetField(i)) { 1588 if (Node* field = vobj->GetField(i)) {
1589 cache_->fields().push_back(field); 1589 cache_->fields().push_back(ResolveReplacement(field));
1590 } 1590 }
1591 } 1591 }
1592 int input_count = static_cast<int>(cache_->fields().size()); 1592 int input_count = static_cast<int>(cache_->fields().size());
1593 Node* new_object_state = 1593 Node* new_object_state =
1594 graph()->NewNode(common()->ObjectState(input_count), input_count, 1594 graph()->NewNode(common()->ObjectState(input_count), input_count,
1595 &cache_->fields().front()); 1595 &cache_->fields().front());
1596 vobj->SetObjectState(new_object_state); 1596 vobj->SetObjectState(new_object_state);
1597 TRACE( 1597 TRACE(
1598 "Creating object state #%d for vobj %p (from node #%d) at effect " 1598 "Creating object state #%d for vobj %p (from node #%d) at effect "
1599 "#%d\n", 1599 "#%d\n",
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 } 1685 }
1686 } 1686 }
1687 return false; 1687 return false;
1688 } 1688 }
1689 1689
1690 Graph* EscapeAnalysis::graph() const { return status_analysis_->graph(); } 1690 Graph* EscapeAnalysis::graph() const { return status_analysis_->graph(); }
1691 1691
1692 } // namespace compiler 1692 } // namespace compiler
1693 } // namespace internal 1693 } // namespace internal
1694 } // namespace v8 1694 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/escape-analysis.h ('k') | src/compiler/escape-analysis-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698