jit_error("unable to flush instruction cache");
return -1;
}
- int old;
+ DWORD old;
int failed = !VirtualProtect(memory, size, PAGE_EXECUTE_READ, &old);
#else
__builtin___clear_cache((char *)memory, (char *)memory + size);
tracer->initial_state.func = (PyFunctionObject *)Py_NewRef(func);
tracer->initial_state.executor = (_PyExecutorObject *)Py_XNewRef(current_executor);
tracer->initial_state.exit = exit;
- tracer->initial_state.stack_depth = stack_pointer - _PyFrame_Stackbase(frame);
+ tracer->initial_state.stack_depth = (int)(stack_pointer - _PyFrame_Stackbase(frame));
tracer->initial_state.chain_depth = chain_depth;
tracer->prev_state.dependencies_still_valid = true;
tracer->prev_state.instr_code = (PyCodeObject *)Py_NewRef(_PyFrame_GetCode(frame));
write++;
depth = _PyUop_Caching[uop].entries[depth].output;
}
- return write - output;
+ return (int)(write - output);
}
static int
assert(inst->format == UOP_FORMAT_JUMP);
_PyUOpInstruction const *exit_inst = &executor->trace[inst->jump_target];
uint16_t base_exit_opcode = _PyUop_Uncached[exit_inst->opcode];
+ (void)base_exit_opcode;
assert(base_exit_opcode == _EXIT_TRACE || base_exit_opcode == _DYNAMIC_EXIT);
exit = (_PyExitData *)exit_inst->operand0;
}
uintptr_t true_bits = (uintptr_t)&_Py_TrueStruct;
#endif
for (int i = 4; i < 8; i++) {
- if ((true_bits ^ false_bits) & (1 << i)) {
+ if ((true_bits ^ false_bits) & (uintptr_t)(1 << i)) {
return i;
}
}
#else
uintptr_t true_bits = (uintptr_t)&_Py_TrueStruct;
#endif
- assert((true_bits ^ ((uintptr_t)&_Py_FalseStruct)) & (1 << bit));
- return true_bits & (1 << bit);
+ assert((true_bits ^ ((uintptr_t)&_Py_FalseStruct)) & (uintptr_t)(1 << bit));
+ return true_bits & (uintptr_t)(1 << bit);
}
#ifdef Py_DEBUG
stack_pointer = ctx->frame->stack_pointer;
}
- DUMP_UOP(ctx, "abs", this_instr - trace, this_instr, stack_pointer);
+ DUMP_UOP(ctx, "abs", (int)(this_instr - trace), this_instr, stack_pointer);
_PyUOpInstruction *out_ptr = ctx->out_buffer.next;
}
op(_STORE_ATTR_INSTANCE_VALUE, (offset/1, value, owner -- o)) {
+ (void)offset;
(void)value;
o = owner;
}
op(_STORE_ATTR_WITH_HINT, (hint/1, value, owner -- o)) {
+ (void)hint;
(void)value;
o = owner;
}
r = right;
}
- op(_BINARY_OP_EXTEND, (left, right -- res, l, r)) {
+ op(_BINARY_OP_EXTEND, (descr/4, left, right -- res, l, r)) {
+ (void)descr;
res = sym_new_not_null(ctx);
l = left;
r = right;
assert(PyLong_CheckExact(sym_get_const(ctx, sub_st)));
long index = PyLong_AsLong(sym_get_const(ctx, sub_st));
assert(index >= 0);
- int tuple_length = sym_tuple_length(tuple_st);
+ Py_ssize_t tuple_length = sym_tuple_length(tuple_st);
if (tuple_length != -1 && index < tuple_length) {
ADD_OP(_NOP, 0, 0);
}
ctx->done = true;
break;
}
- int returning_stacklevel = this_instr->operand1;
+ int returning_stacklevel = (int)this_instr->operand1;
if (ctx->curr_frame_depth >= 2) {
PyCodeObject *expected_code = ctx->frames[ctx->curr_frame_depth - 2].code;
if (expected_code == returning_code) {
break;
}
_Py_BloomFilter_Add(dependencies, returning_code);
- int returning_stacklevel = this_instr->operand1;
+ int returning_stacklevel = (int)this_instr->operand1;
if (frame_pop(ctx, returning_code, returning_stacklevel)) {
break;
}
break;
}
_Py_BloomFilter_Add(dependencies, returning_code);
- int returning_stacklevel = this_instr->operand1;
+ int returning_stacklevel = (int)this_instr->operand1;
if (frame_pop(ctx, returning_code, returning_stacklevel)) {
break;
}
right = stack_pointer[-1];
left = stack_pointer[-2];
PyObject *descr = (PyObject *)this_instr->operand0;
+ (void)descr;
res = sym_new_not_null(ctx);
l = left;
r = right;
assert(PyLong_CheckExact(sym_get_const(ctx, sub_st)));
long index = PyLong_AsLong(sym_get_const(ctx, sub_st));
assert(index >= 0);
- int tuple_length = sym_tuple_length(tuple_st);
+ Py_ssize_t tuple_length = sym_tuple_length(tuple_st);
if (tuple_length != -1 && index < tuple_length) {
ADD_OP(_NOP, 0, 0);
}
ctx->done = true;
break;
}
- int returning_stacklevel = this_instr->operand1;
+ int returning_stacklevel = (int)this_instr->operand1;
if (ctx->curr_frame_depth >= 2) {
PyCodeObject *expected_code = ctx->frames[ctx->curr_frame_depth - 2].code;
if (expected_code == returning_code) {
break;
}
_Py_BloomFilter_Add(dependencies, returning_code);
- int returning_stacklevel = this_instr->operand1;
+ int returning_stacklevel = (int)this_instr->operand1;
if (frame_pop(ctx, returning_code, returning_stacklevel)) {
break;
}
owner = stack_pointer[-1];
value = stack_pointer[-2];
uint16_t offset = (uint16_t)this_instr->operand0;
+ (void)offset;
(void)value;
o = owner;
CHECK_STACK_BOUNDS(-1);
owner = stack_pointer[-1];
value = stack_pointer[-2];
uint16_t hint = (uint16_t)this_instr->operand0;
+ (void)hint;
(void)value;
o = owner;
CHECK_STACK_BOUNDS(-1);
break;
}
_Py_BloomFilter_Add(dependencies, returning_code);
- int returning_stacklevel = this_instr->operand1;
+ int returning_stacklevel = (int)this_instr->operand1;
if (frame_pop(ctx, returning_code, returning_stacklevel)) {
break;
}