◐ Shell
reader mode source ↗
Skip to content

Cleanup match statement codegen#5700

Merged
coolreader18 merged 10 commits into
RustPython:mainfrom
arihant2math:match-cleanup
Apr 18, 2025
Merged

Cleanup match statement codegen#5700
coolreader18 merged 10 commits into
RustPython:mainfrom
arihant2math:match-cleanup

Conversation

@arihant2math

@arihant2math arihant2math commented Apr 15, 2025

Copy link
Copy Markdown
Contributor

#5628 was a little chaotic.

  • Remove Instruction::IsOperation
  • Cleans up some error handling (less panicking due to todo!)
  • Handle stack underflows with more informative error
  • Makes code more rust-like
  • Cleans up variable names for spellcheck
  • Removes match test because we have a test in extra_tests and the test only checks for compile.

@arihant2math arihant2math marked this pull request as ready for review April 15, 2025 18:57
@arihant2math arihant2math changed the title Cleanup match statement Apr 15, 2025
@arihant2math

Copy link
Copy Markdown
Contributor Author

Matching classes causes a stack underflow, no clue why. That's for a different pr though.

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

Hide comment

lgtm! lmk when you feel it's ready to be merged.

@coolreader18 coolreader18 merged commit 0d4faa0 into RustPython:main Apr 18, 2025
@arihant2math arihant2math deleted the match-cleanup branch April 19, 2025 04:32
Sign up for free to 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