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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 // In strong mode, in case of too few arguments we need to throw a | 295 // In strong mode, in case of too few arguments we need to throw a |
296 // TypeError so we must not inline this call. | 296 // TypeError so we must not inline this call. |
297 if (is_strong(info.language_mode()) && | 297 if (is_strong(info.language_mode()) && |
298 call.formal_arguments() < inlinee_formal_parameters) { | 298 call.formal_arguments() < inlinee_formal_parameters) { |
299 return NoChange(); | 299 return NoChange(); |
300 } | 300 } |
301 frame_state = CreateArgumentsAdaptorFrameState(&call, info.shared_info(), | 301 frame_state = CreateArgumentsAdaptorFrameState(&call, info.shared_info(), |
302 info.zone()); | 302 info.zone()); |
303 } | 303 } |
304 | 304 |
305 // Remember that we inlined this function. | |
306 info_->AddInlinedFunction(info.shared_info()); | |
307 | |
308 return InlineCall(node, frame_state, start, end); | 305 return InlineCall(node, frame_state, start, end); |
309 } | 306 } |
310 | 307 |
311 } // namespace compiler | 308 } // namespace compiler |
312 } // namespace internal | 309 } // namespace internal |
313 } // namespace v8 | 310 } // namespace v8 |
OLD | NEW |