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 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 void FullCodeGenerator::VisitFunctionDeclaration( | 757 void FullCodeGenerator::VisitFunctionDeclaration( |
758 FunctionDeclaration* declaration) { | 758 FunctionDeclaration* declaration) { |
759 VariableProxy* proxy = declaration->proxy(); | 759 VariableProxy* proxy = declaration->proxy(); |
760 Variable* variable = proxy->var(); | 760 Variable* variable = proxy->var(); |
761 switch (variable->location()) { | 761 switch (variable->location()) { |
762 case VariableLocation::UNALLOCATED: { | 762 case VariableLocation::UNALLOCATED: { |
763 globals_->Add(variable->name(), zone()); | 763 globals_->Add(variable->name(), zone()); |
764 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 764 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
765 DCHECK(!slot.IsInvalid()); | 765 DCHECK(!slot.IsInvalid()); |
766 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 766 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
767 Handle<SharedFunctionInfo> function = Compiler::GetSharedFunctionInfo( | 767 Handle<SharedFunctionInfo> function = |
768 declaration->fun(), script(), info_, compilation_mode_); | 768 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); |
769 // Check for stack-overflow exception. | 769 // Check for stack-overflow exception. |
770 if (function.is_null()) return SetStackOverflow(); | 770 if (function.is_null()) return SetStackOverflow(); |
771 globals_->Add(function, zone()); | 771 globals_->Add(function, zone()); |
772 break; | 772 break; |
773 } | 773 } |
774 | 774 |
775 case VariableLocation::PARAMETER: | 775 case VariableLocation::PARAMETER: |
776 case VariableLocation::LOCAL: { | 776 case VariableLocation::LOCAL: { |
777 Comment cmnt(masm_, "[ FunctionDeclaration"); | 777 Comment cmnt(masm_, "[ FunctionDeclaration"); |
778 VisitForAccumulatorValue(declaration->fun()); | 778 VisitForAccumulatorValue(declaration->fun()); |
(...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2776 DCHECK_EQ( | 2776 DCHECK_EQ( |
2777 isolate->builtins()->OnStackReplacement()->entry(), | 2777 isolate->builtins()->OnStackReplacement()->entry(), |
2778 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2778 Assembler::target_address_at(call_target_address, unoptimized_code)); |
2779 return ON_STACK_REPLACEMENT; | 2779 return ON_STACK_REPLACEMENT; |
2780 } | 2780 } |
2781 | 2781 |
2782 } // namespace internal | 2782 } // namespace internal |
2783 } // namespace v8 | 2783 } // namespace v8 |
2784 | 2784 |
2785 #endif // V8_TARGET_ARCH_X64 | 2785 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |