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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 | 885 |
886 | 886 |
887 void FullCodeGenerator::VisitFunctionDeclaration( | 887 void FullCodeGenerator::VisitFunctionDeclaration( |
888 FunctionDeclaration* declaration) { | 888 FunctionDeclaration* declaration) { |
889 VariableProxy* proxy = declaration->proxy(); | 889 VariableProxy* proxy = declaration->proxy(); |
890 Variable* variable = proxy->var(); | 890 Variable* variable = proxy->var(); |
891 switch (variable->location()) { | 891 switch (variable->location()) { |
892 case Variable::UNALLOCATED: { | 892 case Variable::UNALLOCATED: { |
893 globals_->Add(variable->name(), zone()); | 893 globals_->Add(variable->name(), zone()); |
894 Handle<SharedFunctionInfo> function = | 894 Handle<SharedFunctionInfo> function = |
895 Compiler::BuildFunctionInfo(declaration->fun(), script(), info_); | 895 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); |
896 // Check for stack-overflow exception. | 896 // Check for stack-overflow exception. |
897 if (function.is_null()) return SetStackOverflow(); | 897 if (function.is_null()) return SetStackOverflow(); |
898 globals_->Add(function, zone()); | 898 globals_->Add(function, zone()); |
899 break; | 899 break; |
900 } | 900 } |
901 | 901 |
902 case Variable::PARAMETER: | 902 case Variable::PARAMETER: |
903 case Variable::LOCAL: { | 903 case Variable::LOCAL: { |
904 Comment cmnt(masm_, "[ FunctionDeclaration"); | 904 Comment cmnt(masm_, "[ FunctionDeclaration"); |
905 VisitForAccumulatorValue(declaration->fun()); | 905 VisitForAccumulatorValue(declaration->fun()); |
(...skipping 4603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5509 Assembler::target_address_at(call_target_address, | 5509 Assembler::target_address_at(call_target_address, |
5510 unoptimized_code)); | 5510 unoptimized_code)); |
5511 return OSR_AFTER_STACK_CHECK; | 5511 return OSR_AFTER_STACK_CHECK; |
5512 } | 5512 } |
5513 | 5513 |
5514 | 5514 |
5515 } // namespace internal | 5515 } // namespace internal |
5516 } // namespace v8 | 5516 } // namespace v8 |
5517 | 5517 |
5518 #endif // V8_TARGET_ARCH_X64 | 5518 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |