| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 __ Branch(&only_change_map, eq, at, Operand(t0)); | 199 __ Branch(&only_change_map, eq, at, Operand(t0)); |
| 200 | 200 |
| 201 __ push(ra); | 201 __ push(ra); |
| 202 __ lw(t1, FieldMemOperand(t0, FixedArray::kLengthOffset)); | 202 __ lw(t1, FieldMemOperand(t0, FixedArray::kLengthOffset)); |
| 203 // t0: source FixedArray | 203 // t0: source FixedArray |
| 204 // t1: number of elements (smi-tagged) | 204 // t1: number of elements (smi-tagged) |
| 205 | 205 |
| 206 // Allocate new FixedDoubleArray. | 206 // Allocate new FixedDoubleArray. |
| 207 __ sll(scratch, t1, 2); | 207 __ sll(scratch, t1, 2); |
| 208 __ Addu(scratch, scratch, FixedDoubleArray::kHeaderSize); | 208 __ Addu(scratch, scratch, FixedDoubleArray::kHeaderSize); |
| 209 __ AllocateInNewSpace(scratch, t2, t3, t5, &gc_required, NO_ALLOCATION_FLAGS); | 209 __ Allocate(scratch, t2, t3, t5, &gc_required, NO_ALLOCATION_FLAGS); |
| 210 // t2: destination FixedDoubleArray, not tagged as heap object | 210 // t2: destination FixedDoubleArray, not tagged as heap object |
| 211 |
| 211 // Set destination FixedDoubleArray's length and map. | 212 // Set destination FixedDoubleArray's length and map. |
| 212 __ LoadRoot(t5, Heap::kFixedDoubleArrayMapRootIndex); | 213 __ LoadRoot(t5, Heap::kFixedDoubleArrayMapRootIndex); |
| 213 __ sw(t1, MemOperand(t2, FixedDoubleArray::kLengthOffset)); | 214 __ sw(t1, MemOperand(t2, FixedDoubleArray::kLengthOffset)); |
| 214 __ sw(t5, MemOperand(t2, HeapObject::kMapOffset)); | 215 __ sw(t5, MemOperand(t2, HeapObject::kMapOffset)); |
| 215 // Update receiver's map. | 216 // Update receiver's map. |
| 216 | 217 |
| 217 __ sw(a3, FieldMemOperand(a2, HeapObject::kMapOffset)); | 218 __ sw(a3, FieldMemOperand(a2, HeapObject::kMapOffset)); |
| 218 __ RecordWriteField(a2, | 219 __ RecordWriteField(a2, |
| 219 HeapObject::kMapOffset, | 220 HeapObject::kMapOffset, |
| 220 a3, | 221 a3, |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 | 345 |
| 345 __ MultiPush(a0.bit() | a1.bit() | a2.bit() | a3.bit() | ra.bit()); | 346 __ MultiPush(a0.bit() | a1.bit() | a2.bit() | a3.bit() | ra.bit()); |
| 346 | 347 |
| 347 __ lw(t1, FieldMemOperand(t0, FixedArray::kLengthOffset)); | 348 __ lw(t1, FieldMemOperand(t0, FixedArray::kLengthOffset)); |
| 348 // t0: source FixedArray | 349 // t0: source FixedArray |
| 349 // t1: number of elements (smi-tagged) | 350 // t1: number of elements (smi-tagged) |
| 350 | 351 |
| 351 // Allocate new FixedArray. | 352 // Allocate new FixedArray. |
| 352 __ sll(a0, t1, 1); | 353 __ sll(a0, t1, 1); |
| 353 __ Addu(a0, a0, FixedDoubleArray::kHeaderSize); | 354 __ Addu(a0, a0, FixedDoubleArray::kHeaderSize); |
| 354 __ AllocateInNewSpace(a0, t2, t3, t5, &gc_required, NO_ALLOCATION_FLAGS); | 355 __ Allocate(a0, t2, t3, t5, &gc_required, NO_ALLOCATION_FLAGS); |
| 355 // t2: destination FixedArray, not tagged as heap object | 356 // t2: destination FixedArray, not tagged as heap object |
| 356 // Set destination FixedDoubleArray's length and map. | 357 // Set destination FixedDoubleArray's length and map. |
| 357 __ LoadRoot(t5, Heap::kFixedArrayMapRootIndex); | 358 __ LoadRoot(t5, Heap::kFixedArrayMapRootIndex); |
| 358 __ sw(t1, MemOperand(t2, FixedDoubleArray::kLengthOffset)); | 359 __ sw(t1, MemOperand(t2, FixedDoubleArray::kLengthOffset)); |
| 359 __ sw(t5, MemOperand(t2, HeapObject::kMapOffset)); | 360 __ sw(t5, MemOperand(t2, HeapObject::kMapOffset)); |
| 360 | 361 |
| 361 // Prepare for conversion loop. | 362 // Prepare for conversion loop. |
| 362 __ Addu(t0, t0, Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag + 4)); | 363 __ Addu(t0, t0, Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag + 4)); |
| 363 __ Addu(a3, t2, Operand(FixedArray::kHeaderSize)); | 364 __ Addu(a3, t2, Operand(FixedArray::kHeaderSize)); |
| 364 __ Addu(t2, t2, Operand(kHeapObjectTag)); | 365 __ Addu(t2, t2, Operand(kHeapObjectTag)); |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); | 721 patcher.masm()->dd(reinterpret_cast<uint32_t>(stub->instruction_start())); |
| 721 } | 722 } |
| 722 } | 723 } |
| 723 | 724 |
| 724 | 725 |
| 725 #undef __ | 726 #undef __ |
| 726 | 727 |
| 727 } } // namespace v8::internal | 728 } } // namespace v8::internal |
| 728 | 729 |
| 729 #endif // V8_TARGET_ARCH_MIPS | 730 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |