GH-105848: Replace KW_NAMES + CALL with LOAD_CONST + CALL_KW (GH-109300)

This commit is contained in:
Brandt Bucher 2023-09-13 10:25:45 -07:00 committed by GitHub
parent 987b4bc087
commit 22e65eecaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 719 additions and 508 deletions

View file

@ -311,9 +311,6 @@ GETITEM(PyObject *v, Py_ssize_t i) {
" in enclosing scope"
#define NAME_ERROR_MSG "name '%.200s' is not defined"
#define KWNAMES_LEN() \
(kwnames == NULL ? 0 : ((int)PyTuple_GET_SIZE(kwnames)))
#define DECREF_INPUTS_AND_REUSE_FLOAT(left, right, dval, result) \
do { \
if (Py_REFCNT(left) == 1) { \
@ -356,8 +353,6 @@ static const convertion_func_ptr CONVERSION_FUNCTIONS[4] = {
[FVC_ASCII] = PyObject_ASCII
};
#define ASSERT_KWNAMES_IS_NULL() assert(kwnames == NULL)
// GH-89279: Force inlining by using a macro.
#if defined(_MSC_VER) && SIZEOF_INT == 4
#define _Py_atomic_load_relaxed_int32(ATOMIC_VAL) (assert(sizeof((ATOMIC_VAL)->_value) == 4), *((volatile int*)&((ATOMIC_VAL)->_value)))