| 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/ast-numbering.h" | 7 #include "src/ast/ast-numbering.h" |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 DCHECK_LE(index, inlinee_context_index); | 109 DCHECK_LE(index, inlinee_context_index); |
| 110 if (index < inliner_inputs && index < inlinee_new_target_index) { | 110 if (index < inliner_inputs && index < inlinee_new_target_index) { |
| 111 // There is an input from the call, and the index is a value | 111 // There is an input from the call, and the index is a value |
| 112 // projection but not the context, so rewire the input. | 112 // projection but not the context, so rewire the input. |
| 113 Replace(use, call->InputAt(index)); | 113 Replace(use, call->InputAt(index)); |
| 114 } else if (index == inlinee_new_target_index) { | 114 } else if (index == inlinee_new_target_index) { |
| 115 // The projection is requesting the new target value. | 115 // The projection is requesting the new target value. |
| 116 Replace(use, new_target); | 116 Replace(use, new_target); |
| 117 } else if (index == inlinee_arity_index) { | 117 } else if (index == inlinee_arity_index) { |
| 118 // The projection is requesting the number of arguments. | 118 // The projection is requesting the number of arguments. |
| 119 Replace(use, jsgraph()->Int32Constant(inliner_inputs - 2)); | 119 Replace(use, jsgraph()->Constant(inliner_inputs - 2)); |
| 120 } else if (index == inlinee_context_index) { | 120 } else if (index == inlinee_context_index) { |
| 121 // The projection is requesting the inlinee function context. | 121 // The projection is requesting the inlinee function context. |
| 122 Replace(use, context); | 122 Replace(use, context); |
| 123 } else { | 123 } else { |
| 124 // Call has fewer arguments than required, fill with undefined. | 124 // Call has fewer arguments than required, fill with undefined. |
| 125 Replace(use, jsgraph()->UndefinedConstant()); | 125 Replace(use, jsgraph()->UndefinedConstant()); |
| 126 } | 126 } |
| 127 break; | 127 break; |
| 128 } | 128 } |
| 129 default: | 129 default: |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 | 704 |
| 705 CommonOperatorBuilder* JSInliner::common() const { return jsgraph()->common(); } | 705 CommonOperatorBuilder* JSInliner::common() const { return jsgraph()->common(); } |
| 706 | 706 |
| 707 SimplifiedOperatorBuilder* JSInliner::simplified() const { | 707 SimplifiedOperatorBuilder* JSInliner::simplified() const { |
| 708 return jsgraph()->simplified(); | 708 return jsgraph()->simplified(); |
| 709 } | 709 } |
| 710 | 710 |
| 711 } // namespace compiler | 711 } // namespace compiler |
| 712 } // namespace internal | 712 } // namespace internal |
| 713 } // namespace v8 | 713 } // namespace v8 |
| OLD | NEW |