// Used by CompilerCallbacks to track verification information from the Runtime. template <typename DexFileReferenceType, typename Value> class AtomicDexRefMap { public: // Verified methods. The method array is fixed to avoid needing a lock to extend it. using ElementArray = dchecked_vector<Atomic<Value>>;
AtomicDexRefMap() {}
~AtomicDexRefMap() {}
// Atomically swap the element in if the existing value matches expected. enum InsertResult {
kInsertResultInvalidDexFile,
kInsertResultCASFailure,
kInsertResultSuccess,
};
InsertResult Insert(const DexFileReferenceType& ref, const Value& expected, const Value& desired);
// Retreive an item, returns false if the dex file is not added. bool Get(const DexFileReferenceType& ref, Value* out) const;
// Remove an item and return the existing value. Returns false if the dex file is not added. bool Remove(const DexFileReferenceType& ref, Value* out);
// Dex files must be added before method references belonging to them can be used as keys. Not // thread safe. void AddDexFile(const DexFile* dex_file); void AddDexFiles(const std::vector<const DexFile*>& dex_files);
// Return a vector of all dex files which were added to the map.
std::vector<const DexFile*> GetDexFiles() const;
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.