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_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 void FullCodeGenerator::VisitFunctionDeclaration( | 740 void FullCodeGenerator::VisitFunctionDeclaration( |
741 FunctionDeclaration* declaration) { | 741 FunctionDeclaration* declaration) { |
742 VariableProxy* proxy = declaration->proxy(); | 742 VariableProxy* proxy = declaration->proxy(); |
743 Variable* variable = proxy->var(); | 743 Variable* variable = proxy->var(); |
744 switch (variable->location()) { | 744 switch (variable->location()) { |
745 case VariableLocation::UNALLOCATED: { | 745 case VariableLocation::UNALLOCATED: { |
746 globals_->Add(variable->name(), zone()); | 746 globals_->Add(variable->name(), zone()); |
747 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 747 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
748 DCHECK(!slot.IsInvalid()); | 748 DCHECK(!slot.IsInvalid()); |
749 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 749 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
750 Handle<SharedFunctionInfo> function = Compiler::GetSharedFunctionInfo( | 750 Handle<SharedFunctionInfo> function = |
751 declaration->fun(), script(), info_, compilation_mode_); | 751 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); |
752 // Check for stack-overflow exception. | 752 // Check for stack-overflow exception. |
753 if (function.is_null()) return SetStackOverflow(); | 753 if (function.is_null()) return SetStackOverflow(); |
754 globals_->Add(function, zone()); | 754 globals_->Add(function, zone()); |
755 break; | 755 break; |
756 } | 756 } |
757 | 757 |
758 case VariableLocation::PARAMETER: | 758 case VariableLocation::PARAMETER: |
759 case VariableLocation::LOCAL: { | 759 case VariableLocation::LOCAL: { |
760 Comment cmnt(masm_, "[ FunctionDeclaration"); | 760 Comment cmnt(masm_, "[ FunctionDeclaration"); |
761 VisitForAccumulatorValue(declaration->fun()); | 761 VisitForAccumulatorValue(declaration->fun()); |
(...skipping 1923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2685 DCHECK_EQ( | 2685 DCHECK_EQ( |
2686 isolate->builtins()->OnStackReplacement()->entry(), | 2686 isolate->builtins()->OnStackReplacement()->entry(), |
2687 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2687 Assembler::target_address_at(call_target_address, unoptimized_code)); |
2688 return ON_STACK_REPLACEMENT; | 2688 return ON_STACK_REPLACEMENT; |
2689 } | 2689 } |
2690 | 2690 |
2691 } // namespace internal | 2691 } // namespace internal |
2692 } // namespace v8 | 2692 } // namespace v8 |
2693 | 2693 |
2694 #endif // V8_TARGET_ARCH_X64 | 2694 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |