Lines Matching defs:ref
527 IndirectRef ref = globals_.Add(IRT_FIRST_SEGMENT, obj);
528 return reinterpret_cast<jobject>(ref);
539 IndirectRef ref = weak_globals_.Add(IRT_FIRST_SEGMENT, obj);
540 return reinterpret_cast<jweak>(ref);
629 mirror::Object* JavaVMExt::DecodeGlobal(IndirectRef ref) {
630 return globals_.SynchronizedGet(ref);
633 void JavaVMExt::UpdateGlobal(Thread* self, IndirectRef ref, mirror::Object* result) {
635 globals_.Update(ref, result);
649 mirror::Object* JavaVMExt::DecodeWeakGlobal(Thread* self, IndirectRef ref) {
656 DCHECK_EQ(GetIndirectRefKind(ref), kWeakGlobal);
658 return weak_globals_.SynchronizedGet(ref);
661 return DecodeWeakGlobalLocked(self, ref);
664 mirror::Object* JavaVMExt::DecodeWeakGlobalLocked(Thread* self, IndirectRef ref) {
671 return weak_globals_.Get(ref);
674 mirror::Object* JavaVMExt::DecodeWeakGlobalDuringShutdown(Thread* self, IndirectRef ref) {
675 DCHECK_EQ(GetIndirectRefKind(ref), kWeakGlobal);
678 return DecodeWeakGlobal(self, ref);
684 return weak_globals_.SynchronizedGet(ref);
687 bool JavaVMExt::IsWeakGlobalCleared(Thread* self, IndirectRef ref) {
688 DCHECK_EQ(GetIndirectRefKind(ref), kWeakGlobal);
693 // When just checking a weak ref has been cleared, avoid triggering the read barrier in decode
695 // sentinel is a non-moving object, we can compare the ref to it without the read barrier and
697 return Runtime::Current()->IsClearedJniWeakGlobal(weak_globals_.Get<kWithoutReadBarrier>(ref));
700 void JavaVMExt::UpdateWeakGlobal(Thread* self, IndirectRef ref, mirror::Object* result) {
702 weak_globals_.Update(ref, result);
912 // Need to skip null here to distinguish between null entries and cleared weak ref entries.