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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_INCREMENTAL_MARKING_INL_H_ 5 #ifndef V8_HEAP_INCREMENTAL_MARKING_INL_H_
6 #define V8_HEAP_INCREMENTAL_MARKING_INL_H_ 6 #define V8_HEAP_INCREMENTAL_MARKING_INL_H_
7 7
8 #include "src/heap/incremental-marking.h" 8 #include "src/heap/incremental-marking.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 10 matching lines...) Expand all
21 21
22 void IncrementalMarking::RecordWriteOfCodeEntry(JSFunction* host, Object** slot, 22 void IncrementalMarking::RecordWriteOfCodeEntry(JSFunction* host, Object** slot,
23 Code* value) { 23 Code* value) {
24 if (IsMarking()) { 24 if (IsMarking()) {
25 RecordWriteOfCodeEntrySlow(host, slot, value); 25 RecordWriteOfCodeEntrySlow(host, slot, value);
26 } 26 }
27 } 27 }
28 28
29 void IncrementalMarking::RecordWriteIntoCode(Code* host, RelocInfo* rinfo, 29 void IncrementalMarking::RecordWriteIntoCode(Code* host, RelocInfo* rinfo,
30 Object* value) { 30 Object* value) {
31 if (IsMarking() && value->IsHeapObject()) { 31 if (value->IsHeapObject()) {
32 RecordWriteIntoCodeSlow(host, rinfo, value); 32 if (heap()->InNewSpace(value)) {
33 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.
34 } else if (IsMarking()) {
35 RecordWriteIntoCodeSlow(host, rinfo, value);
36 }
33 } 37 }
34 } 38 }
35 39
36 40
37 } // namespace internal 41 } // namespace internal
38 } // namespace v8 42 } // namespace v8
39 43
40 #endif // V8_HEAP_INCREMENTAL_MARKING_INL_H_ 44 #endif // V8_HEAP_INCREMENTAL_MARKING_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698