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

Unified Diff: src/heap/incremental-marking-inl.h

Issue 2045263002: [heap] Avoid the use of cells to point from code to new-space objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/heap/incremental-marking-inl.h
diff --git a/src/heap/incremental-marking-inl.h b/src/heap/incremental-marking-inl.h
index fa22da6d41ecebc06a5f9918c8041e8c10f418dd..3a0c0ad4399597c08b4018ad593cbbf74b5dd287 100644
--- a/src/heap/incremental-marking-inl.h
+++ b/src/heap/incremental-marking-inl.h
@@ -28,8 +28,12 @@ void IncrementalMarking::RecordWriteOfCodeEntry(JSFunction* host, Object** slot,
void IncrementalMarking::RecordWriteIntoCode(Code* host, RelocInfo* rinfo,
Object* value) {
- if (IsMarking() && value->IsHeapObject()) {
- RecordWriteIntoCodeSlow(host, rinfo, value);
+ if (value->IsHeapObject()) {
+ if (heap()->InNewSpace(value)) {
+ RecordWriteIntoCodeToNewSpaceSlow(host, rinfo, value);
ulan 2016/06/08 14:37:00 This won't work because RecordWriteIntoCode can be
ahaas 2016/06/09 10:34:32 Done.
+ } else if (IsMarking()) {
+ RecordWriteIntoCodeSlow(host, rinfo, value);
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698