-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed architecture! No more debugging state clones.
This commit changes the way debugger works. Before: current line was stored in Debugger. So debugger had functions like next_state, previous_state, and so on. Now, it only has peek_at_state, which takes a number - which state we want to look at. This allows us to borrow Debugger as immutable from various TUI implementations. This means not only that one Debugger instance may be used from multiple TUIs concurrently, but that we have much more simplified memory management. For example, before, whenever we wanted to display *any* state, we had to clone it. That was expensive! Especially since each state contains String from the sed output itself. Now we can just borrow those states as immutable instead. Current TUI takes advantage of that and doesn't consume Debugger anymore, and furthermore just borrows all the debugging states instead of cloning them all the time.
- Loading branch information
Showing
3 changed files
with
43 additions
and
68 deletions.
There are no files selected for viewing
This file contains 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 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 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
a35af51
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.
This small change is one of the best commits I've ever made in this repository. And it's mostly just deleting code. Heh.