Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dis.py hard-codes that ENTER_EXECUTOR is a backwards jump (it isn't always) #116972

Closed
gvanrossum opened this issue Mar 18, 2024 · 2 comments
Closed
Assignees

Comments

@gvanrossum
Copy link
Member

Since we introduced side exits, ENTER_EXECUTOR doesn't always overwrite a JUMP_BACKWARD opcode -- it may overwrite any other opcode too. This requires changes to the logic of ENTER_EXECUTOR.

CC: @iritkatriel

@gvanrossum
Copy link
Member Author

Also, the oparg for ENTER_EXECUTOR is printed as the original oparg, whereas it is typically a different value (the index in the code object's array of executors). E.g. in a function with just one executor I'd expect to see

    ENTER_EXECUTOR    0

but actually I see e.g.

    ENTER_EXECUTOR    13

where 13 is the oparg of the JUMP_BACKWARD it has overwritten.

@iritkatriel iritkatriel self-assigned this Mar 22, 2024
@iritkatriel
Copy link
Member

Duplicate of #112383.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants