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

Side by Side Diff: src/compiler/node.cc

Issue 540253003: [turbofan] Nodes are killed by resetting all their inputs to zero. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Nit Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/node.h ('k') | src/compiler/value-numbering-reducer.cc » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/node.h" 5 #include "src/compiler/node.h"
6 6
7 #include "src/compiler/generic-node-inl.h" 7 #include "src/compiler/generic-node-inl.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
11 namespace compiler { 11 namespace compiler {
12 12
13 void Node::Kill() { 13 void Node::Kill() {
14 DCHECK_NOT_NULL(op()); 14 DCHECK_NOT_NULL(op());
15 RemoveAllInputs(); 15 RemoveAllInputs();
16 DCHECK(uses().empty()); 16 DCHECK(uses().empty());
17 set_op(NULL);
18 } 17 }
19 18
20 19
21 void Node::CollectProjections(NodeVector* projections) { 20 void Node::CollectProjections(NodeVector* projections) {
22 for (size_t i = 0; i < projections->size(); i++) { 21 for (size_t i = 0; i < projections->size(); i++) {
23 (*projections)[i] = NULL; 22 (*projections)[i] = NULL;
24 } 23 }
25 for (UseIter i = uses().begin(); i != uses().end(); ++i) { 24 for (UseIter i = uses().begin(); i != uses().end(); ++i) {
26 if ((*i)->opcode() != IrOpcode::kProjection) continue; 25 if ((*i)->opcode() != IrOpcode::kProjection) continue;
27 int32_t index = OpParameter<int32_t>(*i); 26 int32_t index = OpParameter<int32_t>(*i);
(...skipping 28 matching lines...) Expand all
56 os << n.InputAt(i)->id(); 55 os << n.InputAt(i)->id();
57 } 56 }
58 os << ")"; 57 os << ")";
59 } 58 }
60 return os; 59 return os;
61 } 60 }
62 61
63 } // namespace compiler 62 } // namespace compiler
64 } // namespace internal 63 } // namespace internal
65 } // namespace v8 64 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/node.h ('k') | src/compiler/value-numbering-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698