ART: Remove ObjPtr kPoison template parameter
Move to a global constexpr, so that object pointer poisoning can
be explicitly turned off for lower debug build overhead.
Bug: 35644797
Test: m
Test: m test-art-host
Change-Id: I2412b67cbec144f2aee206fb48591abe581fd00a
diff --git a/runtime/scoped_thread_state_change-inl.h b/runtime/scoped_thread_state_change-inl.h
index 000da59..c817a9e 100644
--- a/runtime/scoped_thread_state_change-inl.h
+++ b/runtime/scoped_thread_state_change-inl.h
@@ -79,11 +79,11 @@
return obj == nullptr ? nullptr : Env()->AddLocalReference<T>(obj);
}
-template<typename T, bool kPoison>
-inline ObjPtr<T, kPoison> ScopedObjectAccessAlreadyRunnable::Decode(jobject obj) const {
+template<typename T>
+inline ObjPtr<T> ScopedObjectAccessAlreadyRunnable::Decode(jobject obj) const {
Locks::mutator_lock_->AssertSharedHeld(Self());
DCHECK(IsRunnable()); // Don't work with raw objects in non-runnable states.
- return ObjPtr<T, kPoison>::DownCast(Self()->DecodeJObject(obj));
+ return ObjPtr<T>::DownCast(Self()->DecodeJObject(obj));
}
inline bool ScopedObjectAccessAlreadyRunnable::IsRunnable() const {