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 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 5224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5235 // -- cp : context | 5235 // -- cp : context |
5236 // -- a0 : number of rest parameters (tagged) | 5236 // -- a0 : number of rest parameters (tagged) |
5237 // -- a2 : pointer to first rest parameters | 5237 // -- a2 : pointer to first rest parameters |
5238 // -- ra : return address | 5238 // -- ra : return address |
5239 // ----------------------------------- | 5239 // ----------------------------------- |
5240 | 5240 |
5241 // Allocate space for the rest parameter array plus the backing store. | 5241 // Allocate space for the rest parameter array plus the backing store. |
5242 Label allocate, done_allocate; | 5242 Label allocate, done_allocate; |
5243 __ li(a1, Operand(JSArray::kSize + FixedArray::kHeaderSize)); | 5243 __ li(a1, Operand(JSArray::kSize + FixedArray::kHeaderSize)); |
5244 __ Lsa(a1, a1, a0, kPointerSizeLog2 - 1); | 5244 __ Lsa(a1, a1, a0, kPointerSizeLog2 - 1); |
5245 __ Allocate(a1, v0, a3, at, &allocate, TAG_OBJECT); | 5245 __ Allocate(a1, v0, a3, t0, &allocate, TAG_OBJECT); |
5246 __ bind(&done_allocate); | 5246 __ bind(&done_allocate); |
5247 | 5247 |
5248 // Setup the elements array in v0. | 5248 // Setup the elements array in v0. |
5249 __ LoadRoot(at, Heap::kFixedArrayMapRootIndex); | 5249 __ LoadRoot(at, Heap::kFixedArrayMapRootIndex); |
5250 __ sw(at, FieldMemOperand(v0, FixedArray::kMapOffset)); | 5250 __ sw(at, FieldMemOperand(v0, FixedArray::kMapOffset)); |
5251 __ sw(a0, FieldMemOperand(v0, FixedArray::kLengthOffset)); | 5251 __ sw(a0, FieldMemOperand(v0, FixedArray::kLengthOffset)); |
5252 __ Addu(a3, v0, Operand(FixedArray::kHeaderSize)); | 5252 __ Addu(a3, v0, Operand(FixedArray::kHeaderSize)); |
5253 { | 5253 { |
5254 Label loop, done_loop; | 5254 Label loop, done_loop; |
5255 __ sll(at, a0, kPointerSizeLog2 - 1); | 5255 __ sll(at, a0, kPointerSizeLog2 - 1); |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5742 return_value_operand, NULL); | 5742 return_value_operand, NULL); |
5743 } | 5743 } |
5744 | 5744 |
5745 | 5745 |
5746 #undef __ | 5746 #undef __ |
5747 | 5747 |
5748 } // namespace internal | 5748 } // namespace internal |
5749 } // namespace v8 | 5749 } // namespace v8 |
5750 | 5750 |
5751 #endif // V8_TARGET_ARCH_MIPS | 5751 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |