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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 JSCallFunctionAccessor call(node); | 313 JSCallFunctionAccessor call(node); |
314 HeapObjectMatcher<JSFunction> match(call.jsfunction()); | 314 HeapObjectMatcher<JSFunction> match(call.jsfunction()); |
315 if (!match.HasValue()) return NoChange(); | 315 if (!match.HasValue()) return NoChange(); |
316 | 316 |
317 Handle<JSFunction> function = match.Value().handle(); | 317 Handle<JSFunction> function = match.Value().handle(); |
318 if (!function->IsJSFunction()) return NoChange(); | 318 if (!function->IsJSFunction()) return NoChange(); |
319 if (mode_ == kBuiltinsInlining && !function->shared()->inline_builtin()) { | 319 if (mode_ == kBuiltinsInlining && !function->shared()->inline_builtin()) { |
320 return NoChange(); | 320 return NoChange(); |
321 } | 321 } |
322 | 322 |
323 CompilationInfoWithZone info(function); | 323 Zone zone; |
| 324 ParseInfo parse_info(&zone, function); |
| 325 CompilationInfo info(&parse_info); |
324 | 326 |
325 if (!Compiler::ParseAndAnalyze(info.parse_info())) return NoChange(); | 327 if (!Compiler::ParseAndAnalyze(info.parse_info())) return NoChange(); |
326 if (!Compiler::EnsureDeoptimizationSupport(&info)) return NoChange(); | 328 if (!Compiler::EnsureDeoptimizationSupport(&info)) return NoChange(); |
327 | 329 |
328 if (info.scope()->arguments() != NULL && is_sloppy(info.language_mode())) { | 330 if (info.scope()->arguments() != NULL && is_sloppy(info.language_mode())) { |
329 // For now do not inline functions that use their arguments array. | 331 // For now do not inline functions that use their arguments array. |
330 TRACE("Not Inlining %s into %s because inlinee uses arguments array\n", | 332 TRACE("Not Inlining %s into %s because inlinee uses arguments array\n", |
331 function->shared()->DebugName()->ToCString().get(), | 333 function->shared()->DebugName()->ToCString().get(), |
332 info_->shared_info()->DebugName()->ToCString().get()); | 334 info_->shared_info()->DebugName()->ToCString().get()); |
333 return NoChange(); | 335 return NoChange(); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 } | 376 } |
375 } | 377 } |
376 } | 378 } |
377 | 379 |
378 return inlinee.InlineAtCall(jsgraph_, node); | 380 return inlinee.InlineAtCall(jsgraph_, node); |
379 } | 381 } |
380 | 382 |
381 } // namespace compiler | 383 } // namespace compiler |
382 } // namespace internal | 384 } // namespace internal |
383 } // namespace v8 | 385 } // namespace v8 |
OLD | NEW |