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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
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 1885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1896 int expected_diff = StandardFrameConstants::kFixedFrameSizeFromFp + | 1896 int expected_diff = StandardFrameConstants::kFixedFrameSizeFromFp + |
1897 operand_stack_depth_ * kPointerSize; | 1897 operand_stack_depth_ * kPointerSize; |
1898 __ Dsubu(v0, fp, sp); | 1898 __ Dsubu(v0, fp, sp); |
1899 __ Assert(eq, kUnexpectedStackDepth, v0, Operand(expected_diff)); | 1899 __ Assert(eq, kUnexpectedStackDepth, v0, Operand(expected_diff)); |
1900 } | 1900 } |
1901 } | 1901 } |
1902 | 1902 |
1903 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { | 1903 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { |
1904 Label allocate, done_allocate; | 1904 Label allocate, done_allocate; |
1905 | 1905 |
1906 __ Allocate(JSIteratorResult::kSize, v0, a2, a3, &allocate, TAG_OBJECT); | 1906 __ Allocate(JSIteratorResult::kSize, v0, a2, a3, &allocate, |
| 1907 NO_ALLOCATION_FLAGS); |
1907 __ jmp(&done_allocate); | 1908 __ jmp(&done_allocate); |
1908 | 1909 |
1909 __ bind(&allocate); | 1910 __ bind(&allocate); |
1910 __ Push(Smi::FromInt(JSIteratorResult::kSize)); | 1911 __ Push(Smi::FromInt(JSIteratorResult::kSize)); |
1911 __ CallRuntime(Runtime::kAllocateInNewSpace); | 1912 __ CallRuntime(Runtime::kAllocateInNewSpace); |
1912 | 1913 |
1913 __ bind(&done_allocate); | 1914 __ bind(&done_allocate); |
1914 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, a1); | 1915 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, a1); |
1915 PopOperand(a2); | 1916 PopOperand(a2); |
1916 __ LoadRoot(a3, | 1917 __ LoadRoot(a3, |
(...skipping 1290 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(a4, Heap::kEmptyFixedArrayRootIndex); | 3222 __ LoadRoot(a4, Heap::kEmptyFixedArrayRootIndex); |
3221 __ sd(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); | 3223 __ sd(a1, FieldMemOperand(v0, HeapObject::kMapOffset)); |
3222 __ sd(a4, FieldMemOperand(v0, JSObject::kPropertiesOffset)); | 3224 __ sd(a4, FieldMemOperand(v0, JSObject::kPropertiesOffset)); |
3223 __ sd(a4, FieldMemOperand(v0, JSObject::kElementsOffset)); | 3225 __ sd(a4, FieldMemOperand(v0, JSObject::kElementsOffset)); |
3224 __ sd(a2, FieldMemOperand(v0, JSIteratorResult::kValueOffset)); | 3226 __ sd(a2, FieldMemOperand(v0, JSIteratorResult::kValueOffset)); |
3225 __ sd(a3, FieldMemOperand(v0, JSIteratorResult::kDoneOffset)); | 3227 __ sd(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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3992 reinterpret_cast<uint64_t>( | 3994 reinterpret_cast<uint64_t>( |
3993 isolate->builtins()->OnStackReplacement()->entry())); | 3995 isolate->builtins()->OnStackReplacement()->entry())); |
3994 return ON_STACK_REPLACEMENT; | 3996 return ON_STACK_REPLACEMENT; |
3995 } | 3997 } |
3996 | 3998 |
3997 | 3999 |
3998 } // namespace internal | 4000 } // namespace internal |
3999 } // namespace v8 | 4001 } // namespace v8 |
4000 | 4002 |
4001 #endif // V8_TARGET_ARCH_MIPS64 | 4003 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |