@@ -358,6 +358,10 @@ class RawObject {
358358 return IsFreeListElement () || IsForwardingCorpse ();
359359 }
360360
361+ intptr_t GetClassId () const {
362+ uint32_t tags = ptr ()->tags_ ;
363+ return ClassIdTag::decode (tags);
364+ }
361365 intptr_t GetClassIdMayBeSmi () const {
362366 return IsHeapObject () ? GetClassId () : static_cast <intptr_t >(kSmiCid );
363367 }
@@ -504,11 +508,6 @@ class RawObject {
504508
505509 intptr_t HeapSizeFromClass () const ;
506510
507- intptr_t GetClassId () const {
508- uint32_t tags = ptr ()->tags_ ;
509- return ClassIdTag::decode (tags);
510- }
511-
512511 void SetClassId (intptr_t new_cid) {
513512 uint32_t tags = ptr ()->tags_ ;
514513 ptr ()->tags_ = ClassIdTag::update (new_cid, tags);
@@ -660,12 +659,7 @@ class RawObject {
660659 friend class StoreBufferUpdateVisitor ; // RememberCard
661660 void RememberCard (RawObject* const * slot);
662661
663- friend class Api ;
664- friend class ApiMessageReader ; // GetClassId
665- friend class Serializer ; // GetClassId
666662 friend class Array ;
667- friend class Become ; // GetClassId
668- friend class CompactorTask ; // GetClassId
669663 friend class ByteBuffer ;
670664 friend class CidRewriteVisitor ;
671665 friend class Closure ;
@@ -681,25 +675,15 @@ class RawObject {
681675 friend class ForwardList ;
682676 friend class GrowableObjectArray ; // StorePointer
683677 friend class Heap ;
684- friend class HeapMapAsJSONVisitor ;
685678 friend class ClassStatsVisitor ;
686679 template <bool >
687680 friend class MarkingVisitorBase ;
688681 friend class Mint ;
689682 friend class Object ;
690683 friend class OneByteString ; // StoreSmi
691- friend class RawCode ;
692- friend class RawExternalTypedData ;
693- friend class RawInstructions ;
694684 friend class RawInstance ;
695- friend class RawString ;
696- friend class RawTypedData ;
697- friend class RawTypedDataView ;
698685 friend class Scavenger ;
699686 friend class ScavengerVisitor ;
700- friend class SizeExcludingClassVisitor ; // GetClassId
701- friend class InstanceAccumulator ; // GetClassId
702- friend class RetainingPathVisitor ; // GetClassId
703687 friend class ImageReader ; // tags_ check
704688 friend class ImageWriter ;
705689 friend class AssemblyImageWriter ;
@@ -708,29 +692,17 @@ class RawObject {
708692 friend class Deserializer ;
709693 friend class SnapshotWriter ;
710694 friend class String ;
711- friend class Type ; // GetClassId
712- friend class TypedDataBase ; // GetClassId
713- friend class TypedData ; // GetClassId
714- friend class TypedDataView ; // GetClassId
715695 friend class WeakProperty ; // StorePointer
716696 friend class Instance ; // StorePointer
717697 friend class StackFrame ; // GetCodeObject assertion.
718698 friend class CodeLookupTableBuilder ; // profiler
719- friend class NativeEntry ; // GetClassId
720- friend class WritePointerVisitor ; // GetClassId
721699 friend class Interpreter ;
722700 friend class InterpreterHelpers ;
723701 friend class Simulator ;
724702 friend class SimulatorHelpers ;
725703 friend class ObjectLocator ;
726- friend class InstanceMorpher ; // GetClassId
727- friend class VerifyCanonicalVisitor ;
728- friend class ObjectGraph ::Stack; // GetClassId
729- friend class Precompiler ; // GetClassId
730- friend class ObjectOffsetTrait ; // GetClassId
731704 friend class WriteBarrierUpdateVisitor ; // CheckHeapPointerStore
732705 friend class OffsetsTable ;
733- friend class RawTransferableTypedData ; // GetClassId
734706
735707 DISALLOW_ALLOCATION ();
736708 DISALLOW_IMPLICIT_CONSTRUCTORS (RawObject);
0 commit comments