| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 index -= object->map()->inobject_properties(); | 768 index -= object->map()->inobject_properties(); |
| 769 | 769 |
| 770 if (index < 0) { | 770 if (index < 0) { |
| 771 // Set the property straight into the object. | 771 // Set the property straight into the object. |
| 772 int offset = object->map()->instance_size() + (index * kPointerSize); | 772 int offset = object->map()->instance_size() + (index * kPointerSize); |
| 773 __ movq(FieldOperand(receiver_reg, offset), rax); | 773 __ movq(FieldOperand(receiver_reg, offset), rax); |
| 774 | 774 |
| 775 // Update the write barrier for the array address. | 775 // Update the write barrier for the array address. |
| 776 // Pass the value being stored in the now unused name_reg. | 776 // Pass the value being stored in the now unused name_reg. |
| 777 __ movq(name_reg, rax); | 777 __ movq(name_reg, rax); |
| 778 __ RecordWrite(receiver_reg, offset, name_reg, scratch, kDontSaveFPRegs); | 778 __ RecordWriteField( |
| 779 receiver_reg, offset, name_reg, scratch, kDontSaveFPRegs); |
| 779 } else { | 780 } else { |
| 780 // Write to the properties array. | 781 // Write to the properties array. |
| 781 int offset = index * kPointerSize + FixedArray::kHeaderSize; | 782 int offset = index * kPointerSize + FixedArray::kHeaderSize; |
| 782 // Get the properties array (optimistically). | 783 // Get the properties array (optimistically). |
| 783 __ movq(scratch, FieldOperand(receiver_reg, JSObject::kPropertiesOffset)); | 784 __ movq(scratch, FieldOperand(receiver_reg, JSObject::kPropertiesOffset)); |
| 784 __ movq(FieldOperand(scratch, offset), rax); | 785 __ movq(FieldOperand(scratch, offset), rax); |
| 785 | 786 |
| 786 // Update the write barrier for the array address. | 787 // Update the write barrier for the array address. |
| 787 // Pass the value being stored in the now unused name_reg. | 788 // Pass the value being stored in the now unused name_reg. |
| 788 __ movq(name_reg, rax); | 789 __ movq(name_reg, rax); |
| 789 __ RecordWrite(scratch, offset, name_reg, receiver_reg, kDontSaveFPRegs); | 790 __ RecordWriteField( |
| 791 scratch, offset, name_reg, receiver_reg, kDontSaveFPRegs); |
| 790 } | 792 } |
| 791 | 793 |
| 792 // Return the value (register rax). | 794 // Return the value (register rax). |
| 793 __ ret(0); | 795 __ ret(0); |
| 794 } | 796 } |
| 795 | 797 |
| 796 | 798 |
| 797 // Generate code to check that a global property cell is empty. Create | 799 // Generate code to check that a global property cell is empty. Create |
| 798 // the property cell at compilation time if no cell exists for the | 800 // the property cell at compilation time if no cell exists for the |
| 799 // property. | 801 // property. |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1439 // Check if value is a smi. | 1441 // Check if value is a smi. |
| 1440 __ Integer32ToSmi(rax, rax); // Return new length as smi. | 1442 __ Integer32ToSmi(rax, rax); // Return new length as smi. |
| 1441 | 1443 |
| 1442 __ JumpIfNotSmi(rcx, &with_write_barrier); | 1444 __ JumpIfNotSmi(rcx, &with_write_barrier); |
| 1443 | 1445 |
| 1444 __ bind(&exit); | 1446 __ bind(&exit); |
| 1445 __ ret((argc + 1) * kPointerSize); | 1447 __ ret((argc + 1) * kPointerSize); |
| 1446 | 1448 |
| 1447 __ bind(&with_write_barrier); | 1449 __ bind(&with_write_barrier); |
| 1448 | 1450 |
| 1449 __ InNewSpace(rbx, rcx, equal, &exit); | 1451 __ RecordWrite( |
| 1450 | 1452 rbx, rdx, rcx, kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
| 1451 __ RecordWriteHelper(rbx, rdx, rcx, kDontSaveFPRegs); | |
| 1452 | 1453 |
| 1453 __ ret((argc + 1) * kPointerSize); | 1454 __ ret((argc + 1) * kPointerSize); |
| 1454 | 1455 |
| 1455 __ bind(&attempt_to_grow_elements); | 1456 __ bind(&attempt_to_grow_elements); |
| 1456 if (!FLAG_inline_new) { | 1457 if (!FLAG_inline_new) { |
| 1457 __ jmp(&call_builtin); | 1458 __ jmp(&call_builtin); |
| 1458 } | 1459 } |
| 1459 | 1460 |
| 1460 ExternalReference new_space_allocation_top = | 1461 ExternalReference new_space_allocation_top = |
| 1461 ExternalReference::new_space_allocation_top_address(isolate()); | 1462 ExternalReference::new_space_allocation_top_address(isolate()); |
| (...skipping 2140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3602 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); | 3603 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); |
| 3603 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); | 3604 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); |
| 3604 } | 3605 } |
| 3605 | 3606 |
| 3606 | 3607 |
| 3607 #undef __ | 3608 #undef __ |
| 3608 | 3609 |
| 3609 } } // namespace v8::internal | 3610 } } // namespace v8::internal |
| 3610 | 3611 |
| 3611 #endif // V8_TARGET_ARCH_X64 | 3612 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |