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 | 295 |
296 Handle<JSFunction> function = match.Value().handle(); | 296 Handle<JSFunction> function = match.Value().handle(); |
297 if (!function->IsJSFunction()) return NoChange(); | 297 if (!function->IsJSFunction()) return NoChange(); |
298 if (mode_ == kRestrictedInlining && !function->shared()->force_inline()) { | 298 if (mode_ == kRestrictedInlining && !function->shared()->force_inline()) { |
299 return NoChange(); | 299 return NoChange(); |
300 } | 300 } |
301 | 301 |
302 Zone zone; | 302 Zone zone; |
303 ParseInfo parse_info(&zone, function); | 303 ParseInfo parse_info(&zone, function); |
304 CompilationInfo info(&parse_info); | 304 CompilationInfo info(&parse_info); |
| 305 if (info_->is_deoptimization_enabled()) info.MarkAsDeoptimizationEnabled(); |
305 | 306 |
306 if (!Compiler::ParseAndAnalyze(info.parse_info())) return NoChange(); | 307 if (!Compiler::ParseAndAnalyze(info.parse_info())) return NoChange(); |
307 if (!Compiler::EnsureDeoptimizationSupport(&info)) return NoChange(); | 308 if (!Compiler::EnsureDeoptimizationSupport(&info)) return NoChange(); |
308 | 309 |
309 if (info.scope()->arguments() != NULL && is_sloppy(info.language_mode())) { | 310 if (info.scope()->arguments() != NULL && is_sloppy(info.language_mode())) { |
310 // For now do not inline functions that use their arguments array. | 311 // For now do not inline functions that use their arguments array. |
311 TRACE("Not Inlining %s into %s because inlinee uses arguments array\n", | 312 TRACE("Not Inlining %s into %s because inlinee uses arguments array\n", |
312 function->shared()->DebugName()->ToCString().get(), | 313 function->shared()->DebugName()->ToCString().get(), |
313 info_->shared_info()->DebugName()->ToCString().get()); | 314 info_->shared_info()->DebugName()->ToCString().get()); |
314 return NoChange(); | 315 return NoChange(); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 } | 363 } |
363 } | 364 } |
364 } | 365 } |
365 | 366 |
366 return InlineCall(node, inlinee); | 367 return InlineCall(node, inlinee); |
367 } | 368 } |
368 | 369 |
369 } // namespace compiler | 370 } // namespace compiler |
370 } // namespace internal | 371 } // namespace internal |
371 } // namespace v8 | 372 } // namespace v8 |
OLD | NEW |