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

Unified Diff: src/heap/heap.h

Issue 1320843002: [heap] Limit friendship of the Heap class to essentials. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment. Created 5 years, 4 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/factory.h ('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 254b19f83cb54714fd80a897f14242331ff0fb59..af033bb6865bd0c78d9609e972f2d1ad107a3384 100644
--- a/src/heap/heap.h
+++ b/src/heap/heap.h
@@ -1215,21 +1215,33 @@ class Heap {
Object** roots_array_start() { return roots_; }
// Sets the stub_cache_ (only used when expanding the dictionary).
- void public_set_code_stubs(UnseededNumberDictionary* value) {
+ void SetRootCodeStubs(UnseededNumberDictionary* value) {
roots_[kCodeStubsRootIndex] = value;
}
// Sets the non_monomorphic_cache_ (only used when expanding the dictionary).
- void public_set_non_monomorphic_cache(UnseededNumberDictionary* value) {
+ void SetRootNonMonomorphicCache(UnseededNumberDictionary* value) {
roots_[kNonMonomorphicCacheRootIndex] = value;
}
- void public_set_empty_script(Script* script) {
- roots_[kEmptyScriptRootIndex] = script;
+ void SetRootMaterializedObjects(FixedArray* objects) {
+ roots_[kMaterializedObjectsRootIndex] = objects;
}
- void public_set_materialized_objects(FixedArray* objects) {
- roots_[kMaterializedObjectsRootIndex] = objects;
+ void SetRootCodeStubContext(Object* value) {
+ roots_[kCodeStubContextRootIndex] = value;
+ }
+
+ void SetRootCodeStubExportsObject(JSObject* value) {
+ roots_[kCodeStubExportsObjectRootIndex] = value;
+ }
+
+ void SetRootScriptList(Object* value) {
+ roots_[kScriptListRootIndex] = value;
+ }
+
+ void SetRootStringTable(StringTable* value) {
+ roots_[kStringTableRootIndex] = value;
}
// Set the stack limit in the roots_ array. Some architectures generate
@@ -2407,21 +2419,23 @@ class Heap {
StrongRootsList* strong_roots_list_;
+ // Classes in "heap" can be friends.
friend class AlwaysAllocateScope;
- friend class Bootstrapper;
- friend class Deserializer;
- friend class Factory;
friend class GCCallbacksScope;
friend class GCTracer;
friend class HeapIterator;
friend class IncrementalMarking;
- friend class Isolate;
friend class MarkCompactCollector;
friend class MarkCompactMarkingVisitor;
- friend class MapCompact;
friend class Page;
friend class StoreBuffer;
+ // The allocator interface.
+ friend class Factory;
+
+ // The Isolate constructs us.
+ friend class Isolate;
+
// Used in cctest.
friend class HeapTester;
« no previous file with comments | « src/factory.h ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698