}
if (i < (int)Py_ARRAY_LENGTH(derived_name_prefixes)) {
- Py_UCS4 v = parse_hex_code(name + prefixlen, namelen - prefixlen);
+ Py_UCS4 v = parse_hex_code(name + prefixlen, namelen - (int)prefixlen);
if (find_prefix_id(v) != i) {
return 0;
}
#define _PyExecutorObject_CAST(op) ((_PyExecutorObject *)(op))
+#ifndef Py_GIL_DISABLED
static bool
has_space_for_executor(PyCodeObject *code, _Py_CODEUNIT *instr)
{
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);
_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
// 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;
}
op(_GUARD_IP__PUSH_FRAME, (ip/4 --)) {
- stack_pointer = sym_set_stack_depth(this_instr->operand1, stack_pointer);
+ (void)ip;
+ stack_pointer = sym_set_stack_depth((int)this_instr->operand1, stack_pointer);
// TO DO
// Normal function calls to known functions
// do not need an IP guard.
}
op(_GUARD_IP_YIELD_VALUE, (ip/4 --)) {
+ (void)ip;
if (ctx->frame->caller) {
REPLACE_OP(this_instr, _NOP, 0, 0);
}
- stack_pointer = sym_set_stack_depth(this_instr->operand1, stack_pointer);
+ stack_pointer = sym_set_stack_depth((int)this_instr->operand1, stack_pointer);
}
op(_GUARD_IP_RETURN_VALUE, (ip/4 --)) {
+ (void)ip;
if (ctx->frame->caller) {
REPLACE_OP(this_instr, _NOP, 0, 0);
}
- stack_pointer = sym_set_stack_depth(this_instr->operand1, stack_pointer);
+ stack_pointer = sym_set_stack_depth((int)this_instr->operand1, stack_pointer);
}
op(_GUARD_IP_RETURN_GENERATOR, (ip/4 --)) {
+ (void)ip;
if (ctx->frame->caller) {
REPLACE_OP(this_instr, _NOP, 0, 0);
}
- stack_pointer = sym_set_stack_depth(this_instr->operand1, stack_pointer);
+ stack_pointer = sym_set_stack_depth((int)this_instr->operand1, stack_pointer);
}
case _GUARD_IP__PUSH_FRAME: {
PyObject *ip = (PyObject *)this_instr->operand0;
- stack_pointer = sym_set_stack_depth(this_instr->operand1, stack_pointer);
+ (void)ip;
+ stack_pointer = sym_set_stack_depth((int)this_instr->operand1, stack_pointer);
break;
}
case _GUARD_IP_YIELD_VALUE: {
PyObject *ip = (PyObject *)this_instr->operand0;
+ (void)ip;
if (ctx->frame->caller) {
REPLACE_OP(this_instr, _NOP, 0, 0);
}
- stack_pointer = sym_set_stack_depth(this_instr->operand1, stack_pointer);
+ stack_pointer = sym_set_stack_depth((int)this_instr->operand1, stack_pointer);
break;
}
case _GUARD_IP_RETURN_VALUE: {
PyObject *ip = (PyObject *)this_instr->operand0;
+ (void)ip;
if (ctx->frame->caller) {
REPLACE_OP(this_instr, _NOP, 0, 0);
}
- stack_pointer = sym_set_stack_depth(this_instr->operand1, stack_pointer);
+ stack_pointer = sym_set_stack_depth((int)this_instr->operand1, stack_pointer);
break;
}
case _GUARD_IP_RETURN_GENERATOR: {
PyObject *ip = (PyObject *)this_instr->operand0;
+ (void)ip;
if (ctx->frame->caller) {
REPLACE_OP(this_instr, _NOP, 0, 0);
}
- stack_pointer = sym_set_stack_depth(this_instr->operand1, stack_pointer);
+ stack_pointer = sym_set_stack_depth((int)this_instr->operand1, stack_pointer);
break;
}