gh-91625: Don't ignore extended args of adaptive opcodes - #91626
Merged
Conversation
sweeneyde
commented
Apr 17, 2022
sweeneyde
commented
Apr 17, 2022
Comment on lines
+1358
to
+1359
| assert(cframe.use_tracing == 0 || cframe.use_tracing == 255); \ | ||
| opcode |= cframe.use_tracing OR_DTRACE_LINE; \ |
Member
Author
There was a problem hiding this comment.
I think the tracing checks here should be removed. We should be able to finish executing the logical opcode (family) we started to execute before trying to respect cframe.use_tracing.
Do reviewers agree?
Member
Author
There was a problem hiding this comment.
The only time it could make a difference is if one of the _Py_Specialize_XxxXxxxx() calls somehow managed to set the flag.
markshannon
reviewed
Apr 17, 2022
markshannon
left a comment
Member
There was a problem hiding this comment.
Thanks for catching this.
The tests could be tidied up with a bit of code generation. Other than that, looks good.
| def __getattr__(self, attr): | ||
| return int(attr.lstrip("_")) | ||
| def number_attrs(Z): | ||
| return [ |
Member
There was a problem hiding this comment.
This looks ideal for generating. Maybe something like
attrs = ", ".join(f"Z._{n:03d}" for n in range(280))
code = f"def number_attrs(Z):\n return [ {attrs} ]"
exec(code...
| tests.addTest(doctest.DocTestSuite()) | ||
| return tests | ||
|
|
||
| def unpack_400(x): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#91625