| 45 | /// Maximum number of entries to process per frame to avoid UI lag. |
| 46 | const MAX_ENTRIES_PER_FRAME: usize = 10000; |
| 47 | |
| 48 | pub struct Disassembler { |
| 49 | /// Handle to the emulator (contains the disasm channel consumer). |
| 50 | emu_handle: Arc<Mutex<EmuHandle>>, |
| 51 | /// Retained lines, stored separately to evict the oldest entry cheaply. |
| 52 | lines: VecDeque<String>, |
| 53 | /// Pre-built display text (avoids rebuilding every frame). |
| 54 | display_text: String, |
| 55 | /// Tracks whether the CPU is currently pushing instructions to us, so we |
| 56 | /// only send a toggle command when the window opens or closes. |
| 57 | enabled: bool, |
| 58 | } |
| 59 | |
| 60 | impl Disassembler { |
nothing calls this directly
no outgoing calls
no test coverage detected