[vm] Remove unused functions from class_id.h/class_table.h.

TEST=Build succeeds.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try
Change-Id: I3f6a7a01eb3eabd7bbe735d3889510bc3144942b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194766
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
diff --git a/runtime/vm/class_id.h b/runtime/vm/class_id.h
index f59c94b..cb1b9f0 100644
--- a/runtime/vm/class_id.h
+++ b/runtime/vm/class_id.h
@@ -228,7 +228,6 @@
 bool IsIntegerClassId(intptr_t index);
 bool IsStringClassId(intptr_t index);
 bool IsOneByteStringClassId(intptr_t index);
-bool IsTwoByteStringClassId(intptr_t index);
 bool IsExternalStringClassId(intptr_t index);
 bool IsBuiltinListClassId(intptr_t index);
 bool IsTypeClassId(intptr_t index);
@@ -236,19 +235,11 @@
 bool IsTypedDataClassId(intptr_t index);
 bool IsTypedDataViewClassId(intptr_t index);
 bool IsExternalTypedDataClassId(intptr_t index);
-bool IsFfiNativeTypeTypeClassId(intptr_t index);
 bool IsFfiPointerClassId(intptr_t index);
 bool IsFfiTypeClassId(intptr_t index);
-bool IsFfiTypeIntClassId(intptr_t index);
-bool IsFfiTypeDoubleClassId(intptr_t index);
-bool IsFfiTypeVoidClassId(intptr_t index);
-bool IsFfiTypeNativeFunctionClassId(intptr_t index);
 bool IsFfiDynamicLibraryClassId(intptr_t index);
-bool IsFfiClassId(intptr_t index);
 bool IsInternalVMdefinedClassId(intptr_t index);
-bool IsVariableSizeClassId(intptr_t index);
 bool IsImplicitFieldClassId(intptr_t index);
-intptr_t NumberOfTypedDataClasses();
 
 inline bool IsErrorClassId(intptr_t index) {
   // Make sure this function is updated when new Error types are added.
@@ -272,39 +263,21 @@
   return (index >= kIntegerCid && index <= kMintCid);
 }
 
+// Make sure this check is updated when new StringCid types are added.
+COMPILE_ASSERT(kOneByteStringCid == kStringCid + 1 &&
+               kTwoByteStringCid == kStringCid + 2 &&
+               kExternalOneByteStringCid == kStringCid + 3 &&
+               kExternalTwoByteStringCid == kStringCid + 4);
+
 inline bool IsStringClassId(intptr_t index) {
-  // Make sure this function is updated when new StringCid types are added.
-  COMPILE_ASSERT(kOneByteStringCid == kStringCid + 1 &&
-                 kTwoByteStringCid == kStringCid + 2 &&
-                 kExternalOneByteStringCid == kStringCid + 3 &&
-                 kExternalTwoByteStringCid == kStringCid + 4);
   return (index >= kStringCid && index <= kExternalTwoByteStringCid);
 }
 
 inline bool IsOneByteStringClassId(intptr_t index) {
-  // Make sure this function is updated when new StringCid types are added.
-  COMPILE_ASSERT(kOneByteStringCid == kStringCid + 1 &&
-                 kTwoByteStringCid == kStringCid + 2 &&
-                 kExternalOneByteStringCid == kStringCid + 3 &&
-                 kExternalTwoByteStringCid == kStringCid + 4);
   return (index == kOneByteStringCid || index == kExternalOneByteStringCid);
 }
 
-inline bool IsTwoByteStringClassId(intptr_t index) {
-  // Make sure this function is updated when new StringCid types are added.
-  COMPILE_ASSERT(kOneByteStringCid == kStringCid + 1 &&
-                 kTwoByteStringCid == kStringCid + 2 &&
-                 kExternalOneByteStringCid == kStringCid + 3 &&
-                 kExternalTwoByteStringCid == kStringCid + 4);
-  return (index == kTwoByteStringCid || index == kExternalTwoByteStringCid);
-}
-
 inline bool IsExternalStringClassId(intptr_t index) {
-  // Make sure this function is updated when new StringCid types are added.
-  COMPILE_ASSERT(kOneByteStringCid == kStringCid + 1 &&
-                 kTwoByteStringCid == kStringCid + 2 &&
-                 kExternalOneByteStringCid == kStringCid + 3 &&
-                 kExternalTwoByteStringCid == kStringCid + 4);
   return (index == kExternalOneByteStringCid ||
           index == kExternalTwoByteStringCid);
 }
@@ -354,10 +327,6 @@
                                            3) == kTypedDataCidRemainderExternal;
 }
 
-inline bool IsFfiNativeTypeTypeClassId(intptr_t index) {
-  return index == kFfiNativeTypeCid;
-}
-
 inline bool IsFfiTypeClassId(intptr_t index) {
   switch (index) {
     case kFfiPointerCid:
@@ -384,30 +353,10 @@
   UNREACHABLE();
 }
 
-inline bool IsFfiTypeIntClassId(intptr_t index) {
-  return (index >= kFfiInt8Cid && index <= kFfiIntPtrCid);
-}
-
-inline bool IsFfiTypeDoubleClassId(intptr_t index) {
-  return (index >= kFfiFloatCid && index <= kFfiDoubleCid);
-}
-
 inline bool IsFfiPointerClassId(intptr_t index) {
   return index == kFfiPointerCid;
 }
 
-inline bool IsFfiTypeVoidClassId(intptr_t index) {
-  return index == kFfiVoidCid;
-}
-
-inline bool IsFfiTypeNativeFunctionClassId(intptr_t index) {
-  return index == kFfiNativeFunctionCid;
-}
-
-inline bool IsFfiClassId(intptr_t index) {
-  return (index >= kFfiPointerCid && index <= kFfiVoidCid);
-}
-
 inline bool IsFfiDynamicLibraryClassId(intptr_t index) {
   return index == kFfiDynamicLibraryCid;
 }
@@ -416,21 +365,6 @@
   return ((index < kNumPredefinedCids) && !IsImplicitFieldClassId(index));
 }
 
