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

Unified Diff: src/ia32/code-stubs-ia32.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
Index: src/ia32/code-stubs-ia32.cc
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
index 5b88a85a2ce51594d25b44d34182ad032b01b41b..e4889ba7feb8c49885018aaf0ca688436d193aba 100644
--- a/src/ia32/code-stubs-ia32.cc
+++ b/src/ia32/code-stubs-ia32.cc
@@ -6258,18 +6258,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);
}

Powered by Google App Engine
This is Rietveld 408576698