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_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 // 'undefined') because we may have a (legal) redeclaration and we | 748 // 'undefined') because we may have a (legal) redeclaration and we |
749 // must not destroy the current value. | 749 // must not destroy the current value. |
750 if (hole_init) { | 750 if (hole_init) { |
751 __ push(Immediate(isolate()->factory()->the_hole_value())); | 751 __ push(Immediate(isolate()->factory()->the_hole_value())); |
752 } else { | 752 } else { |
753 __ push(Immediate(Smi::FromInt(0))); // Indicates no initial value. | 753 __ push(Immediate(Smi::FromInt(0))); // Indicates no initial value. |
754 } | 754 } |
755 __ push( | 755 __ push( |
756 Immediate(Smi::FromInt(variable->DeclarationPropertyAttributes()))); | 756 Immediate(Smi::FromInt(variable->DeclarationPropertyAttributes()))); |
757 __ CallRuntime(Runtime::kDeclareLookupSlot); | 757 __ CallRuntime(Runtime::kDeclareLookupSlot); |
| 758 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); |
758 break; | 759 break; |
759 } | 760 } |
760 } | 761 } |
761 } | 762 } |
762 | 763 |
763 void FullCodeGenerator::VisitFunctionDeclaration( | 764 void FullCodeGenerator::VisitFunctionDeclaration( |
764 FunctionDeclaration* declaration) { | 765 FunctionDeclaration* declaration) { |
765 VariableProxy* proxy = declaration->proxy(); | 766 VariableProxy* proxy = declaration->proxy(); |
766 Variable* variable = proxy->var(); | 767 Variable* variable = proxy->var(); |
767 switch (variable->location()) { | 768 switch (variable->location()) { |
(...skipping 28 matching lines...) Expand all Loading... |
796 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); | 797 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); |
797 break; | 798 break; |
798 } | 799 } |
799 | 800 |
800 case VariableLocation::LOOKUP: { | 801 case VariableLocation::LOOKUP: { |
801 Comment cmnt(masm_, "[ FunctionDeclaration"); | 802 Comment cmnt(masm_, "[ FunctionDeclaration"); |
802 PushOperand(variable->name()); | 803 PushOperand(variable->name()); |
803 VisitForStackValue(declaration->fun()); | 804 VisitForStackValue(declaration->fun()); |
804 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); | 805 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); |
805 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); | 806 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); |
| 807 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); |
806 break; | 808 break; |
807 } | 809 } |
808 } | 810 } |
809 } | 811 } |
810 | 812 |
811 | 813 |
812 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { | 814 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
813 // Call the runtime to declare the globals. | 815 // Call the runtime to declare the globals. |
814 __ Push(pairs); | 816 __ Push(pairs); |
815 __ Push(Smi::FromInt(DeclareGlobalsFlags())); | 817 __ Push(Smi::FromInt(DeclareGlobalsFlags())); |
(...skipping 3004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3820 isolate->builtins()->OnStackReplacement()->entry(), | 3822 isolate->builtins()->OnStackReplacement()->entry(), |
3821 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3823 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3822 return ON_STACK_REPLACEMENT; | 3824 return ON_STACK_REPLACEMENT; |
3823 } | 3825 } |
3824 | 3826 |
3825 | 3827 |
3826 } // namespace internal | 3828 } // namespace internal |
3827 } // namespace v8 | 3829 } // namespace v8 |
3828 | 3830 |
3829 #endif // V8_TARGET_ARCH_X87 | 3831 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |