Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 185233008: Consolidate RecordWriteFromCode and RecordWriteForEvacuationFromCode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/code-stubs-arm.h ('k') | src/assembler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4820 matching lines...) Expand 10 before | Expand all | Expand 10 after
4831 __ CheckPageFlag(regs_.object(), 4831 __ CheckPageFlag(regs_.object(),
4832 regs_.scratch0(), 4832 regs_.scratch0(),
4833 1 << MemoryChunk::SCAN_ON_SCAVENGE, 4833 1 << MemoryChunk::SCAN_ON_SCAVENGE,
4834 ne, 4834 ne,
4835 &dont_need_remembered_set); 4835 &dont_need_remembered_set);
4836 4836
4837 // First notify the incremental marker if necessary, then update the 4837 // First notify the incremental marker if necessary, then update the
4838 // remembered set. 4838 // remembered set.
4839 CheckNeedsToInformIncrementalMarker( 4839 CheckNeedsToInformIncrementalMarker(
4840 masm, kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, mode); 4840 masm, kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, mode);
4841 InformIncrementalMarker(masm, mode); 4841 InformIncrementalMarker(masm);
4842 regs_.Restore(masm); 4842 regs_.Restore(masm);
4843 __ RememberedSetHelper(object_, 4843 __ RememberedSetHelper(object_,
4844 address_, 4844 address_,
4845 value_, 4845 value_,
4846 save_fp_regs_mode_, 4846 save_fp_regs_mode_,
4847 MacroAssembler::kReturnAtEnd); 4847 MacroAssembler::kReturnAtEnd);
4848 4848
4849 __ bind(&dont_need_remembered_set); 4849 __ bind(&dont_need_remembered_set);
4850 } 4850 }
4851 4851
4852 CheckNeedsToInformIncrementalMarker( 4852 CheckNeedsToInformIncrementalMarker(
4853 masm, kReturnOnNoNeedToInformIncrementalMarker, mode); 4853 masm, kReturnOnNoNeedToInformIncrementalMarker, mode);
4854 InformIncrementalMarker(masm, mode); 4854 InformIncrementalMarker(masm);
4855 regs_.Restore(masm); 4855 regs_.Restore(masm);
4856 __ Ret(); 4856 __ Ret();
4857 } 4857 }
4858 4858
4859 4859
4860 void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm, Mode mode) { 4860 void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm) {
4861 regs_.SaveCallerSaveRegisters(masm, save_fp_regs_mode_); 4861 regs_.SaveCallerSaveRegisters(masm, save_fp_regs_mode_);
4862 int argument_count = 3; 4862 int argument_count = 3;
4863 __ PrepareCallCFunction(argument_count, regs_.scratch0()); 4863 __ PrepareCallCFunction(argument_count, regs_.scratch0());
4864 Register address = 4864 Register address =
4865 r0.is(regs_.address()) ? regs_.scratch0() : regs_.address(); 4865 r0.is(regs_.address()) ? regs_.scratch0() : regs_.address();
4866 ASSERT(!address.is(regs_.object())); 4866 ASSERT(!address.is(regs_.object()));
4867 ASSERT(!address.is(r0)); 4867 ASSERT(!address.is(r0));
4868 __ Move(address, regs_.address()); 4868 __ Move(address, regs_.address());
4869 __ Move(r0, regs_.object()); 4869 __ Move(r0, regs_.object());
4870 __ Move(r1, address); 4870 __ Move(r1, address);
4871 __ mov(r2, Operand(ExternalReference::isolate_address(masm->isolate()))); 4871 __ mov(r2, Operand(ExternalReference::isolate_address(masm->isolate())));
4872 4872
4873 AllowExternalCallThatCantCauseGC scope(masm); 4873 AllowExternalCallThatCantCauseGC scope(masm);
4874 if (mode == INCREMENTAL_COMPACTION) { 4874 __ CallCFunction(
4875 __ CallCFunction( 4875 ExternalReference::incremental_marking_record_write_function(
4876 ExternalReference::incremental_evacuation_record_write_function( 4876 masm->isolate()),
4877 masm->isolate()), 4877 argument_count);
4878 argument_count);
4879 } else {
4880 ASSERT(mode == INCREMENTAL);
4881 __ CallCFunction(
4882 ExternalReference::incremental_marking_record_write_function(
4883 masm->isolate()),
4884 argument_count);
4885 }
4886 regs_.RestoreCallerSaveRegisters(masm, save_fp_regs_mode_); 4878 regs_.RestoreCallerSaveRegisters(masm, save_fp_regs_mode_);
4887 } 4879 }
4888 4880
4889 4881
4890 void RecordWriteStub::CheckNeedsToInformIncrementalMarker( 4882 void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
4891 MacroAssembler* masm, 4883 MacroAssembler* masm,
4892 OnNoNeedToInformIncrementalMarker on_no_need, 4884 OnNoNeedToInformIncrementalMarker on_no_need,
4893 Mode mode) { 4885 Mode mode) {
4894 Label on_black; 4886 Label on_black;
4895 Label need_incremental; 4887 Label need_incremental;
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
5580 MemOperand(fp, 6 * kPointerSize), 5572 MemOperand(fp, 6 * kPointerSize),
5581 NULL); 5573 NULL);
5582 } 5574 }
5583 5575
5584 5576
5585 #undef __ 5577 #undef __
5586 5578
5587 } } // namespace v8::internal 5579 } } // namespace v8::internal
5588 5580
5589 #endif // V8_TARGET_ARCH_ARM 5581 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.h ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698