[vm] Remove dead friend declarations.

TEST=ci
Change-Id: I0054c5057eb24e9117e7d80806270f694d8cbef8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316641
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This commit is contained in:
Ryan Macnak
2023-07-27 20:17:17 +00:00
committed by Commit Queue
parent e623e291a7
commit cf9a8111bc
6 changed files with 2 additions and 42 deletions
-4
View File
@@ -512,10 +512,6 @@ class ClassTable : public MallocAllocated {
private:
friend class ClassTableAllocator;
friend class GCMarker;
friend class MarkingWeakVisitor;
friend class Scavenger;
friend class ScavengerWeakVisitor;
friend class Dart;
friend Isolate* CreateWithinExistingIsolateGroup(IsolateGroup* group,
const char* name,
+2 -5
View File
@@ -154,7 +154,6 @@ class ArgumentsDescriptor : public ValueObject {
kNamedEntrySize,
};
public:
static intptr_t LengthFor(intptr_t num_named_arguments) {
// Add 1 for the terminating null.
return kFirstNamedEntryIndex + (kNamedEntrySize * num_named_arguments) + 1;
@@ -180,10 +179,8 @@ class ArgumentsDescriptor : public ValueObject {
// A cache of VM heap allocated arguments descriptors.
static ArrayPtr cached_args_descriptors_[kCachedDescriptorCount];
friend class Serializer;
friend class Deserializer;
friend class Simulator;
friend class SimulatorHelpers;
friend class VMSerializationRoots;
friend class VMDeserializationRoots;
DISALLOW_COPY_AND_ASSIGN(ArgumentsDescriptor);
};
-5
View File
@@ -95,11 +95,6 @@ class FieldTable {
static constexpr int kCapacityIncrement = 256;
private:
friend class GCMarker;
friend class MarkingWeakVisitor;
friend class Scavenger;
friend class ScavengerWeakVisitor;
void Grow(intptr_t new_capacity);
intptr_t top_;
-2
View File
@@ -316,8 +316,6 @@ class Scavenger {
template <bool>
friend class ScavengerVisitorBase;
friend class ScavengerWeakVisitor;
friend class ScavengerFinalizerVisitor;
DISALLOW_COPY_AND_ASSIGN(Scavenger);
};
-25
View File
@@ -135,9 +135,6 @@ enum TypedDataElementType {
VISITOR_SUPPORT(object) \
friend class object; \
friend class UntaggedObject; \
friend class Heap; \
friend class Simulator; \
friend class SimulatorHelpers; \
friend class OffsetsTable; \
DISALLOW_ALLOCATION(); \
DISALLOW_IMPLICIT_CONSTRUCTORS(Untagged##object)
@@ -568,8 +565,6 @@ class UntaggedObject {
}
}
friend class MessageDeserializer; // bogus
template <typename type,
typename compressed_type,
std::memory_order order = std::memory_order_relaxed>
@@ -784,10 +779,7 @@ class UntaggedObject {
friend class GCMarker;
friend class GCSweeper;
friend class ExternalTypedData;
friend class ForwardList;
friend class GrowableObjectArray; // StorePointer
friend class Heap;
friend class ClassStatsVisitor;
template <bool>
friend class MarkingVisitorBase;
friend class Mint;
@@ -807,8 +799,6 @@ class UntaggedObject {
friend class Instance; // StorePointer
friend class StackFrame; // GetCodeObject assertion.
friend class CodeLookupTableBuilder; // profiler
friend class Simulator;
friend class SimulatorHelpers;
friend class ObjectLocator;
friend class WriteBarrierUpdateVisitor; // CheckHeapPointerStore
friend class OffsetsTable;
@@ -1817,10 +1807,8 @@ class UntaggedWeakArray : public UntaggedObject {
friend class CanonicalSetDeserializationCluster;
template <typename Type, typename PtrType>
friend class GCLinkedList;
friend class GCMarker;
template <bool>
friend class MarkingVisitorBase;
friend class Scavenger;
template <bool>
friend class ScavengerVisitorBase;
};
@@ -3570,10 +3558,8 @@ class UntaggedWeakProperty : public UntaggedInstance {
template <typename Type, typename PtrType>
friend class GCLinkedList;
friend class GCMarker;
template <bool>
friend class MarkingVisitorBase;
friend class Scavenger;
template <bool>
friend class ScavengerVisitorBase;
friend class FastObjectCopy; // For OFFSET_OF
@@ -3604,10 +3590,8 @@ class UntaggedWeakReference : public UntaggedInstance {
template <typename Type, typename PtrType>
friend class GCLinkedList;
friend class GCMarker;
template <bool>
friend class MarkingVisitorBase;
friend class Scavenger;
template <bool>
friend class ScavengerVisitorBase;
friend class ObjectGraph;
@@ -3649,10 +3633,8 @@ class UntaggedFinalizerBase : public UntaggedInstance {
template <typename GCVisitorType>
friend void MournFinalizerEntry(GCVisitorType*, FinalizerEntryPtr);
friend class GCMarker;
template <bool>
friend class MarkingVisitorBase;
friend class Scavenger;
template <bool>
friend class ScavengerVisitorBase;
friend class ObjectGraph;
@@ -3674,10 +3656,8 @@ class UntaggedFinalizer : public UntaggedFinalizerBase {
template <typename GCVisitorType>
friend void MournFinalizerEntry(GCVisitorType*, FinalizerEntryPtr);
friend class GCMarker;
template <bool>
friend class MarkingVisitorBase;
friend class Scavenger;
template <bool>
friend class ScavengerVisitorBase;
};
@@ -3688,10 +3668,8 @@ class UntaggedNativeFinalizer : public UntaggedFinalizerBase {
COMPRESSED_POINTER_FIELD(PointerPtr, callback)
VISIT_TO(callback)
friend class GCMarker;
template <bool>
friend class MarkingVisitorBase;
friend class Scavenger;
template <bool>
friend class ScavengerVisitorBase;
};
@@ -3725,13 +3703,10 @@ class UntaggedFinalizerEntry : public UntaggedInstance {
friend class GCLinkedList;
template <typename GCVisitorType>
friend void MournFinalizerEntry(GCVisitorType*, FinalizerEntryPtr);
friend class GCMarker;
template <bool>
friend class MarkingVisitorBase;
friend class Scavenger;
template <bool>
friend class ScavengerVisitorBase;
friend class ScavengerFinalizerVisitor;
friend class ObjectGraph;
};
-1
View File
@@ -66,7 +66,6 @@ class ThreadRegistry {
friend class Thread;
friend class SafepointHandler;
friend class Scavenger;
DISALLOW_COPY_AND_ASSIGN(ThreadRegistry);
};