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-122155: Track local variables between pops and pushes in cases generator by markshannon · Pull Request #122286 · python/cpython

Conversation

@markshannon

@markshannon markshannon commented Jul 25, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

The current design of the cases generator assumes that the code generator can infer all it needs to know from looking at the stack comments of individual micro-ops. However this isn't true within a tier 1 instruction if the intermediate stack grows during an instruction.

This PR tracks local values during micro ops, between them being popped from the stack and pushed back to the stack.

  • Issue: Cases generator gets confused about the number of values to pop in case of errors in some macros #122155

Sorry, something went wrong.

Uh oh!

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

All reactions
markshannon added 3 commits July 25, 2024 11:05
@markshannon
Track local variables between pops and pushes in cases generator
d507013
@markshannon
Add test and update test
2cc8758
@markshannon
Handle ERROR_IF properly for complex stacks
624bc50
@bedevere-app bedevere-app Bot mentioned this pull request Jul 25, 2024
Cases generator gets confused about the number of values to pop in case of errors in some macros #122155
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Jul 25, 2024
markshannon added 2 commits July 25, 2024 16:35
@markshannon
Fix type annotations
accf9e9
@markshannon
Merge branch 'main' into cases-gen-track-locals
1eea271
@markshannon markshannon added the skip news label Jul 25, 2024
markshannon added 2 commits July 25, 2024 16:54
@markshannon
Remove unreachable code
1ca17fb
@markshannon
Merge branch 'main' into cases-gen-track-locals
56e9afb
squeaky-pl
squeaky-pl reviewed Jul 27, 2024
View reviewed changes
Comment thread Tools/cases_generator/stack.py Resolved

Uh oh!

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

squeaky-pl
squeaky-pl reviewed Jul 27, 2024
View reviewed changes
Comment thread Tools/cases_generator/tier1_generator.py Resolved

Uh oh!

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

picnixz
picnixz reviewed Jul 27, 2024
View reviewed changes
Comment thread Lib/test/test_generated_cases.py Resolved

Uh oh!

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

Comment thread Tools/cases_generator/stack.py Resolved

Uh oh!

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

Comment thread Tools/cases_generator/optimizer_generator.py Resolved

Uh oh!

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

Comment thread Tools/cases_generator/stack.py Resolved

Uh oh!

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

markshannon and others added 4 commits July 30, 2024 09:26
@markshannon @picnixz @squeaky-pl
Apply suggestions from code review
47f3bb3
Co-authored-by: Bénédikt Tran <[email protected]>
Co-authored-by: Paweł Piotr Przeradowski <[email protected]>
@markshannon
Use dict and tuple instead of Dict and Tuple in annotations
89fbf03
@markshannon
Minor tidy up
76a364f
@markshannon
Merge branch 'main' into cases-gen-track-locals
070786d
iritkatriel
iritkatriel reviewed Jul 31, 2024
View reviewed changes
Comment thread Lib/test/test_generated_cases.py Resolved

Uh oh!

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

@markshannon
Add clarifying comment
d7a4c07
iritkatriel
iritkatriel approved these changes Jul 31, 2024
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Jul 31, 2024
@markshannon
Merge branch 'main' into cases-gen-track-locals
a748da3
@markshannon

markshannon commented Aug 1, 2024

Copy link
Copy Markdown
Member Author

JIT failures are unrelated (an llvm package issue)

All reactions

Sorry, something went wrong.

Uh oh!

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

@markshannon
markshannon merged commit a9d56e3 into python:main Aug 1, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Aug 1, 2024
@colesbury colesbury mentioned this pull request Aug 2, 2024
gh-118926: Deferred reference counting GC changes for free threading #121318
Closed
@markshannon
markshannon deleted the cases-gen-track-locals branch August 6, 2024 10:14
@colesbury colesbury mentioned this pull request Aug 6, 2024
gh-118926: Spill deferred references to stack in cases generator #122748
Merged
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
@markshannon @blhsing
pythonGH-122155: Track local variables between pops and pushes in cas…
e995f4a
…es generator (pythonGH-122286)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@picnixz picnixz picnixz left review comments
@iritkatriel iritkatriel iritkatriel approved these changes
+1 more reviewer
@squeaky-pl squeaky-pl squeaky-pl left review comments
Reviewers whose approvals may not affect merge requirements

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.

4 participants

@markshannon @squeaky-pl @iritkatriel @picnixz
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.