gh-138679: Opcodes which consume no inputs should indicate they produced the val…#138678
Merged
Conversation
iritkatriel
reviewed
Sep 8, 2025
| int net_pushed = num_pushed - num_popped; | ||
| assert(net_pushed >= 0); | ||
| for (int i = 0; i < net_pushed; i++) { | ||
| for (int j = 0; j < net_pushed; j++) { |
1ab12da to
31810d5
Compare
mpage
reviewed
Sep 8, 2025
| self.assertNotInBytecode(f, "LOAD_FAST_CHECK") | ||
|
|
||
| def test_import_from_doesnt_clobber_load_fast_borrow(self): | ||
| import dis |
31810d5 to
843b24c
Compare
…ue, not an arbitrary local
843b24c to
b7b35d4
Compare
lkollar
pushed a commit
to lkollar/cpython
that referenced
this pull request
Sep 9, 2025
… produced the val… (python#138678) Opcodes which consume no inputs should indicate they produced the value, not an arbitrary local
facebook-github-bot
pushed a commit
to facebookincubator/cinder
that referenced
this pull request
Sep 9, 2025
Summary: Fixing another issue in the borrowed load analysis: python/cpython#138678 Reviewed By: mpage Differential Revision: D81950973 fbshipit-source-id: f6663befbcc36b159cbb03a20354d4452e1e47f8
facebook-github-bot
pushed a commit
to facebookincubator/cinderx
that referenced
this pull request
Sep 10, 2025
Summary: There's one thing the AI got wrong - the check to see if we're doing a load super attr isn't quite right There's also an issue in the upstream analysis - the adding of refs for instructions which only produce things is adding a ref associated with the incorrect instruction. It shouldn't be the iteration for the number of pushed values, it should be for the current instruction. This will be fixed upstream with python/cpython#138678 and backported to 3.14 with D81950973. Reviewed By: mpage Differential Revision: D81642077 fbshipit-source-id: 4c8fe7f33fe38fb23c1cbf83074649f272898f71
colesbury
added a commit
to colesbury/cpython
that referenced
this pull request
Feb 6, 2026
…ate they produced the val… (python#138678)" This reverts commit 1561385.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The load fast borrow analysis is marking the instruction index of opcodes which produce no locals as the delta (so always 0, 1, etc...) and not as the instruction that consumes no opcodes (the outer i).