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-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 | 832 |
833 | 833 |
834 void FullCodeGenerator::VisitFunctionDeclaration( | 834 void FullCodeGenerator::VisitFunctionDeclaration( |
835 FunctionDeclaration* declaration) { | 835 FunctionDeclaration* declaration) { |
836 VariableProxy* proxy = declaration->proxy(); | 836 VariableProxy* proxy = declaration->proxy(); |
837 Variable* variable = proxy->var(); | 837 Variable* variable = proxy->var(); |
838 switch (variable->location()) { | 838 switch (variable->location()) { |
839 case Variable::UNALLOCATED: { | 839 case Variable::UNALLOCATED: { |
840 globals_->Add(variable->name(), zone()); | 840 globals_->Add(variable->name(), zone()); |
841 Handle<SharedFunctionInfo> function = | 841 Handle<SharedFunctionInfo> function = |
842 Compiler::BuildFunctionInfo(declaration->fun(), script()); | 842 Compiler::BuildFunctionInfo(declaration->fun(), script(), info_); |
843 // Check for stack-overflow exception. | 843 // Check for stack-overflow exception. |
844 if (function.is_null()) return SetStackOverflow(); | 844 if (function.is_null()) return SetStackOverflow(); |
845 globals_->Add(function, zone()); | 845 globals_->Add(function, zone()); |
846 break; | 846 break; |
847 } | 847 } |
848 | 848 |
849 case Variable::PARAMETER: | 849 case Variable::PARAMETER: |
850 case Variable::LOCAL: { | 850 case Variable::LOCAL: { |
851 Comment cmnt(masm_, "[ FunctionDeclaration"); | 851 Comment cmnt(masm_, "[ FunctionDeclaration"); |
852 VisitForAccumulatorValue(declaration->fun()); | 852 VisitForAccumulatorValue(declaration->fun()); |
(...skipping 3988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4841 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4841 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4842 Assembler::target_address_at(call_target_address, | 4842 Assembler::target_address_at(call_target_address, |
4843 unoptimized_code)); | 4843 unoptimized_code)); |
4844 return OSR_AFTER_STACK_CHECK; | 4844 return OSR_AFTER_STACK_CHECK; |
4845 } | 4845 } |
4846 | 4846 |
4847 | 4847 |
4848 } } // namespace v8::internal | 4848 } } // namespace v8::internal |
4849 | 4849 |
4850 #endif // V8_TARGET_ARCH_X64 | 4850 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |