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

Side by Side Diff: src/ia32/code-stubs-ia32.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/ia32/code-stubs-ia32.h ('k') | src/incremental-marking.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 4673 matching lines...) Expand 10 before | Expand all | Expand 10 after
4684 1 << MemoryChunk::SCAN_ON_SCAVENGE, 4684 1 << MemoryChunk::SCAN_ON_SCAVENGE,
4685 not_zero, 4685 not_zero,
4686 &dont_need_remembered_set); 4686 &dont_need_remembered_set);
4687 4687
4688 // First notify the incremental marker if necessary, then update the 4688 // First notify the incremental marker if necessary, then update the
4689 // remembered set. 4689 // remembered set.
4690 CheckNeedsToInformIncrementalMarker( 4690 CheckNeedsToInformIncrementalMarker(
4691 masm, 4691 masm,
4692 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, 4692 kUpdateRememberedSetOnNoNeedToInformIncrementalMarker,
4693 mode); 4693 mode);
4694 InformIncrementalMarker(masm, mode); 4694 InformIncrementalMarker(masm);
4695 regs_.Restore(masm); 4695 regs_.Restore(masm);
4696 __ RememberedSetHelper(object_, 4696 __ RememberedSetHelper(object_,
4697 address_, 4697 address_,
4698 value_, 4698 value_,
4699 save_fp_regs_mode_, 4699 save_fp_regs_mode_,
4700 MacroAssembler::kReturnAtEnd); 4700 MacroAssembler::kReturnAtEnd);
4701 4701
4702 __ bind(&dont_need_remembered_set); 4702 __ bind(&dont_need_remembered_set);
4703 } 4703 }
4704 4704
4705 CheckNeedsToInformIncrementalMarker( 4705 CheckNeedsToInformIncrementalMarker(
4706 masm, 4706 masm,
4707 kReturnOnNoNeedToInformIncrementalMarker, 4707 kReturnOnNoNeedToInformIncrementalMarker,
4708 mode); 4708 mode);
4709 InformIncrementalMarker(masm, mode); 4709 InformIncrementalMarker(masm);
4710 regs_.Restore(masm); 4710 regs_.Restore(masm);
4711 __ ret(0); 4711 __ ret(0);
4712 } 4712 }
4713 4713
4714 4714
4715 void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm, Mode mode) { 4715 void RecordWriteStub::InformIncrementalMarker(MacroAssembler* masm) {
4716 regs_.SaveCallerSaveRegisters(masm, save_fp_regs_mode_); 4716 regs_.SaveCallerSaveRegisters(masm, save_fp_regs_mode_);
4717 int argument_count = 3; 4717 int argument_count = 3;
4718 __ PrepareCallCFunction(argument_count, regs_.scratch0()); 4718 __ PrepareCallCFunction(argument_count, regs_.scratch0());
4719 __ mov(Operand(esp, 0 * kPointerSize), regs_.object()); 4719 __ mov(Operand(esp, 0 * kPointerSize), regs_.object());
4720 __ mov(Operand(esp, 1 * kPointerSize), regs_.address()); // Slot. 4720 __ mov(Operand(esp, 1 * kPointerSize), regs_.address()); // Slot.
4721 __ mov(Operand(esp, 2 * kPointerSize), 4721 __ mov(Operand(esp, 2 * kPointerSize),
4722 Immediate(ExternalReference::isolate_address(masm->isolate()))); 4722 Immediate(ExternalReference::isolate_address(masm->isolate())));
4723 4723
4724 AllowExternalCallThatCantCauseGC scope(masm); 4724 AllowExternalCallThatCantCauseGC scope(masm);
4725 if (mode == INCREMENTAL_COMPACTION) { 4725 __ CallCFunction(
4726 __ CallCFunction( 4726 ExternalReference::incremental_marking_record_write_function(
4727 ExternalReference::incremental_evacuation_record_write_function( 4727 masm->isolate()),
4728 masm->isolate()), 4728 argument_count);
4729 argument_count); 4729
4730 } else {
4731 ASSERT(mode == INCREMENTAL);
4732 __ CallCFunction(
4733 ExternalReference::incremental_marking_record_write_function(
4734 masm->isolate()),
4735 argument_count);
4736 }
4737 regs_.RestoreCallerSaveRegisters(masm, save_fp_regs_mode_); 4730 regs_.RestoreCallerSaveRegisters(masm, save_fp_regs_mode_);
4738 } 4731 }
4739 4732
4740 4733
4741 void RecordWriteStub::CheckNeedsToInformIncrementalMarker( 4734 void RecordWriteStub::CheckNeedsToInformIncrementalMarker(
4742 MacroAssembler* masm, 4735 MacroAssembler* masm,
4743 OnNoNeedToInformIncrementalMarker on_no_need, 4736 OnNoNeedToInformIncrementalMarker on_no_need,
4744 Mode mode) { 4737 Mode mode) {
4745 Label object_is_black, need_incremental, need_incremental_pop_object; 4738 Label object_is_black, need_incremental, need_incremental_pop_object;
4746 4739
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
5455 Operand(ebp, 7 * kPointerSize), 5448 Operand(ebp, 7 * kPointerSize),
5456 NULL); 5449 NULL);
5457 } 5450 }
5458 5451
5459 5452
5460 #undef __ 5453 #undef __
5461 5454
5462 } } // namespace v8::internal 5455 } } // namespace v8::internal
5463 5456
5464 #endif // V8_TARGET_ARCH_IA32 5457 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.h ('k') | src/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698