@@ -226,8 +226,9 @@ typedef union {
226226 uintptr_t bits ;
227227} JitOptRef ;
228228
229- #define JIT_BITS_TO_PTR (REF ) ((JitOptSymbol *)((REF).bits))
230- #define JIT_BITS_TO_PTR_MASKED (REF ) ((JitOptSymbol *)(((REF).bits) & (~Py_TAG_REFCNT)))
229+ #define REF_IS_BORROWED 1
230+
231+ #define JIT_BITS_TO_PTR_MASKED (REF ) ((JitOptSymbol *)(((REF).bits) & (~REF_IS_BORROWED)))
231232
232233static inline JitOptSymbol *
233234PyJitRef_Unwrap (JitOptRef ref )
@@ -242,22 +243,18 @@ static inline JitOptRef
242243PyJitRef_Wrap (JitOptSymbol * sym )
243244{
244245 if (sym == NULL || _Py_uop_symbol_is_immortal (sym )) {
245- return (JitOptRef ){.bits = (uintptr_t )sym | Py_TAG_REFCNT };
246+ return (JitOptRef ){.bits = (uintptr_t )sym | REF_IS_BORROWED };
246247 }
247248 return (JitOptRef ){.bits = (uintptr_t )sym };
248249}
249250
250251static inline JitOptRef
251252PyJitRef_Borrow (JitOptRef ref )
252253{
253- return (JitOptRef ){ .bits = ref .bits | Py_TAG_REFCNT };
254+ return (JitOptRef ){ .bits = ref .bits | REF_IS_BORROWED };
254255}
255256
256- #ifndef Py_GIL_DISABLED
257- static const JitOptRef PyJitRef_NULL = {.bits = PyStackRef_NULL_BITS };
258- #else
259- static const JitOptRef PyJitRef_NULL = {.bits = Py_TAG_DEFERRED };
260- #endif
257+ static const JitOptRef PyJitRef_NULL = {.bits = REF_IS_BORROWED };
261258
262259static inline bool
263260PyJitRef_IsNull (JitOptRef ref )
@@ -268,7 +265,7 @@ PyJitRef_IsNull(JitOptRef ref)
268265static inline int
269266PyJitRef_IsBorrowed (JitOptRef ref )
270267{
271- return (ref .bits & Py_TAG_REFCNT ) == Py_TAG_REFCNT ;
268+ return (ref .bits & REF_IS_BORROWED ) == REF_IS_BORROWED ;
272269}
273270
274271struct _Py_UOpsAbstractFrame {
0 commit comments