template <ReadBarrierOption kReadBarrierOption> inline ObjPtr<mirror::Class> GetClassRoot(ClassRoot class_root,
ObjPtr<mirror::ObjectArray<mirror::Class>> class_roots) {
DCHECK(class_roots != nullptr); if (kReadBarrierOption == kWithReadBarrier) { // With read barrier all references must point to the to-space. // Without read barrier, this check could fail.
DCHECK_EQ(class_roots, Runtime::Current()->GetClassLinker()->GetClassRoots());
}
DCHECK_LT(static_cast<uint32_t>(class_root), static_cast<uint32_t>(ClassRoot::kMax));
int32_t index = static_cast<int32_t>(class_root);
ObjPtr<mirror::Class> klass =
class_roots->GetWithoutChecks<kDefaultVerifyFlags, kReadBarrierOption>(index);
DCHECK(klass != nullptr); return klass;
}
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.