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