| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 __ push(eax); | 443 __ push(eax); |
| 444 __ push(ebx); | 444 __ push(ebx); |
| 445 | 445 |
| 446 __ mov(edi, FieldOperand(edi, FixedArray::kLengthOffset)); | 446 __ mov(edi, FieldOperand(edi, FixedArray::kLengthOffset)); |
| 447 | 447 |
| 448 // Allocate new FixedDoubleArray. | 448 // Allocate new FixedDoubleArray. |
| 449 // edx: receiver | 449 // edx: receiver |
| 450 // edi: length of source FixedArray (smi-tagged) | 450 // edi: length of source FixedArray (smi-tagged) |
| 451 AllocationFlags flags = | 451 AllocationFlags flags = |
| 452 static_cast<AllocationFlags>(TAG_OBJECT | DOUBLE_ALIGNMENT); | 452 static_cast<AllocationFlags>(TAG_OBJECT | DOUBLE_ALIGNMENT); |
| 453 __ AllocateInNewSpace(FixedDoubleArray::kHeaderSize, times_8, | 453 __ Allocate(FixedDoubleArray::kHeaderSize, times_8, edi, |
| 454 edi, REGISTER_VALUE_IS_SMI, | 454 REGISTER_VALUE_IS_SMI, eax, ebx, no_reg, &gc_required, flags); |
| 455 eax, ebx, no_reg, &gc_required, flags); | |
| 456 | 455 |
| 457 // eax: destination FixedDoubleArray | 456 // eax: destination FixedDoubleArray |
| 458 // edi: number of elements | 457 // edi: number of elements |
| 459 // edx: receiver | 458 // edx: receiver |
| 460 __ mov(FieldOperand(eax, HeapObject::kMapOffset), | 459 __ mov(FieldOperand(eax, HeapObject::kMapOffset), |
| 461 Immediate(masm->isolate()->factory()->fixed_double_array_map())); | 460 Immediate(masm->isolate()->factory()->fixed_double_array_map())); |
| 462 __ mov(FieldOperand(eax, FixedDoubleArray::kLengthOffset), edi); | 461 __ mov(FieldOperand(eax, FixedDoubleArray::kLengthOffset), edi); |
| 463 __ mov(esi, FieldOperand(edx, JSObject::kElementsOffset)); | 462 __ mov(esi, FieldOperand(edx, JSObject::kElementsOffset)); |
| 464 // Replace receiver's backing store with newly created FixedDoubleArray. | 463 // Replace receiver's backing store with newly created FixedDoubleArray. |
| 465 __ mov(FieldOperand(edx, JSObject::kElementsOffset), eax); | 464 __ mov(FieldOperand(edx, JSObject::kElementsOffset), eax); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 | 581 |
| 583 __ push(eax); | 582 __ push(eax); |
| 584 __ push(edx); | 583 __ push(edx); |
| 585 __ push(ebx); | 584 __ push(ebx); |
| 586 | 585 |
| 587 __ mov(ebx, FieldOperand(edi, FixedDoubleArray::kLengthOffset)); | 586 __ mov(ebx, FieldOperand(edi, FixedDoubleArray::kLengthOffset)); |
| 588 | 587 |
| 589 // Allocate new FixedArray. | 588 // Allocate new FixedArray. |
| 590 // ebx: length of source FixedDoubleArray (smi-tagged) | 589 // ebx: length of source FixedDoubleArray (smi-tagged) |
| 591 __ lea(edi, Operand(ebx, times_2, FixedArray::kHeaderSize)); | 590 __ lea(edi, Operand(ebx, times_2, FixedArray::kHeaderSize)); |
| 592 __ AllocateInNewSpace(edi, eax, esi, no_reg, &gc_required, TAG_OBJECT); | 591 __ Allocate(edi, eax, esi, no_reg, &gc_required, TAG_OBJECT); |
| 593 | 592 |
| 594 // eax: destination FixedArray | 593 // eax: destination FixedArray |
| 595 // ebx: number of elements | 594 // ebx: number of elements |
| 596 __ mov(FieldOperand(eax, HeapObject::kMapOffset), | 595 __ mov(FieldOperand(eax, HeapObject::kMapOffset), |
| 597 Immediate(masm->isolate()->factory()->fixed_array_map())); | 596 Immediate(masm->isolate()->factory()->fixed_array_map())); |
| 598 __ mov(FieldOperand(eax, FixedArray::kLengthOffset), ebx); | 597 __ mov(FieldOperand(eax, FixedArray::kLengthOffset), ebx); |
| 599 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); | 598 __ mov(edi, FieldOperand(edx, JSObject::kElementsOffset)); |
| 600 | 599 |
| 601 __ jmp(&entry); | 600 __ jmp(&entry); |
| 602 | 601 |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 Code* stub = GetCodeAgeStub(age, parity); | 957 Code* stub = GetCodeAgeStub(age, parity); |
| 959 CodePatcher patcher(sequence, young_length); | 958 CodePatcher patcher(sequence, young_length); |
| 960 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); | 959 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); |
| 961 } | 960 } |
| 962 } | 961 } |
| 963 | 962 |
| 964 | 963 |
| 965 } } // namespace v8::internal | 964 } } // namespace v8::internal |
| 966 | 965 |
| 967 #endif // V8_TARGET_ARCH_IA32 | 966 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |