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

gh-134584: Eliminate redundant refcounting from _CALL{_BUILTIN_O, _METHOD_DESCRIPTOR_O}#143330
Fidget-Spinner merged 7 commits into
python:mainfrom
corona10:gh-134584-_CALL_METHOD_DESCRIPTOR_O

Conversation

@corona10

@corona10corona10 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 threadLib/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
MemberAuthor

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

Copy link
Copy Markdown
MemberAuthor

@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) :)

@corona10corona10 changed the title gh-134584: Eliminate redundant refcounting from _CALL_METHOD_DESCRIPTOR_O[WIP] gh-134584: Eliminate redundant refcounting from _CALL_METHOD_DESCRIPTOR_OJan 1, 2026
@corona10
corona10 requested a review from tomasr8 as a code ownerJanuary 1, 2026 14:48
@corona10corona10 changed the title [WIP] gh-134584: Eliminate redundant refcounting from _CALL_METHOD_DESCRIPTOR_Ogh-134584: Eliminate redundant refcounting from _CALL_METHOD_DESCRIPTOR_OJan 1, 2026
@corona10corona10 changed the title gh-134584: Eliminate redundant refcounting from _CALL_METHOD_DESCRIPTOR_Ogh-134584: Eliminate redundant refcounting from _CALL{_BUILTIN_O, _METHOD_DESCRIPTOR_O}Jan 1, 2026
@corona10corona10 changed the title gh-134584: Eliminate redundant refcounting from _CALL{_BUILTIN_O, _METHOD_DESCRIPTOR_O}[WIP] gh-134584: Eliminate redundant refcounting from _CALL{_BUILTIN_O, _METHOD_DESCRIPTOR_O}Jan 1, 2026
@corona10corona10 changed the title [WIP] gh-134584: Eliminate redundant refcounting from _CALL{_BUILTIN_O, _METHOD_DESCRIPTOR_O}gh-134584: Eliminate redundant refcounting from _CALL{_BUILTIN_O, _METHOD_DESCRIPTOR_O}Jan 1, 2026
@Fidget-SpinnerFidget-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-botbedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Jan 1, 2026

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

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

@Fidget-Spinner
Fidget-Spinner merged commit 1fb8e0e into python:mainJan 1, 2026
82 of 84 checks passed
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 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.

3 participants

@corona10@Fidget-Spinner@bedevere-bot