Skip to content

gh-145866: Eliminate redundant refcounting from _CALL_INTRINSIC_2#146262

Open
KevinH15291 wants to merge 1 commit intopython:mainfrom
KevinH15291:gh-145866-call_intrinsic_2
Open

gh-145866: Eliminate redundant refcounting from _CALL_INTRINSIC_2#146262
KevinH15291 wants to merge 1 commit intopython:mainfrom
KevinH15291:gh-145866-call_intrinsic_2

Conversation

@KevinH15291
Copy link

@KevinH15291 KevinH15291 commented Mar 21, 2026

@python-cla-bot
Copy link

python-cla-bot bot commented Mar 21, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Mar 21, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@KevinH15291
Copy link
Author

This is my first CPython PR and I'm not very experienced. This PR largely just copies the style of the other PRs in #145866 and #134584, mainly #145964.

I'm not sure if

self.assertLessEqual(count_ops(ex, "_POP_TOP"), 4)

in my test is completely correct, as well as my testfunc

def testfunc(n):
    x = 0
    for _ in range(n):
        def test_testfunc[T](n):
            pass
    return x

I'm also not 100% sure if regenerated the opcode metadata stuff correctly. Otherwise I believe the PR should be good.

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.

1 participant