OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 4692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4703 | 4703 |
4704 __ CheckPageFlagSet(regs_.object(), | 4704 __ CheckPageFlagSet(regs_.object(), |
4705 value, | 4705 value, |
4706 1 << MemoryChunk::SCAN_ON_SCAVENGE, | 4706 1 << MemoryChunk::SCAN_ON_SCAVENGE, |
4707 &dont_need_remembered_set); | 4707 &dont_need_remembered_set); |
4708 | 4708 |
4709 // First notify the incremental marker if necessary, then update the | 4709 // First notify the incremental marker if necessary, then update the |
4710 // remembered set. | 4710 // remembered set. |
4711 CheckNeedsToInformIncrementalMarker( | 4711 CheckNeedsToInformIncrementalMarker( |
4712 masm, kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, mode); | 4712 masm, kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, mode); |
4713 InformIncrementalMarker(masm, mode); | 4713 InformIncrementalMarker(masm); |
4714 regs_.Restore(masm); // Restore the extra scratch registers we used. | 4714 regs_.Restore(masm); // Restore the extra scratch registers we used. |
4715 __ RememberedSetHelper(object_, | 4715 __ RememberedSetHelper(object_, |
4716 address_, | 4716 address_, |
4717 value_, | 4717 value_, |
4718 save_fp_regs_mode_, | 4718 save_fp_regs_mode_, |
4719 MacroAssembler::kReturnAtEnd); | 4719 MacroAssembler::kReturnAtEnd); |
4720 | 4720 |
4721 __ Bind(&dont_need_remembered_set); | 4721 __ Bind(&dont_need_remembered_set); |
4722 } | 4722 } |
4723 | 4723 |
4724 CheckNeedsToInformIncrementalMarker( | 4724 CheckNeedsToInformIncrementalMarker( |
4725 masm, kReturnOnNoNeedToInformIncrementalMarker, mode); | 4725 masm, kReturnOnNoNeedToInformIncrementalMarker, mode); |
4726 InformIncrementalMarker(masm, mode); | 4726 InformIncrementalMarker(masm); |
4727 regs_.Restore(masm); // Restore the extra scratch registers we used. | 4727 regs_.Restore(masm); // Restore the extra scratch registers we used. |
4728 __ Ret(); | 4728 __ Ret(); |
4729 } | 4729 } |
4730 | 4730 |
4731 | 4731 |
4732 void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm, Mode mode) { | 4732 void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm) { |
4733 regs_.SaveCallerSaveRegisters(masm, save_fp_regs_mode_); | 4733 regs_.SaveCallerSaveRegisters(masm, save_fp_regs_mode_); |
4734 Register address = | 4734 Register address = |
4735 x0.Is(regs_.address()) ? regs_.scratch0() : regs_.address(); | 4735 x0.Is(regs_.address()) ? regs_.scratch0() : regs_.address(); |
4736 ASSERT(!address.Is(regs_.object())); | 4736 ASSERT(!address.Is(regs_.object())); |
4737 ASSERT(!address.Is(x0)); | 4737 ASSERT(!address.Is(x0)); |
4738 __ Mov(address, regs_.address()); | 4738 __ Mov(address, regs_.address()); |
4739 __ Mov(x0, regs_.object()); | 4739 __ Mov(x0, regs_.object()); |
4740 __ Mov(x1, address); | 4740 __ Mov(x1, address); |
4741 __ Mov(x2, Operand(ExternalReference::isolate_address(masm->isolate()))); | 4741 __ Mov(x2, Operand(ExternalReference::isolate_address(masm->isolate()))); |
4742 | 4742 |
4743 AllowExternalCallThatCantCauseGC scope(masm); | 4743 AllowExternalCallThatCantCauseGC scope(masm); |
4744 ExternalReference function = (mode == INCREMENTAL_COMPACTION) | 4744 ExternalReference function = |
4745 ? ExternalReference::incremental_evacuation_record_write_function( | 4745 ExternalReference::incremental_marking_record_write_function( |
4746 masm->isolate()) | |
4747 : ExternalReference::incremental_marking_record_write_function( | |
4748 masm->isolate()); | 4746 masm->isolate()); |
4749 __ CallCFunction(function, 3, 0); | 4747 __ CallCFunction(function, 3, 0); |
4750 | 4748 |
4751 regs_.RestoreCallerSaveRegisters(masm, save_fp_regs_mode_); | 4749 regs_.RestoreCallerSaveRegisters(masm, save_fp_regs_mode_); |
4752 } | 4750 } |
4753 | 4751 |
4754 | 4752 |
4755 void RecordWriteStub::CheckNeedsToInformIncrementalMarker( | 4753 void RecordWriteStub::CheckNeedsToInformIncrementalMarker( |
4756 MacroAssembler* masm, | 4754 MacroAssembler* masm, |
4757 OnNoNeedToInformIncrementalMarker on_no_need, | 4755 OnNoNeedToInformIncrementalMarker on_no_need, |
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5796 MemOperand(fp, 6 * kPointerSize), | 5794 MemOperand(fp, 6 * kPointerSize), |
5797 NULL); | 5795 NULL); |
5798 } | 5796 } |
5799 | 5797 |
5800 | 5798 |
5801 #undef __ | 5799 #undef __ |
5802 | 5800 |
5803 } } // namespace v8::internal | 5801 } } // namespace v8::internal |
5804 | 5802 |
5805 #endif // V8_TARGET_ARCH_A64 | 5803 #endif // V8_TARGET_ARCH_A64 |
OLD | NEW |