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

Unified Diff: src/heap/heap.h

Issue 1178853002: [heap] Unify the immortal immovable root detection mechanism. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use the right predicate during code generation. Created 5 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/code-generator.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 1bc9a85b04b32759ea05a08a40b393035bb2556c..7193551a8d2531068a5ad9bdcbf81a8423213b2b 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -324,60 +324,6 @@ namespace internal {
V(to_string_tag_symbol, symbolToStringTag, Symbol.toStringTag) \
V(unscopables_symbol, symbolUnscopables, Symbol.unscopables)
-// Heap roots that are known to be immortal immovable, for which we can safely
-// skip write barriers. This list is not complete and has omissions.
-#define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \
- V(ByteArrayMap) \
- V(FreeSpaceMap) \
- V(OnePointerFillerMap) \
- V(TwoPointerFillerMap) \
- V(UndefinedValue) \
- V(TheHoleValue) \
- V(NullValue) \
- V(TrueValue) \
- V(FalseValue) \
- V(UninitializedValue) \
- V(CellMap) \
- V(GlobalPropertyCellMap) \
- V(SharedFunctionInfoMap) \
- V(MetaMap) \
- V(HeapNumberMap) \
- V(MutableHeapNumberMap) \
- V(Float32x4Map) \
- V(NativeContextMap) \
- V(FixedArrayMap) \
- V(CodeMap) \
- V(ScopeInfoMap) \
- V(FixedCOWArrayMap) \
- V(FixedDoubleArrayMap) \
- V(WeakCellMap) \
- V(NoInterceptorResultSentinel) \
- V(HashTableMap) \
- V(OrderedHashTableMap) \
- V(EmptyFixedArray) \
- V(EmptyByteArray) \
- V(EmptyDescriptorArray) \
- V(ArgumentsMarker) \
- V(SymbolMap) \
- V(SloppyArgumentsElementsMap) \
- V(FunctionContextMap) \
- V(CatchContextMap) \
- V(WithContextMap) \
- V(BlockContextMap) \
- V(ModuleContextMap) \
- V(ScriptContextMap) \
- V(UndefinedMap) \
- V(TheHoleMap) \
- V(NullMap) \
- V(BooleanMap) \
- V(UninitializedMap) \
- V(ArgumentsMarkerMap) \
- V(JSMessageObjectMap) \
- V(ForeignMap) \
- V(NeanderMap) \
- V(empty_string) \
- PRIVATE_SYMBOL_LIST(V)
-
// Forward declarations.
class HeapStats;
class Isolate;
@@ -995,7 +941,6 @@ class Heap {
return reinterpret_cast<Address*>(&roots_[kStoreBufferTopRootIndex]);
}
- static bool RootIsImmortalImmovable(int root_index);
void CheckHandleCount();
#ifdef VERIFY_HEAP
@@ -1187,7 +1132,7 @@ class Heap {
#define STRING_INDEX_DECLARATION(name, str) k##name##RootIndex,
INTERNALIZED_STRING_LIST(STRING_INDEX_DECLARATION)
-#undef STRING_DECLARATION
+#undef STRING_INDEX_DECLARATION
#define SYMBOL_INDEX_DECLARATION(name) k##name##RootIndex,
PRIVATE_SYMBOL_LIST(SYMBOL_INDEX_DECLARATION)
@@ -1211,9 +1156,11 @@ class Heap {
kSmiRootsStart = kStringTableRootIndex + 1
};
+ // Check if {index} is the index of an immortal immovable root.
+ static bool RootIsImmortalImmovable(RootListIndex index);
+
// Get the root list index for {object} if such a root list index exists.
- bool GetRootListIndex(Handle<HeapObject> object,
- Heap::RootListIndex* index_return);
+ bool GetRootListIndex(Object* object, RootListIndex* index_return) const;
Object* root(RootListIndex index) { return roots_[index]; }
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698