| 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 1807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1818 operand_stack_depth_ * kPointerSize; | 1818 operand_stack_depth_ * kPointerSize; |
| 1819 __ SubP(r2, fp, sp); | 1819 __ SubP(r2, fp, sp); |
| 1820 __ CmpP(r2, Operand(expected_diff)); | 1820 __ CmpP(r2, Operand(expected_diff)); |
| 1821 __ Assert(eq, kUnexpectedStackDepth); | 1821 __ Assert(eq, kUnexpectedStackDepth); |
| 1822 } | 1822 } |
| 1823 } | 1823 } |
| 1824 | 1824 |
| 1825 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { | 1825 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { |
| 1826 Label allocate, done_allocate; | 1826 Label allocate, done_allocate; |
| 1827 | 1827 |
| 1828 __ Allocate(JSIteratorResult::kSize, r2, r4, r5, &allocate, TAG_OBJECT); | 1828 __ Allocate(JSIteratorResult::kSize, r2, r4, r5, &allocate, |
| 1829 NO_ALLOCATION_FLAGS); |
| 1829 __ b(&done_allocate); | 1830 __ b(&done_allocate); |
| 1830 | 1831 |
| 1831 __ bind(&allocate); | 1832 __ bind(&allocate); |
| 1832 __ Push(Smi::FromInt(JSIteratorResult::kSize)); | 1833 __ Push(Smi::FromInt(JSIteratorResult::kSize)); |
| 1833 __ CallRuntime(Runtime::kAllocateInNewSpace); | 1834 __ CallRuntime(Runtime::kAllocateInNewSpace); |
| 1834 | 1835 |
| 1835 __ bind(&done_allocate); | 1836 __ bind(&done_allocate); |
| 1836 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, r3); | 1837 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, r3); |
| 1837 PopOperand(r4); | 1838 PopOperand(r4); |
| 1838 __ LoadRoot(r5, | 1839 __ LoadRoot(r5, |
| (...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3091 } | 3092 } |
| 3092 | 3093 |
| 3093 void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { | 3094 void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { |
| 3094 ZoneList<Expression*>* args = expr->arguments(); | 3095 ZoneList<Expression*>* args = expr->arguments(); |
| 3095 DCHECK_EQ(2, args->length()); | 3096 DCHECK_EQ(2, args->length()); |
| 3096 VisitForStackValue(args->at(0)); | 3097 VisitForStackValue(args->at(0)); |
| 3097 VisitForStackValue(args->at(1)); | 3098 VisitForStackValue(args->at(1)); |
| 3098 | 3099 |
| 3099 Label runtime, done; | 3100 Label runtime, done; |
| 3100 | 3101 |
| 3101 __ Allocate(JSIteratorResult::kSize, r2, r4, r5, &runtime, TAG_OBJECT); | 3102 __ Allocate(JSIteratorResult::kSize, r2, r4, r5, &runtime, |
| 3103 NO_ALLOCATION_FLAGS); |
| 3102 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, r3); | 3104 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, r3); |
| 3103 __ Pop(r4, r5); | 3105 __ Pop(r4, r5); |
| 3104 __ LoadRoot(r6, Heap::kEmptyFixedArrayRootIndex); | 3106 __ LoadRoot(r6, Heap::kEmptyFixedArrayRootIndex); |
| 3105 __ StoreP(r3, FieldMemOperand(r2, HeapObject::kMapOffset), r0); | 3107 __ StoreP(r3, FieldMemOperand(r2, HeapObject::kMapOffset), r0); |
| 3106 __ StoreP(r6, FieldMemOperand(r2, JSObject::kPropertiesOffset), r0); | 3108 __ StoreP(r6, FieldMemOperand(r2, JSObject::kPropertiesOffset), r0); |
| 3107 __ StoreP(r6, FieldMemOperand(r2, JSObject::kElementsOffset), r0); | 3109 __ StoreP(r6, FieldMemOperand(r2, JSObject::kElementsOffset), r0); |
| 3108 __ StoreP(r4, FieldMemOperand(r2, JSIteratorResult::kValueOffset), r0); | 3110 __ StoreP(r4, FieldMemOperand(r2, JSIteratorResult::kValueOffset), r0); |
| 3109 __ StoreP(r5, FieldMemOperand(r2, JSIteratorResult::kDoneOffset), r0); | 3111 __ StoreP(r5, FieldMemOperand(r2, JSIteratorResult::kDoneOffset), r0); |
| 3110 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); | 3112 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); |
| 3111 __ b(&done); | 3113 __ b(&done); |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3846 DCHECK(kOSRBranchInstruction == br_instr); | 3848 DCHECK(kOSRBranchInstruction == br_instr); |
| 3847 | 3849 |
| 3848 DCHECK(interrupt_address == | 3850 DCHECK(interrupt_address == |
| 3849 isolate->builtins()->OnStackReplacement()->entry()); | 3851 isolate->builtins()->OnStackReplacement()->entry()); |
| 3850 return ON_STACK_REPLACEMENT; | 3852 return ON_STACK_REPLACEMENT; |
| 3851 } | 3853 } |
| 3852 | 3854 |
| 3853 } // namespace internal | 3855 } // namespace internal |
| 3854 } // namespace v8 | 3856 } // namespace v8 |
| 3855 #endif // V8_TARGET_ARCH_S390 | 3857 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |