mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-100222: Redefine _Py_CODEUNIT as a union to clarify structure of code unit. (GH-100223)
This commit is contained in:
parent
985a71032b
commit
6997e77bdf
9 changed files with 150 additions and 134 deletions
|
@ -864,7 +864,7 @@ GETITEM(PyObject *v, Py_ssize_t i) {
|
|||
STAT_INC(opcode, miss); \
|
||||
STAT_INC((INSTNAME), miss); \
|
||||
/* The counter is always the first cache entry: */ \
|
||||
if (ADAPTIVE_COUNTER_IS_ZERO(*next_instr)) { \
|
||||
if (ADAPTIVE_COUNTER_IS_ZERO(next_instr->cache)) { \
|
||||
STAT_INC((INSTNAME), deopt); \
|
||||
} \
|
||||
else { \
|
||||
|
@ -1289,7 +1289,7 @@ handle_eval_breaker:
|
|||
}
|
||||
opcode = _PyOpcode_Deopt[opcode];
|
||||
if (_PyOpcode_Caches[opcode]) {
|
||||
_Py_CODEUNIT *counter = &next_instr[1];
|
||||
uint16_t *counter = &next_instr[1].cache;
|
||||
// The instruction is going to decrement the counter, so we need to
|
||||
// increment it here to make sure it doesn't try to specialize:
|
||||
if (!ADAPTIVE_COUNTER_IS_MAX(*counter)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue