diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 4b2db0617a0efd..2e7ffe207648d7 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -4074,7 +4074,7 @@ dummy_func( } op(_SETUP_TIER2_FRAME, (scratch_size/4 --)) { - DEOPT_IF(!_PyFrame_ConvertToTier2(tstate, frame, oparg, scratch_size) != 0); + DEOPT_IF(!_PyFrame_ConvertToTier2(tstate, frame, oparg, (int)(Py_ssize_t)scratch_size) != 0); } op(_INSERT, (unused[oparg], top -- top, unused[oparg])) { diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index a4ffbe9303696b..fee2b6b3d180c4 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -3591,7 +3591,7 @@ case _SETUP_TIER2_FRAME: { oparg = CURRENT_OPARG(); PyObject * scratch_size = (PyObject *)CURRENT_OPERAND(); - if (!_PyFrame_ConvertToTier2(tstate, frame, oparg, scratch_size) != 0) goto deoptimize; + if (!_PyFrame_ConvertToTier2(tstate, frame, oparg, (int)(Py_ssize_t)scratch_size) != 0) goto deoptimize; break; } diff --git a/Python/optimizer_analysis.c b/Python/optimizer_analysis.c index 63272742f68f86..b8db489c4dc625 100644 --- a/Python/optimizer_analysis.c +++ b/Python/optimizer_analysis.c @@ -1411,7 +1411,7 @@ compile_sym_to_uops(_Py_UOpsEmitter *emitter, // These are for unknown stack entries. if (_PyOpcode_isunknown(sym->inst.opcode)) { // Leave it be. These are initial values from the start - return; + return 0; } inst = sym->inst; inst.opcode = sym->inst.opcode == INIT_FAST ? LOAD_FAST : sym->inst.opcode; @@ -1660,7 +1660,7 @@ emit_uops_from_impure_store( len * sizeof(_PyUOpInstruction) ); - emitter->curr_i += len; + emitter->curr_i += (int)len; return 0; } @@ -1685,7 +1685,7 @@ emit_uops_from_stores( 0, 0, // Should not use more than 20% of the space for common expressions. - (writebuffer_end - trace_writebuffer) / 5, + (int)((writebuffer_end - trace_writebuffer) / 5), sym_store, // One wasted object, but it's fine I'd rather not use that to prevent logic bugs. (PyObject **)(writebuffer_end - 1),