diff --git a/Python/specialize.c b/Python/specialize.c index 7d01ce96e22b27..50b9815ee902b5 100644 --- a/Python/specialize.c +++ b/Python/specialize.c @@ -2377,7 +2377,7 @@ binary_op_fail_kind(int oparg, PyObject *lhs, PyObject *rhs) /* float-long */ static int -float_long_guard(PyObject *lhs, PyObject *rhs) +float_compactlong_guard(PyObject *lhs, PyObject *rhs) { return ( PyFloat_CheckExact(lhs) && @@ -2394,23 +2394,23 @@ float_long_guard(PyObject *lhs, PyObject *rhs) Py_ssize_t rhs_val = _PyLong_CompactValue((PyLongObject *)rhs); \ return PyFloat_FromDouble(lhs_val OP rhs_val); \ } -FLOAT_LONG_ACTION(float_long_add, +) -FLOAT_LONG_ACTION(float_long_subtract, -) -FLOAT_LONG_ACTION(float_long_multiply, *) -FLOAT_LONG_ACTION(float_long_true_div, /) +FLOAT_LONG_ACTION(float_compactlong_add, +) +FLOAT_LONG_ACTION(float_compactlong_subtract, -) +FLOAT_LONG_ACTION(float_compactlong_multiply, *) +FLOAT_LONG_ACTION(float_compactlong_true_div, /) #undef FLOAT_LONG_ACTION -static binaryopactionfunc float_long_actions[NB_OPARG_LAST+1] = { - [NB_ADD] = float_long_add, - [NB_SUBTRACT] = float_long_subtract, - [NB_TRUE_DIVIDE] = float_long_true_div, - [NB_INPLACE_MULTIPLY] = float_long_multiply, +static binaryopactionfunc float_compactlong_actions[NB_OPARG_LAST+1] = { + [NB_ADD] = float_compactlong_add, + [NB_SUBTRACT] = float_compactlong_subtract, + [NB_TRUE_DIVIDE] = float_compactlong_true_div, + [NB_INPLACE_MULTIPLY] = float_compactlong_multiply, }; /* long-float */ static int -long_float_guard(PyObject *lhs, PyObject *rhs) +compactlong_float_guard(PyObject *lhs, PyObject *rhs) { return ( PyFloat_CheckExact(rhs) && @@ -2427,34 +2427,34 @@ long_float_guard(PyObject *lhs, PyObject *rhs) Py_ssize_t lhs_val = _PyLong_CompactValue((PyLongObject *)lhs); \ return PyFloat_FromDouble(lhs_val OP rhs_val); \ } -LONG_FLOAT_ACTION(long_float_add, +) -LONG_FLOAT_ACTION(long_float_subtract, -) -LONG_FLOAT_ACTION(long_float_multiply, *) -LONG_FLOAT_ACTION(long_float_true_div, /) +LONG_FLOAT_ACTION(compactlong_float_add, +) +LONG_FLOAT_ACTION(compactlong_float_subtract, -) +LONG_FLOAT_ACTION(compactlong_float_multiply, *) +LONG_FLOAT_ACTION(compactlong_float_true_div, /) #undef LONG_FLOAT_ACTION -static binaryopactionfunc long_float_actions[NB_OPARG_LAST+1] = { - [NB_ADD] = long_float_add, - [NB_SUBTRACT] = long_float_subtract, - [NB_TRUE_DIVIDE] = long_float_true_div, - [NB_INPLACE_MULTIPLY] = long_float_multiply, +static binaryopactionfunc compactlong_float_actions[NB_OPARG_LAST+1] = { + [NB_ADD] = compactlong_float_add, + [NB_SUBTRACT] = compactlong_float_subtract, + [NB_TRUE_DIVIDE] = compactlong_float_true_div, + [NB_INPLACE_MULTIPLY] = compactlong_float_multiply, }; static int binary_op_extended_specialization(PyObject *lhs, PyObject *rhs, int oparg, binaryopguardfunc *guard, binaryopactionfunc *action) { - if (long_float_actions[oparg]) { - if (long_float_guard(lhs, rhs)) { - *guard = long_float_guard; - *action = long_float_actions[oparg]; + if (compactlong_float_actions[oparg]) { + if (compactlong_float_guard(lhs, rhs)) { + *guard = compactlong_float_guard; + *action = compactlong_float_actions[oparg]; return 1; } } - if (float_long_actions[oparg]) { - if (float_long_guard(lhs, rhs)) { - *guard = float_long_guard; - *action = float_long_actions[oparg]; + if (float_compactlong_actions[oparg]) { + if (float_compactlong_guard(lhs, rhs)) { + *guard = float_compactlong_guard; + *action = float_compactlong_actions[oparg]; return 1; } }