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

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

Issue 7329049: Patch RecordWriteStub after adding it to the stub cache not during generation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 5 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
« src/incremental-marking.cc ('K') | « src/incremental-marking.cc ('k') | no next file » | 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 5164 matching lines...) Expand 10 before | Expand all | Expand 10 after
5175 } else { 5175 } else {
5176 __ ret(0); 5176 __ ret(0);
5177 } 5177 }
5178 5178
5179 __ bind(&skip_to_incremental_noncompacting); 5179 __ bind(&skip_to_incremental_noncompacting);
5180 GenerateIncremental(masm, INCREMENTAL); 5180 GenerateIncremental(masm, INCREMENTAL);
5181 5181
5182 __ bind(&skip_to_incremental_compacting); 5182 __ bind(&skip_to_incremental_compacting);
5183 GenerateIncremental(masm, INCREMENTAL_COMPACTION); 5183 GenerateIncremental(masm, INCREMENTAL_COMPACTION);
5184 5184
5185 // TODO(1545) ensure that GC can't happen after stub was generated by before 5185 // Initial mode of the stub is expected to be STORE_BUFFER_ONLY.
5186 // it was added to a stub cache. 5186 // Will be checked in IncrementalMarking::ActivateGeneratedStub.
5187 IncrementalMarking* marking = masm->isolate()->heap()->incremental_marking(); 5187 masm->set_byte_at(0, kTwoByteNopInstruction);
5188 if (!marking->IsMarking() || marking->IsCompacting()) { 5188 masm->set_byte_at(2, kFiveByteNopInstruction);
5189 ASSERT(masm->byte_at(0) == kTwoByteJumpInstruction);
5190 masm->set_byte_at(0, kTwoByteNopInstruction);
5191 }
5192
5193 if (!marking->IsMarking()) {
5194 ASSERT(masm->byte_at(2) == kFiveByteJumpInstruction);
5195 masm->set_byte_at(2, kFiveByteNopInstruction);
5196 }
5197 } 5189 }
5198 5190
5199 5191
5200 void RecordWriteStub::GenerateIncremental(MacroAssembler* masm, Mode mode) { 5192 void RecordWriteStub::GenerateIncremental(MacroAssembler* masm, Mode mode) {
5201 regs_.Save(masm); 5193 regs_.Save(masm);
5202 5194
5203 if (remembered_set_action_ == EMIT_REMEMBERED_SET) { 5195 if (remembered_set_action_ == EMIT_REMEMBERED_SET) {
5204 Label dont_need_remembered_set; 5196 Label dont_need_remembered_set;
5205 5197
5206 __ movq(regs_.scratch0(), Operand(regs_.address(), 0)); 5198 __ movq(regs_.scratch0(), Operand(regs_.address(), 0));
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
5306 // TODO(gc): Add call to EnsureNotWhite here. 5298 // TODO(gc): Add call to EnsureNotWhite here.
5307 // Fall through when we need to inform the incremental marker. 5299 // Fall through when we need to inform the incremental marker.
5308 } 5300 }
5309 5301
5310 5302
5311 #undef __ 5303 #undef __
5312 5304
5313 } } // namespace v8::internal 5305 } } // namespace v8::internal
5314 5306
5315 #endif // V8_TARGET_ARCH_X64 5307 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/incremental-marking.cc ('K') | « src/incremental-marking.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698