Repository navigation
chore: release 0.2.0 - #3
Merged
Merged
Conversation
Add `signature` (procedure export declarations and DLL import declarations) and `frame` (per-instruction stack heights and the slots each call consumes), plus `Opcode::operands()` and `Operand::var_refs()`. Fix the decoding of `cm_spc`, which carries two variables rather than a u32, and the coordinates of `flaggoto` and the `try` handler sections, which are deltas from the end of the instruction rather than procedure-local absolutes. Unknown opcode and sub-operation bytes now report their own errors. These change the public API (`ProcDisasm::branch_target()` / `branch_targets()` are removed, `FlagGoto`'s field is renamed and `SetStackPointerToCopy` gains a second operand), so this is a minor bump rather than 0.1.4.
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.
Summary
signature: parses internal procedure export declarations (InternalProc::signature()), external bit strings, and DLL import declarations (ExternalProc::declaration()).Signature::slotclassifies stack slots.frame:StackMap(ProcDisasm::stack_map()) gives the stack height before every instruction and rejects bodies whose paths disagree (Error::StackImbalance).StackMap::call_slotsgives the slots a call consumes.Opcode::operands()andOperand::var_refs().cm_spc(SetStackPointerToCopy) decoding: it carries two variables, not au32, so procedures containing it previously failed to decode.flaggotoandPushExceptionHandlersection coordinates: they are deltas from the end of the instruction, not procedure-local absolutes. An absent handler section is nowNone.FlagGotois now a conditional branch inOpcode::flow_type().Error::UnknownOpcode/Error::UnknownSubOpinstead ofError::UnknownBaseType.Breaking changes
ProcDisasm::branch_target()/branch_targets()are removed,FlagGoto's field is renamed tooffset, andSetStackPointerToCopyis now{ dest, src }. That is why this is 0.2.0 rather than 0.1.4.Verification
cargo fmt --checkcargo clippy --all-targets -- -D warningscargo teston stable and on MSRV 1.85 (50 passed)RUSTDOCFLAGS="-D warnings" cargo doc --no-depscargo publish --dry-run