| 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/ast.h" | 5 #include "src/ast.h" |
| 6 #include "src/ast-numbering.h" | 6 #include "src/ast-numbering.h" |
| 7 #include "src/compiler/access-builder.h" | 7 #include "src/compiler/access-builder.h" |
| 8 #include "src/compiler/ast-graph-builder.h" | 8 #include "src/compiler/ast-graph-builder.h" |
| 9 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
| 10 #include "src/compiler/graph-inl.h" | 10 #include "src/compiler/graph-inl.h" |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 info_->shared_info()->DebugName()->ToCString().get()); | 355 info_->shared_info()->DebugName()->ToCString().get()); |
| 356 } | 356 } |
| 357 return; | 357 return; |
| 358 } | 358 } |
| 359 | 359 |
| 360 CompilationInfoWithZone info(function); | 360 CompilationInfoWithZone info(function); |
| 361 // TODO(wingo): ParseAndAnalyze can fail due to stack overflow. | 361 // TODO(wingo): ParseAndAnalyze can fail due to stack overflow. |
| 362 CHECK(Compiler::ParseAndAnalyze(&info)); | 362 CHECK(Compiler::ParseAndAnalyze(&info)); |
| 363 CHECK(Compiler::EnsureDeoptimizationSupport(&info)); | 363 CHECK(Compiler::EnsureDeoptimizationSupport(&info)); |
| 364 | 364 |
| 365 if (info.scope()->arguments() != NULL && info.strict_mode() != STRICT) { | 365 if (info.scope()->arguments() != NULL && is_sloppy(info.language_mode())) { |
| 366 // For now do not inline functions that use their arguments array. | 366 // For now do not inline functions that use their arguments array. |
| 367 SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString(); | 367 SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString(); |
| 368 if (FLAG_trace_turbo_inlining) { | 368 if (FLAG_trace_turbo_inlining) { |
| 369 PrintF( | 369 PrintF( |
| 370 "Not Inlining %s into %s because inlinee uses arguments " | 370 "Not Inlining %s into %s because inlinee uses arguments " |
| 371 "array\n", | 371 "array\n", |
| 372 name.get(), info_->shared_info()->DebugName()->ToCString().get()); | 372 name.get(), info_->shared_info()->DebugName()->ToCString().get()); |
| 373 } | 373 } |
| 374 return; | 374 return; |
| 375 } | 375 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 } | 408 } |
| 409 } | 409 } |
| 410 } | 410 } |
| 411 | 411 |
| 412 inlinee.InlineAtCall(jsgraph_, call_node); | 412 inlinee.InlineAtCall(jsgraph_, call_node); |
| 413 } | 413 } |
| 414 | 414 |
| 415 } // namespace compiler | 415 } // namespace compiler |
| 416 } // namespace internal | 416 } // namespace internal |
| 417 } // namespace v8 | 417 } // namespace v8 |
| OLD | NEW |