-inline bool IsVariableSizeClassId(intptr_t index) {
-  return (index == kArrayCid) || (index == kImmutableArrayCid) ||
-         IsOneByteStringClassId(index) || IsTwoByteStringClassId(index) ||
-         IsTypedDataClassId(index) || (index == kContextCid) ||
-         (index == kTypeArgumentsCid) || (index == kInstructionsCid) ||
-         (index == kInstructionsSectionCid) ||
-         (index == kInstructionsTableCid) || (index == kObjectPoolCid) ||
-         (index == kPcDescriptorsCid) || (index == kCodeSourceMapCid) ||
-         (index == kCompressedStackMapsCid) ||
-         (index == kLocalVarDescriptorsCid) ||
-         (index == kExceptionHandlersCid) || (index == kCodeCid) ||
-         (index == kContextScopeCid) || (index == kInstanceCid) ||
-         (index == kRegExpCid);
-}
-
 // This is a set of classes that are not Dart classes whose representation
 // is defined by the VM but are used in the VM code by computing the
 // implicit field offsets of the various fields in the dart object.
@@ -438,35 +372,30 @@
   return index == kByteBufferCid;
 }
 
-inline intptr_t NumberOfTypedDataClasses() {
-  // Make sure this is updated when new TypedData types are added.
+// Make sure the following checks are updated when adding new TypedData types.
 
-  // Ensure that each typed data type comes in internal/view/external variants
-  // next to each other.
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 1 == kTypedDataInt8ArrayViewCid);
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 2 == kExternalTypedDataInt8ArrayCid);
+// Ensure that each typed data type comes in internal/view/external variants
+// next to each other.
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 1 == kTypedDataInt8ArrayViewCid);
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 2 == kExternalTypedDataInt8ArrayCid);
 
-  // Ensure the order of the typed data members in 3-step.
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 1 * 3 == kTypedDataUint8ArrayCid);
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 2 * 3 ==
-                 kTypedDataUint8ClampedArrayCid);
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 3 * 3 == kTypedDataInt16ArrayCid);
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 4 * 3 == kTypedDataUint16ArrayCid);
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 5 * 3 == kTypedDataInt32ArrayCid);
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 6 * 3 == kTypedDataUint32ArrayCid);
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 7 * 3 == kTypedDataInt64ArrayCid);
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 8 * 3 == kTypedDataUint64ArrayCid);
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 9 * 3 == kTypedDataFloat32ArrayCid);
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 10 * 3 == kTypedDataFloat64ArrayCid);
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 11 * 3 ==
-                 kTypedDataFloat32x4ArrayCid);
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 12 * 3 == kTypedDataInt32x4ArrayCid);
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 13 * 3 ==
-                 kTypedDataFloat64x2ArrayCid);
-  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 14 * 3 == kByteDataViewCid);
-  COMPILE_ASSERT(kByteBufferCid + 1 == kNullCid);
-  return (kNullCid - kTypedDataInt8ArrayCid);
-}
+// Ensure the order of the typed data members in 3-step.
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 1 * 3 == kTypedDataUint8ArrayCid);
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 2 * 3 ==
+               kTypedDataUint8ClampedArrayCid);
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 3 * 3 == kTypedDataInt16ArrayCid);
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 4 * 3 == kTypedDataUint16ArrayCid);
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 5 * 3 == kTypedDataInt32ArrayCid);
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 6 * 3 == kTypedDataUint32ArrayCid);
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 7 * 3 == kTypedDataInt64ArrayCid);
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 8 * 3 == kTypedDataUint64ArrayCid);
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 9 * 3 == kTypedDataFloat32ArrayCid);
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 10 * 3 == kTypedDataFloat64ArrayCid);
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 11 * 3 == kTypedDataFloat32x4ArrayCid);
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 12 * 3 == kTypedDataInt32x4ArrayCid);
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 13 * 3 == kTypedDataFloat64x2ArrayCid);
+COMPILE_ASSERT(kTypedDataInt8ArrayCid + 14 * 3 == kByteDataViewCid);
+COMPILE_ASSERT(kByteBufferCid + 1 == kNullCid);
 
 }  // namespace dart
 
diff --git a/runtime/vm/class_table.cc b/runtime/vm/class_table.cc
index 3f1274c..dbf8f22 100644
--- a/runtime/vm/class_table.cc
+++ b/runtime/vm/class_table.cc
@@ -540,10 +540,6 @@
   }
 }
 
-bool SharedClassTable::ShouldUpdateSizeForClassId(intptr_t cid) {
-  return !IsVariableSizeClassId(cid);
-}
-
 intptr_t SharedClassTable::ClassOffsetFor(intptr_t cid) {
   return cid * sizeof(uint8_t);  // NOLINT
 }
diff --git a/runtime/vm/class_table.h b/runtime/vm/class_table.h
index 9f23820..9d5ad54 100644
--- a/runtime/vm/class_table.h
+++ b/runtime/vm/class_table.h
@@ -216,8 +216,6 @@
   friend class Scavenger;
   friend class ScavengerWeakVisitor;
 
-  static bool ShouldUpdateSizeForClassId(intptr_t cid);
-
 #ifndef PRODUCT
   // Copy-on-write is used for trace_allocation_table_, with old copies stored
   // in old_tables_.