Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.2k
Open
Description
In the specializing adatpive interpreter,DEOPT_IFs andEXIT_IFs are synonymous, so we have historically been quite haphazard about which to use.
In the JIT, however, there is an important difference: aDEOPT_IF drops execution back into the interpreter unconditionally, whereas anEXIT_IF causes a side-exit which can warm up and also be jitted.
In some cases, like in aCALL or aSEND, theDEOPT_IF prevents the code from being ever being jitted after the exit. See#145047 for an explanation.
There are currently 109DEOPT_IFs in bytecodes.c. Many of those should beEXIT_IFs.
Specifically,DEOPT_IFs should be converted toEXIT_IFs if they are:
- In a guard (e.g.
_GUARD_CALLABLE_STR_1) - In the guard part of a more complex uop (e.g.
_CHECK_AND_ALLOCATE_OBJECT)
DEOPT_IFs should be left alone if any of these are true:
- It is in teir1-only code
- It is an error, and we are exiting to let the interpeter handle the error
- The interpreter needs to handle something before continuing in jitted code (e.g the eval breaker)
- An optimization is no longer valid and re-specialization/jitting needs to happen