class ImTable { public: // Interface method table size. Increasing this value reduces the chance of two interface methods // colliding in the interface method table but increases the size of classes that implement // (non-marker) interfaces. // When this value changes, old images become incompatible, so image file version must change too. static constexpr size_t kSize = 43; // Default methods cannot store the imt_index, so instead we make its IMT index depend on the // method_index and mask it with the closest power of 2 of kSize - 1. This // is to simplify fetching it in the interpreter. static constexpr size_t kSizeTruncToPowerOfTwo = TruncToPowerOfTwo(kSize);
// Converts a method to the base hash components used in GetImtIndex.
ALWAYS_INLINE staticinlinevoid GetImtHashComponents(const DexFile& dex_file,
uint32_t dex_method_index,
uint32_t* class_hash,
uint32_t* name_hash,
uint32_t* signature_hash);
// The (complete) hashing scheme to map an ArtMethod to a slot in the Interface Method Table // (IMT).
ALWAYS_INLINE staticinline uint32_t GetImtIndex(ArtMethod* method)
REQUIRES_SHARED(Locks::mutator_lock_);
};
} // namespace art
#endif// ART_RUNTIME_IMTABLE_H_
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-06-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.