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
Summary:
Currently for allocating a generator frame we use `PyThreadState_GET` to acquire the thread state in our runtime helper and then return it to the JITed function and then we pull the current frame from the thread state.
But for any non-BOLTed build we're going to be able to acquire the thread state faster in JITed code through our runtime resolved address. Freeing up the return value also let's us get rid of the dependent loads to get the frame object. Overall that's less instructions as well. We end up saving 3 instructions but 1 of those is due to an inefficiency in `adr` and the other is due to a register allocator change.
We could just pass 5 arguments into this function but that'll complicate the call on Windows so we shuffle the resume entry point into the code runtime which we're already reading anyway.
Reviewed By: alexmalyshev
Differential Revision: D114815510
fbshipit-source-id: 309cb32eb8e8d95a3e48e86869b7b4c158d81fb8
0 commit comments