OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1862 operand_stack_depth_ * kPointerSize; | 1862 operand_stack_depth_ * kPointerSize; |
1863 __ sub(r3, fp, sp); | 1863 __ sub(r3, fp, sp); |
1864 __ cmpi(r3, Operand(expected_diff)); | 1864 __ cmpi(r3, Operand(expected_diff)); |
1865 __ Assert(eq, kUnexpectedStackDepth); | 1865 __ Assert(eq, kUnexpectedStackDepth); |
1866 } | 1866 } |
1867 } | 1867 } |
1868 | 1868 |
1869 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { | 1869 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { |
1870 Label allocate, done_allocate; | 1870 Label allocate, done_allocate; |
1871 | 1871 |
1872 __ Allocate(JSIteratorResult::kSize, r3, r5, r6, &allocate, TAG_OBJECT); | 1872 __ Allocate(JSIteratorResult::kSize, r3, r5, r6, &allocate, |
| 1873 NO_ALLOCATION_FLAGS); |
1873 __ b(&done_allocate); | 1874 __ b(&done_allocate); |
1874 | 1875 |
1875 __ bind(&allocate); | 1876 __ bind(&allocate); |
1876 __ Push(Smi::FromInt(JSIteratorResult::kSize)); | 1877 __ Push(Smi::FromInt(JSIteratorResult::kSize)); |
1877 __ CallRuntime(Runtime::kAllocateInNewSpace); | 1878 __ CallRuntime(Runtime::kAllocateInNewSpace); |
1878 | 1879 |
1879 __ bind(&done_allocate); | 1880 __ bind(&done_allocate); |
1880 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, r4); | 1881 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, r4); |
1881 PopOperand(r5); | 1882 PopOperand(r5); |
1882 __ LoadRoot(r6, | 1883 __ LoadRoot(r6, |
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3174 | 3175 |
3175 | 3176 |
3176 void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { | 3177 void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { |
3177 ZoneList<Expression*>* args = expr->arguments(); | 3178 ZoneList<Expression*>* args = expr->arguments(); |
3178 DCHECK_EQ(2, args->length()); | 3179 DCHECK_EQ(2, args->length()); |
3179 VisitForStackValue(args->at(0)); | 3180 VisitForStackValue(args->at(0)); |
3180 VisitForStackValue(args->at(1)); | 3181 VisitForStackValue(args->at(1)); |
3181 | 3182 |
3182 Label runtime, done; | 3183 Label runtime, done; |
3183 | 3184 |
3184 __ Allocate(JSIteratorResult::kSize, r3, r5, r6, &runtime, TAG_OBJECT); | 3185 __ Allocate(JSIteratorResult::kSize, r3, r5, r6, &runtime, |
| 3186 NO_ALLOCATION_FLAGS); |
3185 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, r4); | 3187 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, r4); |
3186 __ Pop(r5, r6); | 3188 __ Pop(r5, r6); |
3187 __ LoadRoot(r7, Heap::kEmptyFixedArrayRootIndex); | 3189 __ LoadRoot(r7, Heap::kEmptyFixedArrayRootIndex); |
3188 __ StoreP(r4, FieldMemOperand(r3, HeapObject::kMapOffset), r0); | 3190 __ StoreP(r4, FieldMemOperand(r3, HeapObject::kMapOffset), r0); |
3189 __ StoreP(r7, FieldMemOperand(r3, JSObject::kPropertiesOffset), r0); | 3191 __ StoreP(r7, FieldMemOperand(r3, JSObject::kPropertiesOffset), r0); |
3190 __ StoreP(r7, FieldMemOperand(r3, JSObject::kElementsOffset), r0); | 3192 __ StoreP(r7, FieldMemOperand(r3, JSObject::kElementsOffset), r0); |
3191 __ StoreP(r5, FieldMemOperand(r3, JSIteratorResult::kValueOffset), r0); | 3193 __ StoreP(r5, FieldMemOperand(r3, JSIteratorResult::kValueOffset), r0); |
3192 __ StoreP(r6, FieldMemOperand(r3, JSIteratorResult::kDoneOffset), r0); | 3194 __ StoreP(r6, FieldMemOperand(r3, JSIteratorResult::kDoneOffset), r0); |
3193 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); | 3195 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); |
3194 __ b(&done); | 3196 __ b(&done); |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3940 | 3942 |
3941 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3943 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
3942 | 3944 |
3943 DCHECK(interrupt_address == | 3945 DCHECK(interrupt_address == |
3944 isolate->builtins()->OnStackReplacement()->entry()); | 3946 isolate->builtins()->OnStackReplacement()->entry()); |
3945 return ON_STACK_REPLACEMENT; | 3947 return ON_STACK_REPLACEMENT; |
3946 } | 3948 } |
3947 } // namespace internal | 3949 } // namespace internal |
3948 } // namespace v8 | 3950 } // namespace v8 |
3949 #endif // V8_TARGET_ARCH_PPC | 3951 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |