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

Unified 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 side-by-side diff with in-line comments
Download patch
« src/incremental-marking.cc ('K') | « src/incremental-marking.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index 9432304a5af6c338e43aad9c7f38c856c6e092b7..bb365c880d291b2f220f7620740ced780acfcade 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -5182,18 +5182,10 @@ void RecordWriteStub::Generate(MacroAssembler* masm) {
__ bind(&skip_to_incremental_compacting);
GenerateIncremental(masm, INCREMENTAL_COMPACTION);
- // TODO(1545) ensure that GC can't happen after stub was generated by before
- // it was added to a stub cache.
- IncrementalMarking* marking = masm->isolate()->heap()->incremental_marking();
- if (!marking->IsMarking() || marking->IsCompacting()) {
- ASSERT(masm->byte_at(0) == kTwoByteJumpInstruction);
- masm->set_byte_at(0, kTwoByteNopInstruction);
- }
-
- if (!marking->IsMarking()) {
- ASSERT(masm->byte_at(2) == kFiveByteJumpInstruction);
- masm->set_byte_at(2, kFiveByteNopInstruction);
- }
+ // Initial mode of the stub is expected to be STORE_BUFFER_ONLY.
+ // Will be checked in IncrementalMarking::ActivateGeneratedStub.
+ masm->set_byte_at(0, kTwoByteNopInstruction);
+ masm->set_byte_at(2, kFiveByteNopInstruction);
}
« 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