@@ -74,12 +74,6 @@ _PyType_LookupRefAndVersion(PyTypeObject *type, PyObject *name, unsigned int *ve
7474 return res;
7575}
7676
77- #ifdef ENABLE_PEP523_HOOK
78- _PyFrameEvalFunction Ci_EvalFrameFunc;
79- #else
80- #define Ci_EvalFrameFunc NULL
81- #endif
82-
8377// In 3.12 _PyAsyncGenValueWrapperNew needs thread-state. As this is used from
8478// the JIT we could get the value from the thread-state register. This would be
8579// slightly more efficient, but quite a bit more work and async-generators are
@@ -5693,7 +5687,7 @@ do_specialize_instance_load_attr(PyObject* owner, _Py_CODEUNIT* instr, PyObject*
56935687 return -1 ;
56945688 }
56955689 /* Don't specialize if PEP 523 is active */
5696- if ((_PyInterpreterState_GET ()->eval_frame != NULL && _PyInterpreterState_GET ()->eval_frame != Ci_EvalFrameFunc )) {
5690+ if ((_PyInterpreterState_GET ()->eval_frame != NULL && _PyInterpreterState_GET ()->eval_frame != Ci_GetEvalFrameFunc () )) {
56975691 SPECIALIZATION_FAIL (LOAD_ATTR , SPEC_FAIL_OTHER );
56985692 return -1 ;
56995693 }
@@ -5768,7 +5762,7 @@ do_specialize_instance_load_attr(PyObject* owner, _Py_CODEUNIT* instr, PyObject*
57685762 return -1 ;
57695763 }
57705764 /* Don't specialize if PEP 523 is active */
5771- if ((_PyInterpreterState_GET ()->eval_frame != NULL && _PyInterpreterState_GET ()->eval_frame != Ci_EvalFrameFunc )) {
5765+ if ((_PyInterpreterState_GET ()->eval_frame != NULL && _PyInterpreterState_GET ()->eval_frame != Ci_GetEvalFrameFunc () )) {
57725766 SPECIALIZATION_FAIL (LOAD_ATTR , SPEC_FAIL_OTHER );
57735767 return -1 ;
57745768 }
@@ -6170,7 +6164,7 @@ specialize_py_call(PyFunctionObject *func, _Py_CODEUNIT *instr, int nargs,
61706164 PyCodeObject *code = (PyCodeObject *)func->func_code ;
61716165 int kind = function_kind (code);
61726166 /* Don't specialize if PEP 523 is active */
6173- if ((_PyInterpreterState_GET ()->eval_frame != NULL && _PyInterpreterState_GET ()->eval_frame != Ci_EvalFrameFunc )) {
6167+ if ((_PyInterpreterState_GET ()->eval_frame != NULL && _PyInterpreterState_GET ()->eval_frame != Ci_GetEvalFrameFunc () )) {
61746168 SPECIALIZATION_FAIL (CALL , SPEC_FAIL_CALL_PEP_523 );
61756169 return -1 ;
61766170 }
@@ -6374,7 +6368,7 @@ specialize_py_call_kw(PyFunctionObject *func, _Py_CODEUNIT *instr, int nargs,
63746368 PyCodeObject *code = (PyCodeObject *)func->func_code ;
63756369 int kind = function_kind (code);
63766370 /* Don't specialize if PEP 523 is active */
6377- if ((_PyInterpreterState_GET ()->eval_frame != NULL && _PyInterpreterState_GET ()->eval_frame != Ci_EvalFrameFunc )) {
6371+ if ((_PyInterpreterState_GET ()->eval_frame != NULL && _PyInterpreterState_GET ()->eval_frame != Ci_GetEvalFrameFunc () )) {
63786372 SPECIALIZATION_FAIL (CALL , SPEC_FAIL_CALL_PEP_523 );
63796373 return -1 ;
63806374 }
@@ -6652,7 +6646,7 @@ _Py_Specialize_BinaryOp(_PyStackRef lhs_st, _PyStackRef rhs_st, _Py_CODEUNIT *in
66526646 PyHeapTypeObject *ht = (PyHeapTypeObject *)container_type;
66536647 if (kind == SIMPLE_FUNCTION &&
66546648 fcode->co_argcount == 2 &&
6655- !(_PyInterpreterState_GET ()->eval_frame != NULL && _PyInterpreterState_GET ()->eval_frame != Ci_EvalFrameFunc ) && /* Don't specialize if PEP 523 is active */
6649+ !(_PyInterpreterState_GET ()->eval_frame != NULL && _PyInterpreterState_GET ()->eval_frame != Ci_GetEvalFrameFunc () ) && /* Don't specialize if PEP 523 is active */
66566650 _PyType_CacheGetItemForSpecialization (ht, descriptor, (uint32_t )tp_version))
66576651 {
66586652 specialize (instr, BINARY_OP_SUBSCR_GETITEM );
@@ -6800,7 +6794,7 @@ _Py_Specialize_ForIter(_PyStackRef iter, _Py_CODEUNIT *instr, int oparg)
68006794 instr[oparg + INLINE_CACHE_ENTRIES_FOR_ITER + 1 ].op .code == INSTRUMENTED_END_FOR
68016795 );
68026796 /* Don't specialize if PEP 523 is active */
6803- if ((_PyInterpreterState_GET ()->eval_frame != NULL && _PyInterpreterState_GET ()->eval_frame != Ci_EvalFrameFunc ))
6797+ if ((_PyInterpreterState_GET ()->eval_frame != NULL && _PyInterpreterState_GET ()->eval_frame != Ci_GetEvalFrameFunc () ))
68046798 goto failure;
68056799 specialize (instr, FOR_ITER_GEN );
68066800 return ;
@@ -6820,7 +6814,7 @@ _Py_Specialize_Send(_PyStackRef receiver_st, _Py_CODEUNIT *instr)
68206814 PyTypeObject *tp = Py_TYPE (receiver);
68216815 if (tp == &PyGen_Type || tp == &PyCoro_Type) {
68226816 /* Don't specialize if PEP 523 is active */
6823- if ((_PyInterpreterState_GET ()->eval_frame != NULL && _PyInterpreterState_GET ()->eval_frame != Ci_EvalFrameFunc )) {
6817+ if ((_PyInterpreterState_GET ()->eval_frame != NULL && _PyInterpreterState_GET ()->eval_frame != Ci_GetEvalFrameFunc () )) {
68246818 SPECIALIZATION_FAIL (SEND , SPEC_FAIL_OTHER );
68256819 goto failure;
68266820 }
0 commit comments