OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/crankshaft/hydrogen.h" | 5 #include "src/crankshaft/hydrogen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
10 #include "src/ast/ast-numbering.h" | 10 #include "src/ast/ast-numbering.h" |
(...skipping 8408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8419 if (function->scope()->this_function_var() != nullptr || | 8419 if (function->scope()->this_function_var() != nullptr || |
8420 function->scope()->new_target_var() != nullptr) { | 8420 function->scope()->new_target_var() != nullptr) { |
8421 TraceInline(target, caller, "target uses new target or this function"); | 8421 TraceInline(target, caller, "target uses new target or this function"); |
8422 return false; | 8422 return false; |
8423 } | 8423 } |
8424 | 8424 |
8425 // All declarations must be inlineable. | 8425 // All declarations must be inlineable. |
8426 ZoneList<Declaration*>* decls = target_info.scope()->declarations(); | 8426 ZoneList<Declaration*>* decls = target_info.scope()->declarations(); |
8427 int decl_count = decls->length(); | 8427 int decl_count = decls->length(); |
8428 for (int i = 0; i < decl_count; ++i) { | 8428 for (int i = 0; i < decl_count; ++i) { |
8429 if (!decls->at(i)->IsInlineable()) { | 8429 if (decls->at(i)->IsFunctionDeclaration() || |
| 8430 !decls->at(i)->proxy()->var()->IsStackAllocated()) { |
8430 TraceInline(target, caller, "target has non-trivial declaration"); | 8431 TraceInline(target, caller, "target has non-trivial declaration"); |
8431 return false; | 8432 return false; |
8432 } | 8433 } |
8433 } | 8434 } |
8434 | 8435 |
8435 // Generate the deoptimization data for the unoptimized version of | 8436 // Generate the deoptimization data for the unoptimized version of |
8436 // the target function if we don't already have it. | 8437 // the target function if we don't already have it. |
8437 if (!Compiler::EnsureDeoptimizationSupport(&target_info)) { | 8438 if (!Compiler::EnsureDeoptimizationSupport(&target_info)) { |
8438 TraceInline(target, caller, "could not generate deoptimization info"); | 8439 TraceInline(target, caller, "could not generate deoptimization info"); |
8439 return false; | 8440 return false; |
(...skipping 4988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13428 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13429 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13429 } | 13430 } |
13430 | 13431 |
13431 #ifdef DEBUG | 13432 #ifdef DEBUG |
13432 graph_->Verify(false); // No full verify. | 13433 graph_->Verify(false); // No full verify. |
13433 #endif | 13434 #endif |
13434 } | 13435 } |
13435 | 13436 |
13436 } // namespace internal | 13437 } // namespace internal |
13437 } // namespace v8 | 13438 } // namespace v8 |
OLD | NEW |