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/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 746 matching lines...) Loading... |
757 } | 757 } |
758 break; | 758 break; |
759 | 759 |
760 case VariableLocation::LOOKUP: { | 760 case VariableLocation::LOOKUP: { |
761 Comment cmnt(masm_, "[ VariableDeclaration"); | 761 Comment cmnt(masm_, "[ VariableDeclaration"); |
762 __ Push(variable->name()); | 762 __ Push(variable->name()); |
763 // Declaration nodes are always introduced in one of four modes. | 763 // Declaration nodes are always introduced in one of four modes. |
764 DCHECK(IsDeclaredVariableMode(mode)); | 764 DCHECK(IsDeclaredVariableMode(mode)); |
765 DCHECK(!hole_init); | 765 DCHECK(!hole_init); |
766 __ Push(Smi::FromInt(0)); // Indicates no initial value. | 766 __ Push(Smi::FromInt(0)); // Indicates no initial value. |
767 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); | |
768 __ CallRuntime(Runtime::kDeclareLookupSlot); | 767 __ CallRuntime(Runtime::kDeclareLookupSlot); |
769 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); | 768 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); |
770 break; | 769 break; |
771 } | 770 } |
772 } | 771 } |
773 } | 772 } |
774 | 773 |
775 | 774 |
776 void FullCodeGenerator::VisitFunctionDeclaration( | 775 void FullCodeGenerator::VisitFunctionDeclaration( |
777 FunctionDeclaration* declaration) { | 776 FunctionDeclaration* declaration) { |
(...skipping 34 matching lines...) Loading... |
812 EMIT_REMEMBERED_SET, | 811 EMIT_REMEMBERED_SET, |
813 OMIT_SMI_CHECK); | 812 OMIT_SMI_CHECK); |
814 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); | 813 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); |
815 break; | 814 break; |
816 } | 815 } |
817 | 816 |
818 case VariableLocation::LOOKUP: { | 817 case VariableLocation::LOOKUP: { |
819 Comment cmnt(masm_, "[ FunctionDeclaration"); | 818 Comment cmnt(masm_, "[ FunctionDeclaration"); |
820 PushOperand(variable->name()); | 819 PushOperand(variable->name()); |
821 VisitForStackValue(declaration->fun()); | 820 VisitForStackValue(declaration->fun()); |
822 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); | |
823 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); | 821 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); |
824 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); | 822 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); |
825 break; | 823 break; |
826 } | 824 } |
827 } | 825 } |
828 } | 826 } |
829 | 827 |
830 | 828 |
831 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { | 829 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
832 // Call the runtime to declare the globals. | 830 // Call the runtime to declare the globals. |
(...skipping 2863 matching lines...) Loading... |
3696 DCHECK_EQ( | 3694 DCHECK_EQ( |
3697 isolate->builtins()->OnStackReplacement()->entry(), | 3695 isolate->builtins()->OnStackReplacement()->entry(), |
3698 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3696 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3699 return ON_STACK_REPLACEMENT; | 3697 return ON_STACK_REPLACEMENT; |
3700 } | 3698 } |
3701 | 3699 |
3702 } // namespace internal | 3700 } // namespace internal |
3703 } // namespace v8 | 3701 } // namespace v8 |
3704 | 3702 |
3705 #endif // V8_TARGET_ARCH_X64 | 3703 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |