-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
gh-143414: Implement unique reference tracking for JIT, optimize unpacking of such tuples #144300
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
Changes from 1 commit
e4b7f51
b32a8e2
7aeac0e
f8b7e4e
37d7c4b
7df2176
6f66c56
b251825
bcd5654
acfa737
a0fd9e2
645776a
cdb4a05
275732b
dbde059
bd70ebd
d16f298
bec7ee3
5c9b9c6
cdbe2e6
fb1d227
c7e53fb
6851962
8c8e0a9
a6fffdc
78978aa
0b07ac4
14e5d3d
8506038
d67617f
100eeb5
e476061
06a9ec1
6bce6b4
89dc467
4e6c792
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -30,7 +30,7 @@ | |||||||
| #include "pycore_sliceobject.h" // _PyBuildSlice_ConsumeRefs | ||||||||
| #include "pycore_stackref.h" | ||||||||
| #include "pycore_template.h" // _PyTemplate_Build() | ||||||||
| #include "pycore_tuple.h" // _PyTuple_ExactDealloc(), _PyTuple_ITEMS() | ||||||||
| #include "pycore_tuple.h" // _PyTuple_EmptyExactDealloc(), _PyTuple_ITEMS() | ||||||||
| #include "pycore_typeobject.h" // _PySuper_Lookup() | ||||||||
|
|
||||||||
| #include "pycore_dict.h" | ||||||||
|
|
@@ -1682,7 +1682,7 @@ dummy_func( | |||||||
| *values++ = PyStackRef_FromPyObjectSteal(items[i]); | ||||||||
| items[i] = NULL; | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we free the tuple directly, we don't need to |
||||||||
| } | ||||||||
| PyStackRef_CLOSE_SPECIALIZED(seq, _PyTuple_ExactDealloc); | ||||||||
| PyStackRef_CLOSE_SPECIALIZED(seq, _PyTuple_EmptyExactDealloc); | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| } | ||||||||
|
|
||||||||
| macro(UNPACK_SEQUENCE_LIST) = | ||||||||
|
|
||||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Rather than a deallocing the tuple, we just need to free it.
Something like
_PyTuple_Free.Just assert that
Py_SIZE(op) != 0and free the tuple.