Skip to content

Conversation

@iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Nov 24, 2023

With this ./python.exe -Xuops -m test -v test_dis passes.

@iritkatriel iritkatriel added type-bug An unexpected behavior, bug, or error skip news interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Nov 24, 2023
caches = _get_cache_size(_all_opname[deop])
argval += 2 * caches
if deop == ENTER_EXECUTOR:
argval += 2
Copy link
Member Author

@iritkatriel iritkatriel Nov 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if we didn't need to special case this here, but that would require a change in the oparg (and implementation) of ENTER_EXECUTOR, and I figured this PR should just fix the bug in dis.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this must be the cache of the underlying JUMP_BACKWARD. I think there currently is no way to get that. Not even via _testinternalcapi.

we should file an issue about that, it will get worse once we start putting executors on other ops.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created an issue here: #112383

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

caches = _get_cache_size(_all_opname[deop])
argval += 2 * caches
if deop == ENTER_EXECUTOR:
argval += 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this must be the cache of the underlying JUMP_BACKWARD. I think there currently is no way to get that. Not even via _testinternalcapi.

we should file an issue about that, it will get worse once we start putting executors on other ops.

@iritkatriel iritkatriel merged commit 9eb3b35 into python:main Nov 24, 2023
@iritkatriel iritkatriel deleted the dis-ENTER_EXECUTOR branch November 28, 2023 12:45
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

interpreter-core (Objects, Python, Grammar, and Parser dirs) skip news type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants