mirror of
https://github.com/python/cpython.git
synced 2026-02-25 08:31:19 +00:00
Fix warnings on main (GH-145104)
This commit is contained in:
parent
faea32b729
commit
5944a539b9
4 changed files with 20 additions and 10 deletions
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
#define _PyExecutorObject_CAST(op) ((_PyExecutorObject *)(op))
|
||||
|
||||
#ifndef Py_GIL_DISABLED
|
||||
static bool
|
||||
has_space_for_executor(PyCodeObject *code, _Py_CODEUNIT *instr)
|
||||
{
|
||||
|
|
@ -110,6 +111,7 @@ insert_executor(PyCodeObject *code, _Py_CODEUNIT *instr, int index, _PyExecutorO
|
|||
instr->op.code = ENTER_EXECUTOR;
|
||||
instr->op.arg = index;
|
||||
}
|
||||
#endif // Py_GIL_DISABLED
|
||||
|
||||
static _PyExecutorObject *
|
||||
make_executor_from_uops(_PyThreadStateImpl *tstate, _PyUOpInstruction *buffer, int length, const _PyBloomFilter *dependencies);
|
||||
|
|
@ -128,7 +130,6 @@ _PyOptimizer_Optimize(
|
|||
_PyInterpreterFrame *frame, PyThreadState *tstate)
|
||||
{
|
||||
_PyThreadStateImpl *_tstate = (_PyThreadStateImpl *)tstate;
|
||||
int chain_depth = _tstate->jit_tracer_state->initial_state.chain_depth;
|
||||
PyInterpreterState *interp = _PyInterpreterState_GET();
|
||||
if (!interp->jit) {
|
||||
// gh-140936: It is possible that interp->jit will become false during
|
||||
|
|
@ -152,6 +153,7 @@ _PyOptimizer_Optimize(
|
|||
// make progress in order to avoid infinite loops or excessively-long
|
||||
// side-exit chains. We can only insert the executor into the bytecode if
|
||||
// this is true, since a deopt won't infinitely re-enter the executor:
|
||||
int chain_depth = _tstate->jit_tracer_state->initial_state.chain_depth;
|
||||
chain_depth %= MAX_CHAIN_DEPTH;
|
||||
bool progress_needed = chain_depth == 0;
|
||||
PyCodeObject *code = (PyCodeObject *)_tstate->jit_tracer_state->initial_state.code;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue