| 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 STATIC_ASSERT(FixedDoubleArray::kHeaderSize == FixedArray::kHeaderSize); | 340 STATIC_ASSERT(FixedDoubleArray::kHeaderSize == FixedArray::kHeaderSize); |
| 341 | 341 |
| 342 Label loop, entry, convert_hole; | 342 Label loop, entry, convert_hole; |
| 343 __ movq(r15, BitCast<int64_t, uint64_t>(kHoleNanInt64), RelocInfo::NONE64); | 343 __ movq(r15, BitCast<int64_t, uint64_t>(kHoleNanInt64), RelocInfo::NONE64); |
| 344 // r15: the-hole NaN | 344 // r15: the-hole NaN |
| 345 __ jmp(&entry); | 345 __ jmp(&entry); |
| 346 | 346 |
| 347 // Allocate new backing store. | 347 // Allocate new backing store. |
| 348 __ bind(&new_backing_store); | 348 __ bind(&new_backing_store); |
| 349 __ lea(rdi, Operand(r9, times_pointer_size, FixedArray::kHeaderSize)); | 349 __ lea(rdi, Operand(r9, times_pointer_size, FixedArray::kHeaderSize)); |
| 350 __ AllocateInNewSpace(rdi, r14, r11, r15, fail, TAG_OBJECT); | 350 __ Allocate(rdi, r14, r11, r15, fail, TAG_OBJECT); |
| 351 // Set backing store's map | 351 // Set backing store's map |
| 352 __ LoadRoot(rdi, Heap::kFixedDoubleArrayMapRootIndex); | 352 __ LoadRoot(rdi, Heap::kFixedDoubleArrayMapRootIndex); |
| 353 __ movq(FieldOperand(r14, HeapObject::kMapOffset), rdi); | 353 __ movq(FieldOperand(r14, HeapObject::kMapOffset), rdi); |
| 354 // Set receiver's backing store. | 354 // Set receiver's backing store. |
| 355 __ movq(FieldOperand(rdx, JSObject::kElementsOffset), r14); | 355 __ movq(FieldOperand(rdx, JSObject::kElementsOffset), r14); |
| 356 __ movq(r11, r14); | 356 __ movq(r11, r14); |
| 357 __ RecordWriteField(rdx, | 357 __ RecordWriteField(rdx, |
| 358 JSObject::kElementsOffset, | 358 JSObject::kElementsOffset, |
| 359 r11, | 359 r11, |
| 360 r15, | 360 r15, |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 __ CompareRoot(r8, Heap::kEmptyFixedArrayRootIndex); | 428 __ CompareRoot(r8, Heap::kEmptyFixedArrayRootIndex); |
| 429 __ j(equal, &only_change_map); | 429 __ j(equal, &only_change_map); |
| 430 | 430 |
| 431 __ push(rax); | 431 __ push(rax); |
| 432 | 432 |
| 433 __ movq(r8, FieldOperand(rdx, JSObject::kElementsOffset)); | 433 __ movq(r8, FieldOperand(rdx, JSObject::kElementsOffset)); |
| 434 __ SmiToInteger32(r9, FieldOperand(r8, FixedDoubleArray::kLengthOffset)); | 434 __ SmiToInteger32(r9, FieldOperand(r8, FixedDoubleArray::kLengthOffset)); |
| 435 // r8 : source FixedDoubleArray | 435 // r8 : source FixedDoubleArray |
| 436 // r9 : number of elements | 436 // r9 : number of elements |
| 437 __ lea(rdi, Operand(r9, times_pointer_size, FixedArray::kHeaderSize)); | 437 __ lea(rdi, Operand(r9, times_pointer_size, FixedArray::kHeaderSize)); |
| 438 __ AllocateInNewSpace(rdi, r11, r14, r15, &gc_required, TAG_OBJECT); | 438 __ Allocate(rdi, r11, r14, r15, &gc_required, TAG_OBJECT); |
| 439 // r11: destination FixedArray | 439 // r11: destination FixedArray |
| 440 __ LoadRoot(rdi, Heap::kFixedArrayMapRootIndex); | 440 __ LoadRoot(rdi, Heap::kFixedArrayMapRootIndex); |
| 441 __ movq(FieldOperand(r11, HeapObject::kMapOffset), rdi); | 441 __ movq(FieldOperand(r11, HeapObject::kMapOffset), rdi); |
| 442 __ Integer32ToSmi(r14, r9); | 442 __ Integer32ToSmi(r14, r9); |
| 443 __ movq(FieldOperand(r11, FixedArray::kLengthOffset), r14); | 443 __ movq(FieldOperand(r11, FixedArray::kLengthOffset), r14); |
| 444 | 444 |
| 445 // Prepare for conversion loop. | 445 // Prepare for conversion loop. |
| 446 __ movq(rsi, BitCast<int64_t, uint64_t>(kHoleNanInt64), RelocInfo::NONE64); | 446 __ movq(rsi, BitCast<int64_t, uint64_t>(kHoleNanInt64), RelocInfo::NONE64); |
| 447 __ LoadRoot(rdi, Heap::kTheHoleValueRootIndex); | 447 __ LoadRoot(rdi, Heap::kTheHoleValueRootIndex); |
| 448 // rsi: the-hole NaN | 448 // rsi: the-hole NaN |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 CodePatcher patcher(sequence, young_length); | 776 CodePatcher patcher(sequence, young_length); |
| 777 patcher.masm()->call(stub->instruction_start()); | 777 patcher.masm()->call(stub->instruction_start()); |
| 778 patcher.masm()->nop(); | 778 patcher.masm()->nop(); |
| 779 } | 779 } |
| 780 } | 780 } |
| 781 | 781 |
| 782 | 782 |
| 783 } } // namespace v8::internal | 783 } } // namespace v8::internal |
| 784 | 784 |
| 785 #endif // V8_TARGET_ARCH_X64 | 785 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |