OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 // 'undefined') because we may have a (legal) redeclaration and we | 745 // 'undefined') because we may have a (legal) redeclaration and we |
746 // must not destroy the current value. | 746 // must not destroy the current value. |
747 if (hole_init) { | 747 if (hole_init) { |
748 __ LoadRoot(r2, Heap::kTheHoleValueRootIndex); | 748 __ LoadRoot(r2, Heap::kTheHoleValueRootIndex); |
749 } else { | 749 } else { |
750 __ LoadSmiLiteral(r2, Smi::FromInt(0)); // Indicates no initial value. | 750 __ LoadSmiLiteral(r2, Smi::FromInt(0)); // Indicates no initial value. |
751 } | 751 } |
752 __ Push(r4, r2); | 752 __ Push(r4, r2); |
753 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); | 753 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); |
754 __ CallRuntime(Runtime::kDeclareLookupSlot); | 754 __ CallRuntime(Runtime::kDeclareLookupSlot); |
| 755 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); |
755 break; | 756 break; |
756 } | 757 } |
757 } | 758 } |
758 } | 759 } |
759 | 760 |
760 void FullCodeGenerator::VisitFunctionDeclaration( | 761 void FullCodeGenerator::VisitFunctionDeclaration( |
761 FunctionDeclaration* declaration) { | 762 FunctionDeclaration* declaration) { |
762 VariableProxy* proxy = declaration->proxy(); | 763 VariableProxy* proxy = declaration->proxy(); |
763 Variable* variable = proxy->var(); | 764 Variable* variable = proxy->var(); |
764 switch (variable->location()) { | 765 switch (variable->location()) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 } | 797 } |
797 | 798 |
798 case VariableLocation::LOOKUP: { | 799 case VariableLocation::LOOKUP: { |
799 Comment cmnt(masm_, "[ FunctionDeclaration"); | 800 Comment cmnt(masm_, "[ FunctionDeclaration"); |
800 __ mov(r4, Operand(variable->name())); | 801 __ mov(r4, Operand(variable->name())); |
801 PushOperand(r4); | 802 PushOperand(r4); |
802 // Push initial value for function declaration. | 803 // Push initial value for function declaration. |
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 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { | 813 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
812 // Call the runtime to declare the globals. | 814 // Call the runtime to declare the globals. |
813 __ mov(r3, Operand(pairs)); | 815 __ mov(r3, Operand(pairs)); |
814 __ LoadSmiLiteral(r2, Smi::FromInt(DeclareGlobalsFlags())); | 816 __ LoadSmiLiteral(r2, Smi::FromInt(DeclareGlobalsFlags())); |
815 __ Push(r3, r2); | 817 __ Push(r3, r2); |
(...skipping 2992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3808 DCHECK(kOSRBranchInstruction == br_instr); | 3810 DCHECK(kOSRBranchInstruction == br_instr); |
3809 | 3811 |
3810 DCHECK(interrupt_address == | 3812 DCHECK(interrupt_address == |
3811 isolate->builtins()->OnStackReplacement()->entry()); | 3813 isolate->builtins()->OnStackReplacement()->entry()); |
3812 return ON_STACK_REPLACEMENT; | 3814 return ON_STACK_REPLACEMENT; |
3813 } | 3815 } |
3814 | 3816 |
3815 } // namespace internal | 3817 } // namespace internal |
3816 } // namespace v8 | 3818 } // namespace v8 |
3817 #endif // V8_TARGET_ARCH_S390 | 3819 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |