Skip to content

gh-145866: Convert CALL_INTRINSIC_1 to leave its inputs on the stack to be cleaned up by _POP_TOP.#145964

Merged
markshannon merged 4 commits intopython:mainfrom
Sacul0457:Optimize_CALL_INTRINSIC_1
Mar 16, 2026
Merged

gh-145866: Convert CALL_INTRINSIC_1 to leave its inputs on the stack to be cleaned up by _POP_TOP.#145964
markshannon merged 4 commits intopython:mainfrom
Sacul0457:Optimize_CALL_INTRINSIC_1

Conversation

@Sacul0457
Copy link
Contributor

@Sacul0457 Sacul0457 commented Mar 15, 2026

Copy link
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

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

Thanks

@@ -0,0 +1 @@
Convert ``CALL_INTRINSIC_1`` to leave its inputs on the stack to be cleaned up by ``_POP_TOP``.
Copy link
Member

Choose a reason for hiding this comment

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

nit: NEWS.d is not needed until this is affected to end-users.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deleted, thx

Comment on lines +1252 to +1256
v = value;
DEAD(value);
if (res_o == NULL) {
ERROR_NO_POP();
}
Copy link
Member

Choose a reason for hiding this comment

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

Sorry I made a mistake, I think v should only transfer ownership after the error branch.

@bedevere-app
Copy link

bedevere-app bot commented Mar 15, 2026

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@Sacul0457
Copy link
Contributor Author

I have made the requested changes; please review again

@bedevere-app
Copy link

bedevere-app bot commented Mar 15, 2026

Thanks for making the requested changes!

@Fidget-Spinner: please review the changes made to this pull request.

@bedevere-app bedevere-app bot requested a review from Fidget-Spinner March 15, 2026 14:07
Copy link
Member

@markshannon markshannon left a comment

Choose a reason for hiding this comment

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

Looks good, Thanks

@markshannon markshannon merged commit 37121ef into python:main Mar 16, 2026
78 of 81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants