Chromium Code Reviews

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

Issue 1921483002: [turbofan] Wire in floating control during effect linearization phase. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 #include "src/compiler/graph.h" 6 #include "src/compiler/graph.h"
7 #include "src/compiler/js-operator.h" 7 #include "src/compiler/js-operator.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 #include "src/compiler/operator-properties.h" 10 #include "src/compiler/operator-properties.h"
(...skipping 140 matching lines...)
151 } 151 }
152 152
153 153
154 // static 154 // static
155 void NodeProperties::ReplaceContextInput(Node* node, Node* context) { 155 void NodeProperties::ReplaceContextInput(Node* node, Node* context) {
156 node->ReplaceInput(FirstContextIndex(node), context); 156 node->ReplaceInput(FirstContextIndex(node), context);
157 } 157 }
158 158
159 159
160 // static 160 // static
161 void NodeProperties::ReplaceControlInput(Node* node, Node* control) { 161 void NodeProperties::ReplaceControlInput(Node* node, Node* control, int index) {
162 node->ReplaceInput(FirstControlIndex(node), control); 162 DCHECK(index < node->op()->ControlInputCount());
163 node->ReplaceInput(FirstControlIndex(node) + index, control);
163 } 164 }
164 165
165 166
166 // static 167 // static
167 void NodeProperties::ReplaceEffectInput(Node* node, Node* effect, int index) { 168 void NodeProperties::ReplaceEffectInput(Node* node, Node* effect, int index) {
168 DCHECK(index < node->op()->EffectInputCount()); 169 DCHECK(index < node->op()->EffectInputCount());
169 return node->ReplaceInput(FirstEffectIndex(node) + index, effect); 170 return node->ReplaceInput(FirstEffectIndex(node) + index, effect);
170 } 171 }
171 172
172 173
(...skipping 246 matching lines...)
419 // static 420 // static
420 bool NodeProperties::IsInputRange(Edge edge, int first, int num) { 421 bool NodeProperties::IsInputRange(Edge edge, int first, int num) {
421 if (num == 0) return false; 422 if (num == 0) return false;
422 int const index = edge.index(); 423 int const index = edge.index();
423 return first <= index && index < first + num; 424 return first <= index && index < first + num;
424 } 425 }
425 426
426 } // namespace compiler 427 } // namespace compiler
427 } // namespace internal 428 } // namespace internal
428 } // namespace v8 429 } // namespace v8
OLDNEW

Powered by Google App Engine