GH-116422: Modify a few uops so that they can be supported by tier 2 with hot/cold splitting - #116832
Conversation
There was a problem hiding this comment.
The reason this change is here is to make the guard tstate->c_recursion_remaining <= 0 instead of tstate->c_recursion_remaining <= 1. Comparing to zero is generally faster.
It also seems more correct. If c_recursion_remaining is 1, that suggest that there is 1 remaining call, not 0.
There was a problem hiding this comment.
The actual number we compare to doesn't really matter, as long as we are consistent.
There was a problem hiding this comment.
The idea is that after DEOPT we will end up doing GOTO_ERROR in the original bytecode? (Is that what the comment is saying?)
There was a problem hiding this comment.
The comment refers to our obligation to check the C recursion limit for almost all builtin function calls.
We can fulfil that obligation more cheaply this way.
…ier 2 with hot/cold splitting (pythonGH-116832)
…ier 2 with hot/cold splitting (pythonGH-116832)
…ier 2 with hot/cold splitting (pythonGH-116832)

This PR unifies the error handling of a few uops so that they either use only
EXIT_IFor onlyGOTO_ERROR.