mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
GH-106701: Move _PyUopExecute to Python/executor.c (GH-106924)
This commit is contained in:
parent
9c81fc2dbe
commit
8f4de57699
13 changed files with 276 additions and 247 deletions
|
@ -1,4 +1,4 @@
|
|||
// Macros and other things needed by ceval.c and bytecodes.c
|
||||
// Macros and other things needed by ceval.c, executor.c, and bytecodes.c
|
||||
|
||||
/* Computed GOTOs, or
|
||||
the-optimization-commonly-but-improperly-known-as-"threaded code"
|
||||
|
@ -304,6 +304,11 @@ GETITEM(PyObject *v, Py_ssize_t i) {
|
|||
(COUNTER) += (1 << ADAPTIVE_BACKOFF_BITS); \
|
||||
} while (0);
|
||||
|
||||
#define UNBOUNDLOCAL_ERROR_MSG \
|
||||
"cannot access local variable '%s' where it is not associated with a value"
|
||||
#define UNBOUNDFREE_ERROR_MSG \
|
||||
"cannot access free variable '%s' where it is not associated with a value" \
|
||||
" in enclosing scope"
|
||||
#define NAME_ERROR_MSG "name '%.200s' is not defined"
|
||||
|
||||
#define KWNAMES_LEN() \
|
||||
|
@ -352,3 +357,10 @@ static const convertion_func_ptr CONVERSION_FUNCTIONS[4] = {
|
|||
};
|
||||
|
||||
#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)))
|
||||
#else
|
||||
#define _Py_atomic_load_relaxed_int32(ATOMIC_VAL) _Py_atomic_load_relaxed(ATOMIC_VAL)
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue