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 into
python: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 into
python:mainfrom
Sacul0457:Optimize_CALL_INTRINSIC_1

Conversation

@Sacul0457

@Sacul0457Sacul0457 commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

@Fidget-SpinnerFidget-Spinner left a comment

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.

Thanks

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

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.

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

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Deleted, thx

Comment threadPython/bytecodes.c Outdated
Comment on lines +1252 to +1256
v = value;
DEAD(value);
if (res_o == NULL) {
ERROR_NO_POP();
}

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.

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

@bedevere-app

Copy link
Copy Markdown

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
Copy Markdown
ContributorAuthor

I have made the requested changes; please review again

@bedevere-app

Copy link
Copy Markdown

Thanks for making the requested changes!

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

@markshannonmarkshannon left a comment

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.

Looks good, Thanks

@markshannon
markshannon merged commit 37121ef into python:mainMar 16, 2026
78 of 81 checks passed
@Sacul0457
Sacul0457 deleted the Optimize_CALL_INTRINSIC_1 branch March 19, 2026 13:22
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Sacul0457@corona10@markshannon@Fidget-Spinner@savannahostrowski