}
static inline void
-unspecialize(_Py_CODEUNIT *instr, int reason)
+unspecialize(_Py_CODEUNIT *instr)
{
assert(!PyErr_Occurred());
uint8_t opcode = FT_ATOMIC_LOAD_UINT8_RELAXED(instr->op.code);
SPECIALIZATION_FAIL(generic_opcode, SPEC_FAIL_OTHER);
return;
}
- SPECIALIZATION_FAIL(generic_opcode, reason);
_Py_BackoffCounter *counter = (_Py_BackoffCounter *)instr + 1;
_Py_BackoffCounter cur = load_counter(counter);
set_counter(counter, adaptive_counter_backoff(cur));
}
}
+#ifdef Py_STATS
static int
binary_op_fail_kind(int oparg, PyObject *lhs, PyObject *rhs)
{
}
Py_UNREACHABLE();
}
+#endif
void
_Py_Specialize_BinaryOp(_PyStackRef lhs_st, _PyStackRef rhs_st, _Py_CODEUNIT *instr,
}
break;
}
- unspecialize(instr, binary_op_fail_kind(oparg, lhs, rhs));
+ SPECIALIZATION_FAIL(BINARY_OP, binary_op_fail_kind(oparg, lhs, rhs));
+ unspecialize(instr);
}
cache->counter = adaptive_counter_cooldown();
}
+#ifdef Py_STATS
static int
containsop_fail_kind(PyObject *value) {
if (PyUnicode_CheckExact(value)) {
}
return SPEC_FAIL_OTHER;
}
+#endif
void
_Py_Specialize_ContainsOp(_PyStackRef value_st, _Py_CODEUNIT *instr)
return;
}
- unspecialize(instr, containsop_fail_kind(value));
+ SPECIALIZATION_FAIL(CONTAINS_OP, containsop_fail_kind(value));
+ unspecialize(instr);
return;
}