@@ -77,7 +77,6 @@ dummy_func(
7777 PyObject * * stack_pointer ,
7878 PyObject * kwnames ,
7979 int throwflag ,
80- binaryfunc binary_ops [],
8180 PyObject * args []
8281)
8382{
@@ -893,7 +892,7 @@ dummy_func(
893892 iter = _PyCoro_GetAwaitableIter (iterable );
894893
895894 if (iter == NULL ) {
896- format_awaitable_error (tstate , Py_TYPE (iterable ), oparg );
895+ _PyEval_FormatAwaitableError (tstate , Py_TYPE (iterable ), oparg );
897896 }
898897
899898 DECREF_INPUTS ();
@@ -1120,9 +1119,9 @@ dummy_func(
11201119 err = PyObject_DelItem (ns , name );
11211120 // Can't use ERROR_IF here.
11221121 if (err != 0 ) {
1123- format_exc_check_arg (tstate , PyExc_NameError ,
1124- NAME_ERROR_MSG ,
1125- name );
1122+ _PyEval_FormatExcCheckArg (tstate , PyExc_NameError ,
1123+ NAME_ERROR_MSG ,
1124+ name );
11261125 goto error ;
11271126 }
11281127 }
@@ -1145,7 +1144,7 @@ dummy_func(
11451144 DECREMENT_ADAPTIVE_COUNTER (cache -> counter );
11461145 #endif /* ENABLE_SPECIALIZATION */
11471146 PyObject * * top = stack_pointer + oparg - 1 ;
1148- int res = unpack_iterable (tstate , seq , oparg , -1 , top );
1147+ int res = _PyEval_UnpackIterable (tstate , seq , oparg , -1 , top );
11491148 DECREF_INPUTS ();
11501149 ERROR_IF (res == 0 , error );
11511150 }
@@ -1185,7 +1184,7 @@ dummy_func(
11851184 inst (UNPACK_EX , (seq -- unused [oparg & 0xFF ], unused , unused [oparg >> 8 ])) {
11861185 int totalargs = 1 + (oparg & 0xFF ) + (oparg >> 8 );
11871186 PyObject * * top = stack_pointer + totalargs - 1 ;
1188- int res = unpack_iterable (tstate , seq , oparg & 0xFF , oparg >> 8 , top );
1187+ int res = _PyEval_UnpackIterable (tstate , seq , oparg & 0xFF , oparg >> 8 , top );
11891188 DECREF_INPUTS ();
11901189 ERROR_IF (res == 0 , error );
11911190 }
@@ -1235,8 +1234,8 @@ dummy_func(
12351234 // Can't use ERROR_IF here.
12361235 if (err != 0 ) {
12371236 if (_PyErr_ExceptionMatches (tstate , PyExc_KeyError )) {
1238- format_exc_check_arg (tstate , PyExc_NameError ,
1239- NAME_ERROR_MSG , name );
1237+ _PyEval_FormatExcCheckArg (tstate , PyExc_NameError ,
1238+ NAME_ERROR_MSG , name );
12401239 }
12411240 goto error ;
12421241 }
@@ -1274,7 +1273,7 @@ dummy_func(
12741273 goto error ;
12751274 }
12761275 if (v == NULL ) {
1277- format_exc_check_arg (
1276+ _PyEval_FormatExcCheckArg (
12781277 tstate , PyExc_NameError ,
12791278 NAME_ERROR_MSG , name );
12801279 goto error ;
@@ -1315,8 +1314,8 @@ dummy_func(
13151314 if (!_PyErr_Occurred (tstate )) {
13161315 /* _PyDict_LoadGlobal() returns NULL without raising
13171316 * an exception if the key doesn't exist */
1318- format_exc_check_arg (tstate , PyExc_NameError ,
1319- NAME_ERROR_MSG , name );
1317+ _PyEval_FormatExcCheckArg (tstate , PyExc_NameError ,
1318+ NAME_ERROR_MSG , name );
13201319 }
13211320 ERROR_IF (true, error );
13221321 }
@@ -1331,7 +1330,7 @@ dummy_func(
13311330 /* namespace 2: builtins */
13321331 ERROR_IF (PyMapping_GetOptionalItem (BUILTINS (), name , & v ) < 0 , error );
13331332 if (v == NULL ) {
1334- format_exc_check_arg (
1333+ _PyEval_FormatExcCheckArg (
13351334 tstate , PyExc_NameError ,
13361335 NAME_ERROR_MSG , name );
13371336 ERROR_IF (true, error );
@@ -1413,7 +1412,7 @@ dummy_func(
14131412 // Can't use ERROR_IF here.
14141413 // Fortunately we don't need its superpower.
14151414 if (oldobj == NULL ) {
1416- format_exc_unbound (tstate , _PyFrame_GetCode (frame ), oparg );
1415+ _PyEval_FormatExcUnbound (tstate , _PyFrame_GetCode (frame ), oparg );
14171416 goto error ;
14181417 }
14191418 PyCell_SET (cell , NULL );
@@ -1434,7 +1433,7 @@ dummy_func(
14341433 PyObject * cell = GETLOCAL (oparg );
14351434 value = PyCell_GET (cell );
14361435 if (value == NULL ) {
1437- format_exc_unbound (tstate , _PyFrame_GetCode (frame ), oparg );
1436+ _PyEval_FormatExcUnbound (tstate , _PyFrame_GetCode (frame ), oparg );
14381437 goto error ;
14391438 }
14401439 Py_INCREF (value );
@@ -1445,7 +1444,7 @@ dummy_func(
14451444 PyObject * cell = GETLOCAL (oparg );
14461445 value = PyCell_GET (cell );
14471446 if (value == NULL ) {
1448- format_exc_unbound (tstate , _PyFrame_GetCode (frame ), oparg );
1447+ _PyEval_FormatExcUnbound (tstate , _PyFrame_GetCode (frame ), oparg );
14491448 ERROR_IF (true, error );
14501449 }
14511450 Py_INCREF (value );
@@ -1612,7 +1611,7 @@ dummy_func(
16121611 PyObject * dict = PEEK (oparg + 1 ); // update is still on the stack
16131612
16141613 if (_PyDict_MergeEx (dict , update , 2 ) < 0 ) {
1615- format_kwargs_error (tstate , PEEK (3 + oparg ), update );
1614+ _PyEval_FormatKwargsError (tstate , PEEK (3 + oparg ), update );
16161615 DECREF_INPUTS ();
16171616 ERROR_IF (true, error );
16181617 }
@@ -2126,15 +2125,15 @@ dummy_func(
21262125 }
21272126
21282127 inst (CHECK_EG_MATCH , (exc_value , match_type -- rest , match )) {
2129- if (check_except_star_type_valid (tstate , match_type ) < 0 ) {
2128+ if (_PyEval_CheckExceptStarTypeValid (tstate , match_type ) < 0 ) {
21302129 DECREF_INPUTS ();
21312130 ERROR_IF (true, error );
21322131 }
21332132
21342133 match = NULL ;
21352134 rest = NULL ;
2136- int res = exception_group_match (exc_value , match_type ,
2137- & match , & rest );
2135+ int res = _PyEval_ExceptionGroupMatch (exc_value , match_type ,
2136+ & match , & rest );
21382137 DECREF_INPUTS ();
21392138 ERROR_IF (res < 0 , error );
21402139
@@ -2148,7 +2147,7 @@ dummy_func(
21482147
21492148 inst (CHECK_EXC_MATCH , (left , right -- left , b )) {
21502149 assert (PyExceptionInstance_Check (left ));
2151- if (check_except_type_valid (tstate , right ) < 0 ) {
2150+ if (_PyEval_CheckExceptTypeValid (tstate , right ) < 0 ) {
21522151 DECREF_INPUTS ();
21532152 ERROR_IF (true, error );
21542153 }
@@ -2275,7 +2274,7 @@ dummy_func(
22752274 // Pop TOS and TOS1. Set TOS to a tuple of attributes on success, or
22762275 // None on failure.
22772276 assert (PyTuple_CheckExact (names ));
2278- attrs = match_class (tstate , subject , type , oparg , names );
2277+ attrs = _PyEval_MatchClass (tstate , subject , type , oparg , names );
22792278 DECREF_INPUTS ();
22802279 if (attrs ) {
22812280 assert (PyTuple_CheckExact (attrs )); // Success!
@@ -2298,7 +2297,7 @@ dummy_func(
22982297
22992298 inst (MATCH_KEYS , (subject , keys -- subject , keys , values_or_none )) {
23002299 // On successful match, PUSH(values). Otherwise, PUSH(None).
2301- values_or_none = match_keys (tstate , subject , keys );
2300+ values_or_none = _PyEval_MatchKeys (tstate , subject , keys );
23022301 ERROR_IF (values_or_none == NULL , error );
23032302 }
23042303
@@ -3617,10 +3616,10 @@ dummy_func(
36173616 STAT_INC (BINARY_OP , deferred );
36183617 DECREMENT_ADAPTIVE_COUNTER (cache -> counter );
36193618 #endif /* ENABLE_SPECIALIZATION */
3620- assert (0 <= oparg );
3621- assert (( unsigned ) oparg < Py_ARRAY_LENGTH ( binary_ops ) );
3622- assert (binary_ops [oparg ]);
3623- res = binary_ops [oparg ](lhs , rhs );
3619+ assert (NB_ADD <= oparg );
3620+ assert (oparg <= NB_INPLACE_XOR );
3621+ assert (_PyEval_BinaryOps [oparg ]);
3622+ res = _PyEval_BinaryOps [oparg ](lhs , rhs );
36243623 DECREF_INPUTS ();
36253624 ERROR_IF (res == NULL , error );
36263625 }
0 commit comments