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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 // 'undefined') because we may have a (legal) redeclaration and we | 805 // 'undefined') because we may have a (legal) redeclaration and we |
806 // must not destroy the current value. | 806 // must not destroy the current value. |
807 if (hole_init) { | 807 if (hole_init) { |
808 __ LoadRoot(r0, Heap::kTheHoleValueRootIndex); | 808 __ LoadRoot(r0, Heap::kTheHoleValueRootIndex); |
809 } else { | 809 } else { |
810 __ mov(r0, Operand(Smi::FromInt(0))); // Indicates no initial value. | 810 __ mov(r0, Operand(Smi::FromInt(0))); // Indicates no initial value. |
811 } | 811 } |
812 __ Push(r2, r0); | 812 __ Push(r2, r0); |
813 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); | 813 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); |
814 __ CallRuntime(Runtime::kDeclareLookupSlot); | 814 __ CallRuntime(Runtime::kDeclareLookupSlot); |
| 815 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); |
815 break; | 816 break; |
816 } | 817 } |
817 } | 818 } |
818 } | 819 } |
819 | 820 |
820 | 821 |
821 void FullCodeGenerator::VisitFunctionDeclaration( | 822 void FullCodeGenerator::VisitFunctionDeclaration( |
822 FunctionDeclaration* declaration) { | 823 FunctionDeclaration* declaration) { |
823 VariableProxy* proxy = declaration->proxy(); | 824 VariableProxy* proxy = declaration->proxy(); |
824 Variable* variable = proxy->var(); | 825 Variable* variable = proxy->var(); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 } | 863 } |
863 | 864 |
864 case VariableLocation::LOOKUP: { | 865 case VariableLocation::LOOKUP: { |
865 Comment cmnt(masm_, "[ FunctionDeclaration"); | 866 Comment cmnt(masm_, "[ FunctionDeclaration"); |
866 __ mov(r2, Operand(variable->name())); | 867 __ mov(r2, Operand(variable->name())); |
867 PushOperand(r2); | 868 PushOperand(r2); |
868 // Push initial value for function declaration. | 869 // Push initial value for function declaration. |
869 VisitForStackValue(declaration->fun()); | 870 VisitForStackValue(declaration->fun()); |
870 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); | 871 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); |
871 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); | 872 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); |
| 873 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); |
872 break; | 874 break; |
873 } | 875 } |
874 } | 876 } |
875 } | 877 } |
876 | 878 |
877 | 879 |
878 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { | 880 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
879 // Call the runtime to declare the globals. | 881 // Call the runtime to declare the globals. |
880 __ mov(r1, Operand(pairs)); | 882 __ mov(r1, Operand(pairs)); |
881 __ mov(r0, Operand(Smi::FromInt(DeclareGlobalsFlags()))); | 883 __ mov(r0, Operand(Smi::FromInt(DeclareGlobalsFlags()))); |
(...skipping 3108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3990 DCHECK(interrupt_address == | 3992 DCHECK(interrupt_address == |
3991 isolate->builtins()->OnStackReplacement()->entry()); | 3993 isolate->builtins()->OnStackReplacement()->entry()); |
3992 return ON_STACK_REPLACEMENT; | 3994 return ON_STACK_REPLACEMENT; |
3993 } | 3995 } |
3994 | 3996 |
3995 | 3997 |
3996 } // namespace internal | 3998 } // namespace internal |
3997 } // namespace v8 | 3999 } // namespace v8 |
3998 | 4000 |
3999 #endif // V8_TARGET_ARCH_ARM | 4001 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |