-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
GH-112383: Fix test_loop_quicken
when an executor is installed
#113153
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
GH-112383: Fix test_loop_quicken
when an executor is installed
#113153
Conversation
I think ultimately we want this to work. Can we adjust the expected value instead of disabling so that we won't forget to reverse the change once it's fixed? |
test_loop_quicken
an executor is installedtest_loop_quicken
when an executor is installed
Good idea. I've updated the comment, too. |
"ENTER_EXECUTOR 16", | ||
"JUMP_BACKWARD 16 (to L1)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really need an API on executor objects so you can access the vm_data
field. We the API to get the executors should be an (unstable) method on PyCodeObject
, not a function in _testinternalcapi
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need it though? Given the code object, we can always recover the original opcode and oparg using co_code
(instead of _co_code_adaptive
, which gives us the executor and index).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that works too. I guess my main point was that we shouldn't blindly assume ENTER_EXECUTOR
sits on top of JUMP_BACKWARD
. Although that is currently the case (and will still be so if/when my side-exits PR lands).
test.test_dis.DisWithFileTests.test_loop_quicken
fails when tier two is enabled, since theENTER_EXECUTOR
instruction isn't handled correctly:Instead of the current approach of trying to "fix" the test output in the presence of
ENTER_EXECUTOR
, just skip the test.