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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
8 // | 8 // |
9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
(...skipping 1884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1895 int expected_diff = StandardFrameConstants::kFixedFrameSizeFromFp + | 1895 int expected_diff = StandardFrameConstants::kFixedFrameSizeFromFp + |
1896 operand_stack_depth_ * kPointerSize; | 1896 operand_stack_depth_ * kPointerSize; |
1897 __ Subu(v0, fp, sp); | 1897 __ Subu(v0, fp, sp); |
1898 __ Assert(eq, kUnexpectedStackDepth, v0, Operand(expected_diff)); | 1898 __ Assert(eq, kUnexpectedStackDepth, v0, Operand(expected_diff)); |
1899 } | 1899 } |
1900 } | 1900 } |
1901 | 1901 |
1902 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { | 1902 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { |
1903 Label allocate, done_allocate; | 1903 Label allocate, done_allocate; |
1904 | 1904 |
1905 __ Allocate(JSIteratorResult::kSize, v0, a2, a3, &allocate, TAG_OBJECT); | 1905 __ Allocate(JSIteratorResult::kSize, v0, a2, a3, &allocate, |
| 1906 NO_ALLOCATION_FLAGS); |
1906 __ jmp(&done_allocate); | 1907 __ jmp(&done_allocate); |
1907 | 1908 |
1908 __ bind(&allocate); | 1909 __ bind(&allocate); |
1909 __ Push(Smi::FromInt(JSIteratorResult::kSize)); | 1910 __ Push(Smi::FromInt(JSIteratorResult::kSize)); |
1910 __ CallRuntime(Runtime::kAllocateInNewSpace); | 1911 __ CallRuntime(Runtime::kAllocateInNewSpace); |
1911 | 1912 |
1912 __ bind(&done_allocate); | 1913 __ bind(&done_allocate); |
1913 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, a1); | 1914 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, a1); |
1914 PopOperand(a2); | 1915 PopOperand(a2); |
1915 __ LoadRoot(a3, | 1916 __ LoadRoot(a3, |
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3207 | 3208 |
3208 | 3209 |
3209 void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { | 3210 void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { |
3210 ZoneList<Expression*>* args = expr->arguments(); | 3211 ZoneList<Expression*>* args = expr->arguments(); |
3211 DCHECK_EQ(2, args->length()); | 3212 DCHECK_EQ(2, args->length()); |
3212 VisitForStackValue(args->at(0)); | 3213 VisitForStackValue(args->at(0)); |
3213 VisitForStackValue(args->at(1)); | 3214 VisitForStackValue(args->at(1)); |
3214 | 3215 |
3215 Label runtime, done; | 3216 Label runtime, done; |
3216 | 3217 |
3217 __ Allocate(JSIteratorResult::kSize, v0, a2, a3, &runtime, TAG_OBJECT); | 3218 __ Allocate(JSIteratorResult::kSize, v0, a2, a3, &runtime, |
| 3219 NO_ALLOCATION_FLAGS); |
3218 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, a1); | 3220 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, a1); |
3219 __ Pop(a2, a3); | 3221 __ Pop(a2, a3); |
3220 __ LoadRoot(t0, Heap::kEmptyFixedArrayRootIndex); | 3222 __ LoadRoot(t0, Heap::kEmptyFixedArrayRootIndex); |
3221 __ sw(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); | 3223 __ sw(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); |
3222 __ sw(t0, FieldMemOperand(v0, JSObject::kPropertiesOffset)); | 3224 __ sw(t0, FieldMemOperand(v0, JSObject::kPropertiesOffset)); |
3223 __ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset)); | 3225 __ sw(t0, FieldMemOperand(v0, JSObject::kElementsOffset)); |
3224 __ sw(a2, FieldMemOperand(v0, JSIteratorResult::kValueOffset)); | 3226 __ sw(a2, FieldMemOperand(v0, JSIteratorResult::kValueOffset)); |
3225 __ sw(a3, FieldMemOperand(v0, JSIteratorResult::kDoneOffset)); | 3227 __ sw(a3, FieldMemOperand(v0, JSIteratorResult::kDoneOffset)); |
3226 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); | 3228 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); |
3227 __ jmp(&done); | 3229 __ jmp(&done); |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3984 reinterpret_cast<uint32_t>( | 3986 reinterpret_cast<uint32_t>( |
3985 isolate->builtins()->OnStackReplacement()->entry())); | 3987 isolate->builtins()->OnStackReplacement()->entry())); |
3986 return ON_STACK_REPLACEMENT; | 3988 return ON_STACK_REPLACEMENT; |
3987 } | 3989 } |
3988 | 3990 |
3989 | 3991 |
3990 } // namespace internal | 3992 } // namespace internal |
3991 } // namespace v8 | 3993 } // namespace v8 |
3992 | 3994 |
3993 #endif // V8_TARGET_ARCH_MIPS | 3995 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |