// Returns true if the object can be stored into the array. If not, throws // an ArrayStoreException and returns false. // TODO fix thread safety analysis: should be REQUIRES_SHARED(Locks::mutator_lock_). template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags> bool CheckAssignable(ObjPtr<T> object) NO_THREAD_SAFETY_ANALYSIS;
ALWAYS_INLINE void Set(int32_t i, ObjPtr<T> object) REQUIRES_SHARED(Locks::mutator_lock_); // TODO fix thread safety analysis: should be REQUIRES_SHARED(Locks::mutator_lock_). template<bool kTransactionActive, bool kCheckTransaction = true,
VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags>
ALWAYS_INLINE void Set(int32_t i, ObjPtr<T> object) NO_THREAD_SAFETY_ANALYSIS;
// Set element without bound and element type checks, to be used in limited // circumstances, such as during boot image writing. // TODO fix thread safety analysis broken by the use of template. This should be // REQUIRES_SHARED(Locks::mutator_lock_). template<bool kTransactionActive, bool kCheckTransaction = true,
VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags>
ALWAYS_INLINE void SetWithoutChecks(int32_t i, ObjPtr<T> object) NO_THREAD_SAFETY_ANALYSIS; // TODO fix thread safety analysis broken by the use of template. This should be // REQUIRES_SHARED(Locks::mutator_lock_). template<bool kTransactionActive, bool kCheckTransaction = true,
VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags>
ALWAYS_INLINE void SetWithoutChecksAndWriteBarrier(int32_t i, ObjPtr<T> object)
NO_THREAD_SAFETY_ANALYSIS;
// Copy src into this array (dealing with overlaps as memmove does) without assignability checks. void AssignableMemmove(int32_t dst_pos,
ObjPtr<ObjectArray<T>> src,
int32_t src_pos,
int32_t count)
REQUIRES_SHARED(Locks::mutator_lock_);
// Copy src into this array assuming no overlap and without assignability checks. void AssignableMemcpy(int32_t dst_pos,
ObjPtr<ObjectArray<T>> src,
int32_t src_pos,
int32_t count)
REQUIRES_SHARED(Locks::mutator_lock_);
// Copy src into this array with assignability checks. template<bool kTransactionActive> void AssignableCheckingMemcpy(int32_t dst_pos,
ObjPtr<ObjectArray<T>> src,
int32_t src_pos,
int32_t count, bool throw_exception)
REQUIRES_SHARED(Locks::mutator_lock_);
private: // TODO fix thread safety analysis broken by the use of template. This should be // REQUIRES_SHARED(Locks::mutator_lock_). template<typename Visitor> void VisitReferences(const Visitor& visitor) NO_THREAD_SAFETY_ANALYSIS; template<typename Visitor> void VisitReferences(const Visitor& visitor,
MemberOffset begin,
MemberOffset end) NO_THREAD_SAFETY_ANALYSIS;
friendclass Object; // For VisitReferences
DISALLOW_IMPLICIT_CONSTRUCTORS(ObjectArray);
};
// Everything is NO_THREAD_SAFETY_ANALYSIS to work-around STL incompat with thread-annotations. // Everything should have REQUIRES_SHARED(Locks::mutator_lock_). template <typename T, typename Container> class ArrayIter { private: using Iter = ArrayIter<T, Container>;
public: using iterator_category = std::forward_iterator_tag; using value_type = ObjPtr<T>; using difference_type = ptrdiff_t; using pointer = value_type*; using reference = value_type&;
¤ 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.0.9Bemerkung:
(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.