GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-148211: decompose `_INSERT_1_LOAD_CONST_INLINE(_BORROW)` in JIT by NekoAsakura · Pull Request #148283 · python/cpython

Conversation

@NekoAsakura

@NekoAsakura NekoAsakura commented Apr 9, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: Refactor the JIT uops #148211

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@NekoAsakura
pythongh-148211: decompose _INSERT_1_LOAD_CONST_INLINE(_BORROW) in JIT
c8521ad
@NekoAsakura
NekoAsakura requested review from Fidget-Spinner, markshannon, savannahostrowski and tomasr8 as code owners April 9, 2026 07:50
@bedevere-app bedevere-app Bot added the awaiting review label Apr 9, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Apr 9, 2026
Refactor the JIT uops #148211
Closed
NekoAsakura added 2 commits April 9, 2026 04:16
@NekoAsakura
Merge branch 'main' into pythongh-148211/decompose-insert-1
fbf9c07
@NekoAsakura
Merge branch 'main' into pythongh-148211/decompose-insert-1
35e789c
@Fidget-Spinner

Fidget-Spinner commented Apr 9, 2026

Copy link
Copy Markdown
Member

It seems this does not build?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@NekoAsakura

NekoAsakura commented Apr 9, 2026

Copy link
Copy Markdown
Member Author

Think I've messed up the merge a bit, I'll get it sorted.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@NekoAsakura
pythongh-148211: decompose _INSERT_1_LOAD_CONST_INLINE(_BORROW) in JIT
edb4004
@Fidget-Spinner Fidget-Spinner added the skip news label Apr 9, 2026
@NekoAsakura

NekoAsakura commented Apr 9, 2026

Copy link
Copy Markdown
Member Author

That should be it. Tests failed with HTTP 504, I'll update branch and give it another go.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@NekoAsakura
Merge branch 'main' into pythongh-148211/decompose-insert-1
b94db0b
@Fidget-Spinner

Fidget-Spinner commented Apr 9, 2026

Copy link
Copy Markdown
Member

Just so you know, JIT development has been very active recently (thanks to you and other contributors!). So i'm going to merge this PR after merging #144963

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fidget-Spinner

Fidget-Spinner commented Apr 9, 2026

Copy link
Copy Markdown
Member

That means you'll probably have to merge in main again after that, thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@NekoAsakura

NekoAsakura commented Apr 9, 2026

Copy link
Copy Markdown
Member Author

It's great to see so much activity on JIT lately. Wouldn't have been possible without the reviews from you and other core devs. Cheers🥂 Happy to rebase once that's in.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

markshannon
markshannon requested changes Apr 9, 2026
View reviewed changes

@markshannon markshannon left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

It looks like every call to optimize_to_bool now passes _LOAD_CONST_INLINE_BORROW as its load_op argument.
So, drop that argument.

Likewise for the op arguments to lookup_attr, so it only needs the prefix and suffix arguments.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

NekoAsakura reacted with heart emoji
All reactions
  • ❤️ 1 reaction
Comment thread Python/optimizer_bytecodes.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Python/optimizer_analysis.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting review label Apr 9, 2026
@bedevere-app

bedevere-app Bot commented Apr 9, 2026

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added the awaiting changes label Apr 9, 2026
NekoAsakura added 2 commits April 9, 2026 10:20
@NekoAsakura
pythongh-148211: decompose _INSERT_1_LOAD_CONST_INLINE(_BORROW) in JIT
1e94a6c
@NekoAsakura
Merge branch 'main' into pythongh-148211/decompose-insert-1
c2f3044
markshannon
markshannon reviewed Apr 9, 2026
View reviewed changes

@markshannon markshannon left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks good.
One small suggestion.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/test_capi/test_opt.py Outdated
self.assertNotIn("_LOAD_ATTR_METHOD_NO_DICT", uops)
self.assertNotIn("_INSERT_1_LOAD_CONST_INLINE", uops)
self.assertIn("_INSERT_1_LOAD_CONST_INLINE_BORROW", uops)
self.assertNotIn("_INSERT_1_LOAD_CONST_INLINE_BORROW", uops)

@markshannon markshannon Apr 9, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Can you remove this line and the one above.
There is no point in asserting that a non-existent uop isn't present.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@NekoAsakura NekoAsakura Apr 9, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

You're right, bit of a brainfart when I wrote that.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@NekoAsakura
pythongh-148211: decompose _INSERT_1_LOAD_CONST_INLINE(_BORROW) in JIT
d294abd
@Fidget-Spinner

Fidget-Spinner commented Apr 9, 2026

Copy link
Copy Markdown
Member

You need to regen files after pulling in main.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@NekoAsakura
pythongh-148211: decompose _INSERT_1_LOAD_CONST_INLINE(_BORROW) in JIT
963598f
@NekoAsakura

NekoAsakura commented Apr 9, 2026

Copy link
Copy Markdown
Member Author

Oops, thanks for the remind.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Fidget-Spinner
Fidget-Spinner approved these changes Apr 9, 2026
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting changes labels Apr 9, 2026
@Fidget-Spinner

Fidget-Spinner commented Apr 9, 2026

Copy link
Copy Markdown
Member

@markshannon I'm gonna assume that based off your last comment, this PR is fine to merge now. I think it looks good to me.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fidget-Spinner
Fidget-Spinner merged commit 0f49232 into python:main Apr 9, 2026
86 of 87 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Apr 9, 2026
@Fidget-Spinner

Fidget-Spinner commented Apr 9, 2026

Copy link
Copy Markdown
Member

@NekoAsakura all the _POP_CALL_X_LOAD_CONST_INLINE_BORROW look like an easy win (just POP_TOP, POP_TOP, LOAD_CONST_INLINE_X). Could you work on those next please. Thank you so much!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@NekoAsakura
NekoAsakura deleted the gh-148211/decompose-insert-1 branch April 9, 2026 16:47
@NekoAsakura

NekoAsakura commented Apr 9, 2026

Copy link
Copy Markdown
Member Author

@NekoAsakura all the _POP_CALL_X_LOAD_CONST_INLINE_BORROW look like an easy win (just POP_TOP, POP_TOP, LOAD_CONST_INLINE_X). Could you work on those next please. Thank you so much!

Sure, I was going to leave them open in case anyone fancied having a go, but if nobody's picked them up I'm happy to crack on with it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@NekoAsakura @ljfp
pythongh-148211: decompose _INSERT_1_LOAD_CONST_INLINE(_BORROW) in …
79174f9
…JIT (pythonGH-148283)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@markshannon markshannon markshannon requested changes
@Fidget-Spinner Fidget-Spinner Fidget-Spinner approved these changes
@tomasr8 tomasr8 Awaiting requested review from tomasr8 tomasr8 is a code owner
@savannahostrowski savannahostrowski Awaiting requested review from savannahostrowski

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@NekoAsakura @Fidget-Spinner @markshannon
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.