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

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

Issue 2041833002: [turbofan] Make FindFrameStateBefore handle dead paths. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-617567.js » ('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/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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 void NodeProperties::ChangeOp(Node* node, const Operator* new_op) { 232 void NodeProperties::ChangeOp(Node* node, const Operator* new_op) {
233 node->set_op(new_op); 233 node->set_op(new_op);
234 Verifier::VerifyNode(node); 234 Verifier::VerifyNode(node);
235 } 235 }
236 236
237 237
238 // static 238 // static
239 Node* NodeProperties::FindFrameStateBefore(Node* node) { 239 Node* NodeProperties::FindFrameStateBefore(Node* node) {
240 Node* effect = NodeProperties::GetEffectInput(node); 240 Node* effect = NodeProperties::GetEffectInput(node);
241 while (effect->opcode() != IrOpcode::kCheckpoint) { 241 while (effect->opcode() != IrOpcode::kCheckpoint) {
242 if (effect->opcode() == IrOpcode::kDead) return effect;
242 DCHECK_EQ(1, effect->op()->EffectInputCount()); 243 DCHECK_EQ(1, effect->op()->EffectInputCount());
243 effect = NodeProperties::GetEffectInput(effect); 244 effect = NodeProperties::GetEffectInput(effect);
244 } 245 }
245 Node* frame_state = GetFrameStateInput(effect, 0); 246 Node* frame_state = GetFrameStateInput(effect, 0);
246 return frame_state; 247 return frame_state;
247 } 248 }
248 249
249 // static 250 // static
250 Node* NodeProperties::FindProjection(Node* node, size_t projection_index) { 251 Node* NodeProperties::FindProjection(Node* node, size_t projection_index) {
251 for (auto use : node->uses()) { 252 for (auto use : node->uses()) {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 // static 425 // static
425 bool NodeProperties::IsInputRange(Edge edge, int first, int num) { 426 bool NodeProperties::IsInputRange(Edge edge, int first, int num) {
426 if (num == 0) return false; 427 if (num == 0) return false;
427 int const index = edge.index(); 428 int const index = edge.index();
428 return first <= index && index < first + num; 429 return first <= index && index < first + num;
429 } 430 }
430 431
431 } // namespace compiler 432 } // namespace compiler
432 } // namespace internal 433 } // namespace internal
433 } // namespace v8 434 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-617567.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698