| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 6 | 6 |
| 7 #include "src/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
| 8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 void FullCodeGenerator::VisitFunctionDeclaration( | 735 void FullCodeGenerator::VisitFunctionDeclaration( |
| 736 FunctionDeclaration* declaration) { | 736 FunctionDeclaration* declaration) { |
| 737 VariableProxy* proxy = declaration->proxy(); | 737 VariableProxy* proxy = declaration->proxy(); |
| 738 Variable* variable = proxy->var(); | 738 Variable* variable = proxy->var(); |
| 739 switch (variable->location()) { | 739 switch (variable->location()) { |
| 740 case VariableLocation::UNALLOCATED: { | 740 case VariableLocation::UNALLOCATED: { |
| 741 globals_->Add(variable->name(), zone()); | 741 globals_->Add(variable->name(), zone()); |
| 742 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 742 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
| 743 DCHECK(!slot.IsInvalid()); | 743 DCHECK(!slot.IsInvalid()); |
| 744 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 744 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
| 745 Handle<SharedFunctionInfo> function = | 745 Handle<SharedFunctionInfo> function = Compiler::GetSharedFunctionInfo( |
| 746 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); | 746 declaration->fun(), script(), info_, compilation_mode_); |
| 747 // Check for stack-overflow exception. | 747 // Check for stack-overflow exception. |
| 748 if (function.is_null()) return SetStackOverflow(); | 748 if (function.is_null()) return SetStackOverflow(); |
| 749 globals_->Add(function, zone()); | 749 globals_->Add(function, zone()); |
| 750 break; | 750 break; |
| 751 } | 751 } |
| 752 | 752 |
| 753 case VariableLocation::PARAMETER: | 753 case VariableLocation::PARAMETER: |
| 754 case VariableLocation::LOCAL: { | 754 case VariableLocation::LOCAL: { |
| 755 Comment cmnt(masm_, "[ FunctionDeclaration"); | 755 Comment cmnt(masm_, "[ FunctionDeclaration"); |
| 756 VisitForAccumulatorValue(declaration->fun()); | 756 VisitForAccumulatorValue(declaration->fun()); |
| (...skipping 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2780 isolate->builtins()->OnStackReplacement()->entry(), | 2780 isolate->builtins()->OnStackReplacement()->entry(), |
| 2781 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2781 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 2782 return ON_STACK_REPLACEMENT; | 2782 return ON_STACK_REPLACEMENT; |
| 2783 } | 2783 } |
| 2784 | 2784 |
| 2785 | 2785 |
| 2786 } // namespace internal | 2786 } // namespace internal |
| 2787 } // namespace v8 | 2787 } // namespace v8 |
| 2788 | 2788 |
| 2789 #endif // V8_TARGET_ARCH_X87 | 2789 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |