| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/js-inlining.h" | 5 #include "src/compiler/js-inlining.h" |
| 6 | 6 |
| 7 #include "src/ast.h" | 7 #include "src/ast.h" |
| 8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
| 9 #include "src/compiler/all-nodes.h" | 9 #include "src/compiler/all-nodes.h" |
| 10 #include "src/compiler/ast-graph-builder.h" | 10 #include "src/compiler/ast-graph-builder.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 NodeVector effects(jsgraph->zone()); | 135 NodeVector effects(jsgraph->zone()); |
| 136 // Iterate over all control flow predecessors, | 136 // Iterate over all control flow predecessors, |
| 137 // which must be return statements. | 137 // which must be return statements. |
| 138 for (Edge edge : final_merge->input_edges()) { | 138 for (Edge edge : final_merge->input_edges()) { |
| 139 Node* input = edge.to(); | 139 Node* input = edge.to(); |
| 140 switch (input->opcode()) { | 140 switch (input->opcode()) { |
| 141 case IrOpcode::kReturn: | 141 case IrOpcode::kReturn: |
| 142 values.push_back(NodeProperties::GetValueInput(input, 0)); | 142 values.push_back(NodeProperties::GetValueInput(input, 0)); |
| 143 effects.push_back(NodeProperties::GetEffectInput(input)); | 143 effects.push_back(NodeProperties::GetEffectInput(input)); |
| 144 edge.UpdateTo(NodeProperties::GetControlInput(input)); | 144 edge.UpdateTo(NodeProperties::GetControlInput(input)); |
| 145 input->RemoveAllInputs(); | 145 input->NullAllInputs(); |
| 146 break; | 146 break; |
| 147 default: | 147 default: |
| 148 UNREACHABLE(); | 148 UNREACHABLE(); |
| 149 break; | 149 break; |
| 150 } | 150 } |
| 151 } | 151 } |
| 152 values.push_back(final_merge); | 152 values.push_back(final_merge); |
| 153 effects.push_back(final_merge); | 153 effects.push_back(final_merge); |
| 154 Node* phi = | 154 Node* phi = |
| 155 graph->NewNode(op_phi, static_cast<int>(values.size()), &values.front()); | 155 graph->NewNode(op_phi, static_cast<int>(values.size()), &values.front()); |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 } | 374 } |
| 375 } | 375 } |
| 376 } | 376 } |
| 377 | 377 |
| 378 return inlinee.InlineAtCall(jsgraph_, node); | 378 return inlinee.InlineAtCall(jsgraph_, node); |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace compiler | 381 } // namespace compiler |
| 382 } // namespace internal | 382 } // namespace internal |
| 383 } // namespace v8 | 383 } // namespace v8 |
| OLD | NEW |