You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we go through a two stage process to get to the adaptive form of instructions.
The explanation below uses CALL, but it applies to all specializable instructions.
When unmarshaling the code object we create the bytecode CALL, oparg, 0, 0, 0 ... where the zeros are the cache.
When executing, check a counter and quicken when that counter reaches zero.
When quickening, replace all CALLs with CALL_ADAPTIVEs.
Instead we should quicken when unmarshaling, so that we create:
(CALL_ADAPTIVE oparg)
7 # uint16_t not byte pair
...
instead of
(CALL oparg)
(0 0)
The marshaled form only needs one byte for instructions without an oparg and two for other instructions. No space is needed for the cache.