Lines Matching refs:t
67 static bool CanUseIdArrays(ArtMethod* t) { in CanUseIdArrays() argument
75 return !(t->IsObsolete() || t->IsDefaultConflicting()); in CanUseIdArrays()
79 ObjPtr<mirror::PointerArray> GetIds(ObjPtr<mirror::Class> k, ArtType* t) in GetIds() argument
83 ret = t->IsStatic() ? k->GetStaticFieldIds() : k->GetInstanceFieldIds(); in GetIds()
85 ret = CanUseIdArrays(t) ? k->GetMethodIds() : nullptr; in GetIds()
99 bool ShouldReturnPointer(ObjPtr<mirror::Class> klass, ArtType* t)
103 bool ShouldReturnPointer(ObjPtr<mirror::Class> klass, [[maybe_unused]] ArtMethod* t) { in ShouldReturnPointer() argument
113 bool ShouldReturnPointer(ObjPtr<mirror::Class> klass, ArtField* t) { in ShouldReturnPointer() argument
118 ObjPtr<mirror::Object> arr = t->IsStatic() ? ext->GetStaticJFieldIDs() in ShouldReturnPointer()
127 bool EnsureIdsArray(Thread* self, ObjPtr<mirror::Class> k, ArtType* t)
176 size_t GetIdOffset(ObjPtr<mirror::Class> k, ArtType* t, PointerSize pointer_size)
189 std::string PrettyGeneric(ArtType t) REQUIRES_SHARED(Locks::mutator_lock_);
209 bool CanUseIdArrays(ReflectiveHandle<ArtType> t) REQUIRES_SHARED(Locks::mutator_lock_);
211 bool CanUseIdArrays([[maybe_unused]] ReflectiveHandle<ArtField> t) { in CanUseIdArrays() argument
215 bool CanUseIdArrays(ReflectiveHandle<ArtMethod> t) { in CanUseIdArrays() argument
216 return CanUseIdArrays(t.Get()); in CanUseIdArrays()
221 ArtType* Canonicalize(ReflectiveHandle<ArtType> t) REQUIRES_SHARED(Locks::mutator_lock_);
223 ArtField* Canonicalize(ReflectiveHandle<ArtField> t) { in Canonicalize() argument
224 return t.Get(); in Canonicalize()
227 ArtMethod* Canonicalize(ReflectiveHandle<ArtMethod> t) { in Canonicalize() argument
228 if (UNLIKELY(t->IsCopied())) { in Canonicalize()
229 return t->GetCanonicalMethod(); in Canonicalize()
231 return t.Get(); in Canonicalize()
267 [[maybe_unused]] ReflectiveHandle<ArtField> t) { in GetLinearSearchStartId() argument
286 uintptr_t JniIdManager::EncodeGenericId(ReflectiveHandle<ArtType> t) { in EncodeGenericId() argument
291 if (id_type == JniIdType::kPointer || t == nullptr) { in EncodeGenericId()
292 return reinterpret_cast<uintptr_t>(t.Get()); in EncodeGenericId()
296 DCHECK(!t->GetDeclaringClass().IsNull()) << "Null declaring class " << PrettyGeneric(t); in EncodeGenericId()
302 if (CanUseIdArrays(t)) { in EncodeGenericId()
303 off = GetIdOffset(t->GetDeclaringClass(), Canonicalize(t), kRuntimePointerSize); in EncodeGenericId()
305 allocation_failure = EnsureIdsArray(self, t->GetDeclaringClass(), t.Get()); in EncodeGenericId()
311 } else if (ShouldReturnPointer(t->GetDeclaringClass(), t.Get())) { in EncodeGenericId()
317 return reinterpret_cast<uintptr_t>(t.Get()); in EncodeGenericId()
319 ObjPtr<mirror::Class> klass = t->GetDeclaringClass(); in EncodeGenericId()
320 ObjPtr<mirror::PointerArray> ids(GetIds(klass, t.Get())); in EncodeGenericId()
323 DCHECK_GT(ids->GetLength(), static_cast<int32_t>(off)) << " is " << PrettyGeneric(t); in EncodeGenericId()
324 DCHECK_LE(0, static_cast<int32_t>(off)) << " is " << PrettyGeneric(t); in EncodeGenericId()
338 t = hs.NewHandle(Canonicalize(t)); in EncodeGenericId()
342 ids = GetIds(klass, t.Get()); in EncodeGenericId()
343 off = GetIdOffset(klass, Canonicalize(t), kRuntimePointerSize); in EncodeGenericId()
352 DCHECK(!CanUseIdArrays(t) || deferred_allocation_refcount_ > 0u) in EncodeGenericId()
354 << " t: " << PrettyGeneric(t); in EncodeGenericId()
359 size_t search_start_index = IdToIndex(GetLinearSearchStartId(t)); in EncodeGenericId()
362 [&found, &self, t](const ArtType* candidate) { in EncodeGenericId()
364 found = found || candidate == t.Get(); in EncodeGenericId()
371 DCHECK_EQ(vec[index], t.Get()) in EncodeGenericId()
372 << "Expected: " << PrettyGeneric(vec[index]) << " got " << PrettyGeneric(t) in EncodeGenericId()
383 vec[cur_index] = t.Get(); in EncodeGenericId()
385 if (kIsDebugBuild && CanUseIdArrays(t)) { in EncodeGenericId()
533 template <typename ArtType> ArtType* JniIdManager::DecodeGenericId(uintptr_t t) { in DecodeGenericId() argument
534 if (Runtime::Current()->GetJniIdType() == JniIdType::kIndices && (t % 2) == 1) { in DecodeGenericId()
536 size_t index = IdToIndex(t); in DecodeGenericId()
540 DCHECK_EQ((t % 2), 0u) << "id: " << t; in DecodeGenericId()
541 return reinterpret_cast<ArtType*>(t); in DecodeGenericId()
648 auto set_id = [&](auto** t, uintptr_t id) REQUIRES_SHARED(Locks::mutator_lock_) { in EndDefer()
649 if (t == nullptr) { in EndDefer()
652 bool alloc_failure = EnsureIdsArray(self, (*t)->GetDeclaringClass(), *t); in EndDefer()
653 ObjPtr<mirror::Class> klass((*t)->GetDeclaringClass()); in EndDefer()
654 size_t off = GetIdOffset(klass, (*t), kRuntimePointerSize); in EndDefer()
655 ObjPtr<mirror::PointerArray> ids = GetIds(klass, (*t)); in EndDefer()