GH-112383: Fix test_loop_quicken when an executor is installed#113153
GH-112383: Fix test_loop_quicken when an executor is installed#113153brandtbucher merged 3 commits intopython:mainfrom
test_loop_quicken when an executor is installed#113153Conversation
|
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.
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.
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.
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_quickenfails when tier two is enabled, since theENTER_EXECUTORinstruction 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.