out_of_space:
DPRINTF(3, "\n");
DPRINTF(1, "Out of space in abstract interpreter\n");
- _Py_uop_abstractcontext_fini(ctx);
- return 0;
-
+ goto done;
error:
DPRINTF(3, "\n");
DPRINTF(1, "Encountered error in abstract interpreter\n");
_Py_uop_abstractcontext_fini(ctx);
- return 0;
+ return -1;
hit_bottom:
// Attempted to push a "bottom" (contradition) symbol onto the stack.
// This means that the abstract interpreter has hit unreachable code.
- // We *could* generate an _EXIT_TRACE or _FATAL_ERROR here, but it's
- // simpler to just admit failure and not create the executor.
+ // We *could* generate an _EXIT_TRACE or _FATAL_ERROR here, but hitting
+ // bottom indicates type instability, so we are probably better off
+ // retrying later.
DPRINTF(3, "\n");
DPRINTF(1, "Hit bottom in abstract interpreter\n");
_Py_uop_abstractcontext_fini(ctx);
return 0;
+done:
+ /* Cannot optimize further, but there would be no benefit
+ * in retrying later */
+ _Py_uop_abstractcontext_fini(ctx);
+ return 1;
}
PyFunctionObject *func = (PyFunctionObject *)(this_instr + 2)->operand;
DPRINTF(3, "func: %p ", func);
if (func == NULL) {
- goto error;
+ DPRINTF(3, "\n");
+ DPRINTF(1, "Missing function\n");
+ goto done;
}
PyCodeObject *co = (PyCodeObject *)func->func_code;
PyFunctionObject *func = (PyFunctionObject *)(this_instr + 2)->operand;
DPRINTF(3, "func: %p ", func);
if (func == NULL) {
- goto error;
+ DPRINTF(3, "\n");
+ DPRINTF(1, "Missing function\n");
+ goto done;
}
PyCodeObject *co = (PyCodeObject *)func->func_code;
assert(self_or_null != NULL);