// AotClassLinker is only used for AOT compiler, which includes some logic for class initialization // which will only be used in pre-compilation. class AotClassLinker : public ClassLinker { public: explicit AotClassLinker(InternTable *intern_table);
~AotClassLinker();
// Verifies if the method is accessible according to the SdkChecker (if installed). bool DenyAccessBasedOnPublicSdk(ArtMethod* art_method) const override
REQUIRES_SHARED(Locks::mutator_lock_); // Verifies if the field is accessible according to the SdkChecker (if installed). bool DenyAccessBasedOnPublicSdk(ArtField* art_field) const override
REQUIRES_SHARED(Locks::mutator_lock_); // Verifies if the descriptor is accessible according to the SdkChecker (if installed). bool DenyAccessBasedOnPublicSdk(std::string_view type_descriptor) const override; // Enable or disable public sdk checks. void SetEnablePublicSdkChecks(bool enabled) override;
// Transaction support.
EXPORT bool IsActiveTransaction() const; // EnterTransactionMode may suspend.
EXPORT void EnterTransactionMode(bool strict, mirror::Class* root)
REQUIRES_SHARED(Locks::mutator_lock_);
EXPORT void ExitTransactionMode();
EXPORT void RollbackAllTransactions() REQUIRES_SHARED(Locks::mutator_lock_); // Transaction rollback and exit transaction are always done together, it's convenience to // do them in one function. void RollbackAndExitTransactionMode() REQUIRES_SHARED(Locks::mutator_lock_); const Transaction* GetTransaction() const;
Transaction* GetTransaction(); bool IsActiveStrictTransactionMode() const;
// Transaction constraint checks for AOT compilation. bool TransactionWriteConstraint(Thread* self, ObjPtr<mirror::Object> obj) override
REQUIRES_SHARED(Locks::mutator_lock_); bool TransactionWriteValueConstraint(Thread* self, ObjPtr<mirror::Object> value) override
REQUIRES_SHARED(Locks::mutator_lock_); // Note: The read constraint check is non-virtual because it's not needed by `UnstartedRuntime`. bool TransactionReadConstraint(Thread* self, ObjPtr<mirror::Object> obj)
REQUIRES_SHARED(Locks::mutator_lock_); bool TransactionAllocationConstraint(Thread* self, ObjPtr<mirror::Class> klass) override
REQUIRES_SHARED(Locks::mutator_lock_);
// Get transactional switch interpreter entrypoint for AOT compilation. constvoid* GetTransactionalInterpreter() override;
protected: // Overridden version of PerformClassVerification allows skipping verification if the class was // previously verified but unloaded.
verifier::FailureKind PerformClassVerification(Thread* self,
verifier::VerifierDeps* verifier_deps,
Handle<mirror::Class> klass,
verifier::HardFailLogMode log_level,
std::string* error_msg)
override
REQUIRES_SHARED(Locks::mutator_lock_);
// Override AllocClass because aot compiler will need to perform a transaction check to determine // can we allocate class from heap. bool CanAllocClass()
override
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Roles::uninterruptible_);
// Transactions used for pre-initializing classes at compilation time. // Support nested transactions, maintain a list containing all transactions. Transactions are // handled under a stack discipline. Because GC needs to go over all transactions, we choose list // as substantial data structure instead of stack.
std::forward_list<Transaction> preinitialization_transactions_;
};
} // namespace art
#endif// ART_DEX2OAT_AOT_CLASS_LINKER_H_
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 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.