Skip to content

gh-134584: Eliminate redundant refcounting from _CALL{_BUILTIN_O, _METHOD_DESCRIPTOR_O} - #143330

Merged
Fidget-Spinner merged 7 commits into
python:mainfrom
corona10:gh-134584-_CALL_METHOD_DESCRIPTOR_O
Jan 1, 2026
Merged

Fidget-Spinner merged 7 commits into
python:mainfrom
corona10:gh-134584-_CALL_METHOD_DESCRIPTOR_O

Conversation

@corona10

@corona10 corona10 commented Jan 1, 2026 •

Copy link
Copy Markdown
Member
@Fidget-Spinner

Copy link
Copy Markdown
Member

@corona10 you need to update optimizer_bytecodes.c as well to pass the values. That's why theres no optimization done here!

Comment thread Lib/test/test_capi/test_opt.py Outdated
self.assertIsNotNone(ex)
uops = get_opnames(ex)
self.assertIn("_CALL_METHOD_DESCRIPTOR_O", uops)
self.assertIn("_POP_TOP", uops)

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.

@Fidget-Spinner I do believe that we have to implement _CALL_METHOD_DESCRIPTOR_O at optimizer_bytecode.c But it should be for _CALL_BUILTIN_O too.

@corona10

corona10 commented Jan 1, 2026

Copy link
Copy Markdown
Member Author

@corona10 you need to update optimizer_bytecodes.c as well to pass the values. That's why theres no optimization done here!

Yeah, I left the comment at here #143330 (comment) :)

@corona10 corona10 changed the title gh-134584: Eliminate redundant refcounting from _CALL_METHOD_DESCRIPTOR_O Jan 1, 2026
@corona10
corona10 requested a review from tomasr8 as a code owner January 1, 2026 14:48
@corona10 corona10 changed the title [WIP] gh-134584: Eliminate redundant refcounting from _CALL_METHOD_DESCRIPTOR_O Jan 1, 2026
@corona10 corona10 changed the title gh-134584: Eliminate redundant refcounting from _CALL_METHOD_DESCRIPTOR_O Jan 1, 2026
@corona10 corona10 changed the title gh-134584: Eliminate redundant refcounting from _CALL{_BUILTIN_O, _METHOD_DESCRIPTOR_O} Jan 1, 2026
@corona10 corona10 changed the title [WIP] gh-134584: Eliminate redundant refcounting from _CALL{_BUILTIN_O, _METHOD_DESCRIPTOR_O} Jan 1, 2026
@Fidget-Spinner Fidget-Spinner added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Jan 1, 2026
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @Fidget-Spinner for commit 3e6fe60 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F143330%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Jan 1, 2026

@Fidget-Spinner Fidget-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.

This is fine, I will merge after refleak buildbots pass.

@Fidget-Spinner
Fidget-Spinner merged commit 1fb8e0e into python:main Jan 1, 2026
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
…O, _METHOD_DESCRIPTOR_O} (pythonGH-143330)

Co-authored-by: Ken Jin <kenjin4096@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants