feature: Add jump arc visualization to disassembly view#1961
Open
maximilien-noal wants to merge 9 commits intomasterfrom
Open
feature: Add jump arc visualization to disassembly view#1961maximilien-noal wants to merge 9 commits intomasterfrom
maximilien-noal wants to merge 9 commits intomasterfrom
Conversation
Visualize control flow with jump lines/arrows for branches. Introduced JumpLinesControl and JumpLineCalculator for lane assignment. DebuggerLineViewModel tracks jump arc segments and lane counts. Updated DisassemblyView layout and resource brushes for jump lines.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds jump-arc (control-flow) visualization to the disassembly list, enabling users to see branch/jump relationships directly in the debugger UI.
Changes:
- Introduces
JumpLinesControlto render per-line jump lane segments (lines/corners/arrowheads). - Adds
JumpLineCalculatorplus supportingJumpArcSegment/JumpSegmentTypemodels to compute lane assignments and segments. - Updates
DisassemblyViewlayout/resources and extends the disassembly view model with aShowJumpLinestoggle.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Spice86/Views/Styles/DisassemblyResources.axaml | Adds theme brushes for jump lines and arrowheads. |
| src/Spice86/Views/DisassemblyView.axaml | Adds toolbar toggle and a new grid column hosting JumpLinesControl. |
| src/Spice86/Views/Controls/JumpLinesControl.cs | New custom-drawn control for rendering jump lane segments and arrows. |
| src/Spice86/ViewModels/Services/JumpLineCalculator.cs | Computes jump arcs and assigns non-overlapping lanes for visible lines. |
| src/Spice86/ViewModels/JumpSegmentType.cs | Defines segment roles (top/bottom/middle) for rendering. |
| src/Spice86/ViewModels/JumpArcSegment.cs | Defines per-line segment data (lane/type/target flag). |
| src/Spice86/ViewModels/IDisassemblyViewModel.cs | Adds ShowJumpLines to the disassembly VM contract. |
| src/Spice86/ViewModels/DisassemblyViewModel.cs | Implements the toggle and triggers arc computation when enabled. |
| src/Spice86/ViewModels/DebuggerLineViewModel.cs | Tracks per-line jump segments + lane count; adds unconditional-branch detection. |
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Improved performance by caching Pen objects and reusing a static arrow geometry for drawing. Refactored arrow drawing to use a single geometry instance, translated as needed, reducing allocations and memory usage during rendering.
Jump arcs in the disassembly view now use a theme-aware color palette to visually distinguish overlapping arcs. Each segment selects its color via a ColorIndex, and arrowheads match the arc color. ArrowBrush has been removed. Palette brushes are defined in DisassemblyResources.axaml for both light and dark themes, improving clarity and usability.
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.
Visualize control flow with jump lines/arrows for branches. Introduced JumpLinesControl and JumpLineCalculator for lane assignment. DebuggerLineViewModel tracks jump arc segments and lane counts. Updated DisassemblyView layout and resource brushes for jump lines.