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

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

Issue 7977005: Put back the asserts in RememberedSetHelper, but correct this time. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 3 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/macro-assembler-ia32.cc ('k') | src/x64/full-codegen-x64.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 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 5615 matching lines...) Expand 10 before | Expand all | Expand 10 after
5626 5626
5627 // The first two instructions are generated with labels so as to get the 5627 // The first two instructions are generated with labels so as to get the
5628 // offset fixed up correctly by the bind(Label*) call. We patch it back and 5628 // offset fixed up correctly by the bind(Label*) call. We patch it back and
5629 // forth between a compare instructions (a nop in this position) and the 5629 // forth between a compare instructions (a nop in this position) and the
5630 // real branch when we start and stop incremental heap marking. 5630 // real branch when we start and stop incremental heap marking.
5631 // See RecordWriteStub::Patch for details. 5631 // See RecordWriteStub::Patch for details.
5632 __ jmp(&skip_to_incremental_noncompacting, Label::kNear); 5632 __ jmp(&skip_to_incremental_noncompacting, Label::kNear);
5633 __ jmp(&skip_to_incremental_compacting, Label::kFar); 5633 __ jmp(&skip_to_incremental_compacting, Label::kFar);
5634 5634
5635 if (remembered_set_action_ == EMIT_REMEMBERED_SET) { 5635 if (remembered_set_action_ == EMIT_REMEMBERED_SET) {
5636 __ RememberedSetHelper( 5636 __ RememberedSetHelper(object_,
5637 address_, value_, save_fp_regs_mode_, MacroAssembler::kReturnAtEnd); 5637 address_,
5638 value_,
5639 save_fp_regs_mode_,
5640 MacroAssembler::kReturnAtEnd);
5638 } else { 5641 } else {
5639 __ ret(0); 5642 __ ret(0);
5640 } 5643 }
5641 5644
5642 __ bind(&skip_to_incremental_noncompacting); 5645 __ bind(&skip_to_incremental_noncompacting);
5643 GenerateIncremental(masm, INCREMENTAL); 5646 GenerateIncremental(masm, INCREMENTAL);
5644 5647
5645 __ bind(&skip_to_incremental_compacting); 5648 __ bind(&skip_to_incremental_compacting);
5646 GenerateIncremental(masm, INCREMENTAL_COMPACTION); 5649 GenerateIncremental(masm, INCREMENTAL_COMPACTION);
5647 5650
(...skipping 20 matching lines...) Expand all
5668 1 << MemoryChunk::SCAN_ON_SCAVENGE, 5671 1 << MemoryChunk::SCAN_ON_SCAVENGE,
5669 not_zero, 5672 not_zero,
5670 &dont_need_remembered_set); 5673 &dont_need_remembered_set);
5671 5674
5672 // First notify the incremental marker if necessary, then update the 5675 // First notify the incremental marker if necessary, then update the
5673 // remembered set. 5676 // remembered set.
5674 CheckNeedsToInformIncrementalMarker( 5677 CheckNeedsToInformIncrementalMarker(
5675 masm, kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, mode); 5678 masm, kUpdateRememberedSetOnNoNeedToInformIncrementalMarker, mode);
5676 InformIncrementalMarker(masm, mode); 5679 InformIncrementalMarker(masm, mode);
5677 regs_.Restore(masm); 5680 regs_.Restore(masm);
5678 __ RememberedSetHelper( 5681 __ RememberedSetHelper(object_,
5679 address_, value_, save_fp_regs_mode_, MacroAssembler::kReturnAtEnd); 5682 address_,
5683 value_,
5684 save_fp_regs_mode_,
5685 MacroAssembler::kReturnAtEnd);
5680 5686
5681 __ bind(&dont_need_remembered_set); 5687 __ bind(&dont_need_remembered_set);
5682 } 5688 }
5683 5689
5684 CheckNeedsToInformIncrementalMarker( 5690 CheckNeedsToInformIncrementalMarker(
5685 masm, kReturnOnNoNeedToInformIncrementalMarker, mode); 5691 masm, kReturnOnNoNeedToInformIncrementalMarker, mode);
5686 InformIncrementalMarker(masm, mode); 5692 InformIncrementalMarker(masm, mode);
5687 regs_.Restore(masm); 5693 regs_.Restore(masm);
5688 __ ret(0); 5694 __ ret(0);
5689 } 5695 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
5745 // Let's look at the color of the object: If it is not black we don't have 5751 // Let's look at the color of the object: If it is not black we don't have
5746 // to inform the incremental marker. 5752 // to inform the incremental marker.
5747 __ JumpIfBlack(regs_.object(), 5753 __ JumpIfBlack(regs_.object(),
5748 regs_.scratch0(), 5754 regs_.scratch0(),
5749 regs_.scratch1(), 5755 regs_.scratch1(),
5750 &on_black, 5756 &on_black,
5751 Label::kNear); 5757 Label::kNear);
5752 5758
5753 regs_.Restore(masm); 5759 regs_.Restore(masm);
5754 if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { 5760 if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
5755 __ RememberedSetHelper( 5761 __ RememberedSetHelper(object_,
5756 address_, value_, save_fp_regs_mode_, MacroAssembler::kReturnAtEnd); 5762 address_,
5763 value_,
5764 save_fp_regs_mode_,
5765 MacroAssembler::kReturnAtEnd);
5757 } else { 5766 } else {
5758 __ ret(0); 5767 __ ret(0);
5759 } 5768 }
5760 5769
5761 __ bind(&on_black); 5770 __ bind(&on_black);
5762 5771
5763 // Get the value from the slot. 5772 // Get the value from the slot.
5764 __ movq(regs_.scratch0(), Operand(regs_.address(), 0)); 5773 __ movq(regs_.scratch0(), Operand(regs_.address(), 0));
5765 5774
5766 if (mode == INCREMENTAL_COMPACTION) { 5775 if (mode == INCREMENTAL_COMPACTION) {
(...skipping 20 matching lines...) Expand all
5787 __ push(regs_.object()); 5796 __ push(regs_.object());
5788 __ EnsureNotWhite(regs_.scratch0(), // The value. 5797 __ EnsureNotWhite(regs_.scratch0(), // The value.
5789 regs_.scratch1(), // Scratch. 5798 regs_.scratch1(), // Scratch.
5790 regs_.object(), // Scratch. 5799 regs_.object(), // Scratch.
5791 &need_incremental_pop_object, 5800 &need_incremental_pop_object,
5792 Label::kNear); 5801 Label::kNear);
5793 __ pop(regs_.object()); 5802 __ pop(regs_.object());
5794 5803
5795 regs_.Restore(masm); 5804 regs_.Restore(masm);
5796 if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { 5805 if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) {
5797 __ RememberedSetHelper( 5806 __ RememberedSetHelper(object_,
5798 address_, value_, save_fp_regs_mode_, MacroAssembler::kReturnAtEnd); 5807 address_,
5808 value_,
5809 save_fp_regs_mode_,
5810 MacroAssembler::kReturnAtEnd);
5799 } else { 5811 } else {
5800 __ ret(0); 5812 __ ret(0);
5801 } 5813 }
5802 5814
5803 __ bind(&need_incremental_pop_object); 5815 __ bind(&need_incremental_pop_object);
5804 __ pop(regs_.object()); 5816 __ pop(regs_.object());
5805 5817
5806 __ bind(&need_incremental); 5818 __ bind(&need_incremental);
5807 5819
5808 // Fall through when we need to inform the incremental marker. 5820 // Fall through when we need to inform the incremental marker.
5809 } 5821 }
5810 5822
5811 5823
5812 #undef __ 5824 #undef __
5813 5825
5814 } } // namespace v8::internal 5826 } } // namespace v8::internal
5815 5827
5816 #endif // V8_TARGET_ARCH_X64 5828 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698