Repository navigation
Autogen instructions & opcodes #7797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
fef345f
Base conf
ShaharNaveh 09eb0b0
Basic layout
ShaharNaveh 1ddf444
to from numeric
ShaharNaveh 1e0c01b
generate has attr
ShaharNaveh c66eaf6
Basic instrumented
ShaharNaveh d1f0982
sort instrumeneted
ShaharNaveh 5f07a17
deopt
ShaharNaveh bea434e
Cache entries
ShaharNaveh 8768c9f
simplify
ShaharNaveh b9f1941
stack effect
ShaharNaveh 566c0cf
Simplify conf structure
ShaharNaveh 0b93378
Switch to numeric_repr
ShaharNaveh 9ff0a7a
Add oparg conf
ShaharNaveh 9c74715
`as_opcode()`
ShaharNaveh 9e6382a
as_{opcode,instruction}
ShaharNaveh 9f88f88
save progress
ShaharNaveh 7669f0c
label_arg
ShaharNaveh e6d07b1
Compiler core compiles
ShaharNaveh 99ba1db
More things to compile
ShaharNaveh 9ce43ac
codegen compiles
ShaharNaveh d662a99
add must_use
ShaharNaveh 0e35818
Overridable stack_effect
ShaharNaveh b58d736
fix stack_effect
ShaharNaveh 74addfd
fix more in frame.rs
ShaharNaveh 606a5aa
vm compiles
ShaharNaveh 4ed7659
stdlib compile
ShaharNaveh 0bc0d9b
_opcode `has_X` ignore deopt
ShaharNaveh a42b005
Align methods
ShaharNaveh 09925bb
save
ShaharNaveh 428ad29
fix `has_exc`
ShaharNaveh 92e43e3
clippy
ShaharNaveh 34268ce
Align script
ShaharNaveh 9d909a3
clippy
ShaharNaveh f9358bf
Simplify code
ShaharNaveh d90b993
Fix compiles
ShaharNaveh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
More things to compile
- Loading branch information
commit 99ba1db4510a1fa15dc6b95c6922c39ced608580
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
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.
Instruction::stack_effect_jumpcalls the wrong delegate.This forwards to
Opcode::stack_effect, notOpcode::stack_effect_jump.PseudoInstruction::stack_effect_jump(line 151-153) correctly forwards tostack_effect_jump. Today the two Opcode methods return identical values, but the momentOpcode::stack_effect_jumpis overridden for branch-vs-fallthrough cases (e.g.ForIter, as called out in the doc-comment at lines 49-55), theInstructionpath will silently produce wrong stack effects on the branch edge — exactly the contract this method is meant to model.🐛 Proposed fix
#[must_use] pub fn stack_effect_jump(&self, oparg: u32) -> i32 { - self.as_opcode().stack_effect(oparg) + self.as_opcode().stack_effect_jump(oparg) }📝 Committable suggestion
🤖 Prompt for AI Agents