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.h b/runtime/scoped_thread_state_change.h
index 24199f7..a3286ac 100644
--- a/runtime/scoped_thread_state_change.h
+++ b/runtime/scoped_thread_state_change.h
@@ -27,7 +27,7 @@
namespace art {
struct JNIEnvExt;
-template<class MirrorType, bool kPoison> class ObjPtr;
+template<class MirrorType> class ObjPtr;
// Scoped change into and out of a particular state. Handles Runnable transitions that require
// more complicated suspension checking. The subclasses ScopedObjectAccessUnchecked and
@@ -91,8 +91,8 @@
T AddLocalReference(ObjPtr<mirror::Object> obj) const
REQUIRES_SHARED(Locks::mutator_lock_);
- template<typename T, bool kPoison = kIsDebugBuild>
- ObjPtr<T, kPoison> Decode(jobject obj) const REQUIRES_SHARED(Locks::mutator_lock_);
+ template<typename T>
+ ObjPtr<T> Decode(jobject obj) const REQUIRES_SHARED(Locks::mutator_lock_);
ALWAYS_INLINE bool IsRunnable() const;