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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 void FullCodeGenerator::VisitFunctionDeclaration( | 739 void FullCodeGenerator::VisitFunctionDeclaration( |
740 FunctionDeclaration* declaration) { | 740 FunctionDeclaration* declaration) { |
741 VariableProxy* proxy = declaration->proxy(); | 741 VariableProxy* proxy = declaration->proxy(); |
742 Variable* variable = proxy->var(); | 742 Variable* variable = proxy->var(); |
743 switch (variable->location()) { | 743 switch (variable->location()) { |
744 case VariableLocation::UNALLOCATED: { | 744 case VariableLocation::UNALLOCATED: { |
745 globals_->Add(variable->name(), zone()); | 745 globals_->Add(variable->name(), zone()); |
746 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 746 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
747 DCHECK(!slot.IsInvalid()); | 747 DCHECK(!slot.IsInvalid()); |
748 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 748 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
749 Handle<SharedFunctionInfo> function = | 749 Handle<SharedFunctionInfo> function = Compiler::GetSharedFunctionInfo( |
750 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); | 750 declaration->fun(), script(), info_, compilation_mode_); |
751 // Check for stack-overflow exception. | 751 // Check for stack-overflow exception. |
752 if (function.is_null()) return SetStackOverflow(); | 752 if (function.is_null()) return SetStackOverflow(); |
753 globals_->Add(function, zone()); | 753 globals_->Add(function, zone()); |
754 break; | 754 break; |
755 } | 755 } |
756 | 756 |
757 case VariableLocation::PARAMETER: | 757 case VariableLocation::PARAMETER: |
758 case VariableLocation::LOCAL: { | 758 case VariableLocation::LOCAL: { |
759 Comment cmnt(masm_, "[ FunctionDeclaration"); | 759 Comment cmnt(masm_, "[ FunctionDeclaration"); |
760 VisitForAccumulatorValue(declaration->fun()); | 760 VisitForAccumulatorValue(declaration->fun()); |
(...skipping 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2788 isolate->builtins()->OnStackReplacement()->entry(), | 2788 isolate->builtins()->OnStackReplacement()->entry(), |
2789 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2789 Assembler::target_address_at(call_target_address, unoptimized_code)); |
2790 return ON_STACK_REPLACEMENT; | 2790 return ON_STACK_REPLACEMENT; |
2791 } | 2791 } |
2792 | 2792 |
2793 | 2793 |
2794 } // namespace internal | 2794 } // namespace internal |
2795 } // namespace v8 | 2795 } // namespace v8 |
2796 | 2796 |
2797 #endif // V8_TARGET_ARCH_IA32 | 2797 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |