OLD | NEW |
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/linkage.h" | 7 #include "src/compiler/linkage.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 #include "src/compiler/operator-properties.h" | 9 #include "src/compiler/operator-properties.h" |
10 #include "src/compiler/verifier.h" | 10 #include "src/compiler/verifier.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // static | 116 // static |
117 bool NodeProperties::IsControlEdge(Edge edge) { | 117 bool NodeProperties::IsControlEdge(Edge edge) { |
118 Node* const node = edge.from(); | 118 Node* const node = edge.from(); |
119 return IsInputRange(edge, FirstControlIndex(node), | 119 return IsInputRange(edge, FirstControlIndex(node), |
120 node->op()->ControlInputCount()); | 120 node->op()->ControlInputCount()); |
121 } | 121 } |
122 | 122 |
123 | 123 |
124 // static | 124 // static |
125 bool NodeProperties::IsExceptionalCall(Node* node) { | 125 bool NodeProperties::IsExceptionalCall(Node* node) { |
| 126 if (node->op()->HasProperty(Operator::kNoThrow)) return false; |
126 for (Edge const edge : node->use_edges()) { | 127 for (Edge const edge : node->use_edges()) { |
127 if (!NodeProperties::IsControlEdge(edge)) continue; | 128 if (!NodeProperties::IsControlEdge(edge)) continue; |
128 if (edge.from()->opcode() == IrOpcode::kIfException) return true; | 129 if (edge.from()->opcode() == IrOpcode::kIfException) return true; |
129 } | 130 } |
130 return false; | 131 return false; |
131 } | 132 } |
132 | 133 |
133 | 134 |
134 // static | 135 // static |
135 void NodeProperties::ReplaceValueInput(Node* node, Node* value, int index) { | 136 void NodeProperties::ReplaceValueInput(Node* node, Node* value, int index) { |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 // static | 408 // static |
408 bool NodeProperties::IsInputRange(Edge edge, int first, int num) { | 409 bool NodeProperties::IsInputRange(Edge edge, int first, int num) { |
409 if (num == 0) return false; | 410 if (num == 0) return false; |
410 int const index = edge.index(); | 411 int const index = edge.index(); |
411 return first <= index && index < first + num; | 412 return first <= index && index < first + num; |
412 } | 413 } |
413 | 414 |
414 } // namespace compiler | 415 } // namespace compiler |
415 } // namespace internal | 416 } // namespace internal |
416 } // namespace v8 | 417 } // namespace v8 |
OLD | NEW |