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

Side by Side Diff: src/mips/code-stubs-mips.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/mips/code-stubs-mips.h ('k') | src/serialize.cc » ('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 5008 matching lines...) Expand 10 before | Expand all | Expand 10 after
5019 __ CheckPageFlag(regs_.object(), 5019 __ CheckPageFlag(regs_.object(),
5020 regs_.scratch0(), 5020 regs_.scratch0(),
5021 1 << MemoryChunk::SCAN_ON_SCAVENGE, 5021 1 << MemoryChunk::SCAN_ON_SCAVENGE,
5022 ne, 5022 ne,
5023 &dont_need_remembered_set); 5023 &dont_need_remembered_set);
5024 5024
5025 // First notify the incremental marker if necessary, then update the 5025 // First notify the incremental marker if necessary, then update the
5026 // remembered set. 5026 // remembered set.
5027 CheckNeedsToInformIncrementalMarker( 5027 CheckNeedsToInformIncrementalMarker(
5028 masm, kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, mode); 5028 masm, kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, mode);
5029 InformIncrementalMarker(masm, mode); 5029 InformIncrementalMarker(masm);
5030 regs_.Restore(masm); 5030 regs_.Restore(masm);
5031 __ RememberedSetHelper(object_, 5031 __ RememberedSetHelper(object_,
5032 address_, 5032 address_,
5033 value_, 5033 value_,
5034 save_fp_regs_mode_, 5034 save_fp_regs_mode_,
5035 MacroAssembler::kReturnAtEnd); 5035 MacroAssembler::kReturnAtEnd);
5036 5036
5037 __ bind(&dont_need_remembered_set); 5037 __ bind(&dont_need_remembered_set);
5038 } 5038 }
5039 5039
5040 CheckNeedsToInformIncrementalMarker( 5040 CheckNeedsToInformIncrementalMarker(
5041 masm, kReturnOnNoNeedToInformIncrementalMarker, mode); 5041 masm, kReturnOnNoNeedToInformIncrementalMarker, mode);
5042 InformIncrementalMarker(masm, mode); 5042 InformIncrementalMarker(masm);
5043 regs_.Restore(masm); 5043 regs_.Restore(masm);
5044 __ Ret(); 5044 __ Ret();
5045 } 5045 }
5046 5046
5047 5047
5048 void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm, Mode mode) { 5048 void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm) {
5049 regs_.SaveCallerSaveRegisters(masm, save_fp_regs_mode_); 5049 regs_.SaveCallerSaveRegisters(masm, save_fp_regs_mode_);
5050 int argument_count = 3; 5050 int argument_count = 3;
5051 __ PrepareCallCFunction(argument_count, regs_.scratch0()); 5051 __ PrepareCallCFunction(argument_count, regs_.scratch0());
5052 Register address = 5052 Register address =
5053 a0.is(regs_.address()) ? regs_.scratch0() : regs_.address(); 5053 a0.is(regs_.address()) ? regs_.scratch0() : regs_.address();
5054 ASSERT(!address.is(regs_.object())); 5054 ASSERT(!address.is(regs_.object()));
5055 ASSERT(!address.is(a0)); 5055 ASSERT(!address.is(a0));
5056 __ Move(address, regs_.address()); 5056 __ Move(address, regs_.address());
5057 __ Move(a0, regs_.object()); 5057 __ Move(a0, regs_.object());
5058 __ Move(a1, address); 5058 __ Move(a1, address);
5059 __ li(a2, Operand(ExternalReference::isolate_address(masm->isolate()))); 5059 __ li(a2, Operand(ExternalReference::isolate_address(masm->isolate())));
5060 5060
5061 AllowExternalCallThatCantCauseGC scope(masm); 5061 AllowExternalCallThatCantCauseGC scope(masm);
5062 if (mode == INCREMENTAL_COMPACTION) { 5062 __ CallCFunction(
5063 __ CallCFunction( 5063 ExternalReference::incremental_marking_record_write_function(
5064 ExternalReference::incremental_evacuation_record_write_function( 5064 masm->isolate()),
5065 masm->isolate()), 5065 argument_count);
5066 argument_count);
5067 } else {
5068 ASSERT(mode == INCREMENTAL);
5069 __ CallCFunction(
5070 ExternalReference::incremental_marking_record_write_function(
5071 masm->isolate()),
5072 argument_count);
5073 }
5074 regs_.RestoreCallerSaveRegisters(masm, save_fp_regs_mode_); 5066 regs_.RestoreCallerSaveRegisters(masm, save_fp_regs_mode_);
5075 } 5067 }
5076 5068
5077 5069
5078 void RecordWriteStub::CheckNeedsToInformIncrementalMarker( 5070 void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
5079 MacroAssembler* masm, 5071 MacroAssembler* masm,
5080 OnNoNeedToInformIncrementalMarker on_no_need, 5072 OnNoNeedToInformIncrementalMarker on_no_need,
5081 Mode mode) { 5073 Mode mode) {
5082 Label on_black; 5074 Label on_black;
5083 Label need_incremental; 5075 Label need_incremental;
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
5760 MemOperand(fp, 6 * kPointerSize), 5752 MemOperand(fp, 6 * kPointerSize),
5761 NULL); 5753 NULL);
5762 } 5754 }
5763 5755
5764 5756
5765 #undef __ 5757 #undef __
5766 5758
5767 } } // namespace v8::internal 5759 } } // namespace v8::internal
5768 5760
5769 #endif // V8_TARGET_ARCH_MIPS 5761 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698