[_BINARY_OP_SUBTRACT_FLOAT] = _BINARY_OP_SUBTRACT_FLOAT__NO_DECREF_INPUTS,
};
-/* 1 for success, 0 for not ready, cannot error at the moment. */
+/* >0 (length) for success, 0 for not ready, clears all possible errors. */
static int
optimize_uops(
PyCodeObject *co,
_PyBloomFilter *dependencies
)
{
+ assert(!PyErr_Occurred());
JitOptContext context;
JitOptContext *ctx = &context;
OPT_ERROR_IN_OPCODE(opcode);
}
_Py_uop_abstractcontext_fini(ctx);
- return -1;
+
+ assert(PyErr_Occurred());
+ PyErr_Clear();
+
+ return 0;
}
_PyFrame_GetCode(frame), buffer,
length, curr_stacklen, dependencies);
- if (length <= 0) {
+ if (length == 0) {
return length;
}
+ assert(length > 0);
+
length = remove_unneeded_uops(buffer, length);
assert(length > 0);