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

Unified Diff: src/incremental-marking.cc

Issue 7864025: Fix two bugs in the code compaction: (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index 28b9485bc2825017bc9e215af0120dfe074af0a2..5e14baa9c557e905dd92451996d46835129309d7 100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -86,20 +86,10 @@ void IncrementalMarking::RecordWriteForEvacuationFromCode(HeapObject* obj,
void IncrementalMarking::RecordCodeTargetPatch(Address pc, HeapObject* value) {
if (IsMarking()) {
- ASSERT(!MarkCompactCollector::IsOnEvacuationCandidate(value));
-
- MarkBit value_bit = Marking::MarkBitFrom(value);
- if (Marking::IsWhite(value_bit)) {
- WhiteToGreyAndPush(value, value_bit);
- RestartIfNotMarking();
- }
-
-
- if (is_compacting_) {
- RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, NULL, NULL);
- heap_->mark_compact_collector()->RecordRelocSlot(&rinfo,
- Code::cast(value));
- }
+ Code* host =
+ heap_->isolate()->pc_to_code_cache()->GcSafeFindCodeForPc(pc);
+ RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, NULL, host);
+ RecordWriteIntoCode(host, &rinfo, value);
}
}
« no previous file with comments | « src/heap.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698