Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Regen
  • Loading branch information
tomasr8 committed Apr 24, 2025
commit 2023556ad21e584efb5e9aeb10c2c838343c1a4b
2 changes: 1 addition & 1 deletion Include/internal/pycore_opcode_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

281 changes: 141 additions & 140 deletions Include/internal/pycore_uop_ids.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Include/internal/pycore_uop_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Lib/test/test_capi/test_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1898,7 +1898,7 @@ def testfunc(n):
for _ in range(n):
y = tuple((1, 2)) # tuple argument
a, _ = y # _UNPACK_SEQUENCE_TWO_TUPLE
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I needed to use UNPACK_SEQUENCE(_TWO)_TUPLE here since it is currently the only uop that propagates the tuple items to the result.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice observation. Seems like _BINARY_OP_SUBSCR_TUPLE_INT could be taught how to do this pretty easily for a constant RHS. Want to add that to your queue?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's already in the queue 😄

if a == 1: # _COMPARE_OP_INT + _GUARD_IS_TRUE_POP are removed
if a == 1: # _COMPARE_OP_INT + _GUARD_IS_TRUE_POP are removed
x += 1
return x

Expand Down
Loading