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

Unified Diff: src/heap/heap.h

Issue 2091733002: Reland [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: Address comments. 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
« no previous file with comments | « src/compiler.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.h
diff --git a/src/heap/heap.h b/src/heap/heap.h
index ed1e65253e89a03a4135886046919d98f639bd70..7f03d89abe43d005b325ea7a09122979e3794ed0 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -194,6 +194,11 @@ using v8::MemoryPressureLevel;
V(FixedArray, detached_contexts, DetachedContexts) \
V(ArrayList, retained_maps, RetainedMaps) \
V(WeakHashTable, weak_object_to_code_table, WeakObjectToCodeTable) \
+ /* weak_new_space_object_to_code_list is an array of weak cells, where */ \
+ /* slots with even indices refer to the weak object, and the subsequent */ \
+ /* slots refer to the code with the reference to the weak object. */ \
+ V(ArrayList, weak_new_space_object_to_code_list, \
+ WeakNewSpaceObjectToCodeList) \
V(Object, weak_stack_trace_list, WeakStackTraceList) \
V(Object, noscript_shared_function_infos, NoScriptSharedFunctionInfos) \
V(FixedArray, serialized_templates, SerializedTemplates) \
@@ -860,6 +865,9 @@ class Heap {
return new_space_.IsAtMaximumCapacity() && maximum_size_scavenges_ == 0;
}
+ void AddWeakNewSpaceObjectToCodeDependency(Handle<HeapObject> obj,
+ Handle<WeakCell> code);
+
void AddWeakObjectToCodeDependency(Handle<HeapObject> obj,
Handle<DependentCode> dep);
@@ -1120,6 +1128,8 @@ class Heap {
// Write barrier support for object[offset] = o;
inline void RecordWrite(Object* object, int offset, Object* o);
+ inline void RecordWriteIntoCode(Code* host, RelocInfo* rinfo, Object* target);
+ void RecordWriteIntoCodeSlow(Code* host, RelocInfo* rinfo, Object* target);
inline void RecordFixedArrayElements(FixedArray* array, int offset,
int length);
« no previous file with comments | « src/compiler.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698