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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 | 809 |
810 | 810 |
811 void FullCodeGenerator::VisitFunctionDeclaration( | 811 void FullCodeGenerator::VisitFunctionDeclaration( |
812 FunctionDeclaration* declaration) { | 812 FunctionDeclaration* declaration) { |
813 VariableProxy* proxy = declaration->proxy(); | 813 VariableProxy* proxy = declaration->proxy(); |
814 Variable* variable = proxy->var(); | 814 Variable* variable = proxy->var(); |
815 switch (variable->location()) { | 815 switch (variable->location()) { |
816 case Variable::UNALLOCATED: { | 816 case Variable::UNALLOCATED: { |
817 globals_->Add(variable->name(), zone()); | 817 globals_->Add(variable->name(), zone()); |
818 Handle<SharedFunctionInfo> function = | 818 Handle<SharedFunctionInfo> function = |
819 Compiler::BuildFunctionInfo(declaration->fun(), script()); | 819 Compiler::BuildFunctionInfo(declaration->fun(), script(), info_); |
820 // Check for stack-overflow exception. | 820 // Check for stack-overflow exception. |
821 if (function.is_null()) return SetStackOverflow(); | 821 if (function.is_null()) return SetStackOverflow(); |
822 globals_->Add(function, zone()); | 822 globals_->Add(function, zone()); |
823 break; | 823 break; |
824 } | 824 } |
825 | 825 |
826 case Variable::PARAMETER: | 826 case Variable::PARAMETER: |
827 case Variable::LOCAL: { | 827 case Variable::LOCAL: { |
828 Comment cmnt(masm_, "[ FunctionDeclaration"); | 828 Comment cmnt(masm_, "[ FunctionDeclaration"); |
829 VisitForAccumulatorValue(declaration->fun()); | 829 VisitForAccumulatorValue(declaration->fun()); |
(...skipping 3997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4827 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4827 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4828 Assembler::target_address_at(call_target_address, | 4828 Assembler::target_address_at(call_target_address, |
4829 unoptimized_code)); | 4829 unoptimized_code)); |
4830 return OSR_AFTER_STACK_CHECK; | 4830 return OSR_AFTER_STACK_CHECK; |
4831 } | 4831 } |
4832 | 4832 |
4833 | 4833 |
4834 } } // namespace v8::internal | 4834 } } // namespace v8::internal |
4835 | 4835 |
4836 #endif // V8_TARGET_ARCH_X87 | 4836 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |