1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-12-31 21:30:59 +00:00
6502bench/SourceGen/WpfGui
Andy McFadden b387298685 Fix various local variable de-duplication bugs
In 1.5.0-dev1, as part of changes to the way label localization
works, the local variable de-duplicator started checking against a
filtered copy of the symbol table.  Unfortunately it never
re-generated the table, so a long-lived LocalVariableLookup (like
the one used by LineListGen) would set up the dup map wrong and
be inconsistent with other parts of the program.

We now regenerate the table on every Reset().

The de-duplication stuff also had problems when opcodes and
operands were double-clicked on.  When the opcode is clicked, the
selection should jump to the appropriate variable declaration, but
it wasn't being found because the label generated in the list was
in its original form.  Fixed.

When an instruction operand is double-clicked, the instruction operand
editor opens with an "edit variable" shortcut.  This was showing
the de-duplicated name, which isn't necessarily a bad thing, but it
was passing that value on to the DefSymbol editor, which thought it
was being asked to create a new entry.  Fixed.  (Entering the editor
through the LvTable editor works correctly, with nary a de-duplicated
name in sight.  You'll be forced to rename it because it'll fail the
uniqueness test.)

References to de-duplicated local variables were getting lost when
the symbol's label was replaced (due largely to a convenient but
flawed shortcut: xrefs are attached to DefSymbol objects).  Fixed by
linking the XrefSets.

Given the many issues and their relative subtlety, I decided to make
the modified names more obvious, and went back to the "_DUPn" naming
strategy.  (I'm also considering just making it an error and
discarding conflicting entries during analysis... this is much more
complicated than I expected it to be.)

Quick tests can be performed in 2019-local-variables:
 - go to +000026, double-click on the opcode, confirm sel change
 - go to +000026, double-click on the operand, confirm orig name
   shown in shortcut and that shortcut opens editor with orig name
 - go to +00001a, down a line, click on PROJ_ZERO_DUP1 and confirm
   that it has a single reference (from +000026)
 - double-click on var table and confirm editing entry
2020-01-13 18:32:56 -08:00
..
AboutBox.xaml
AboutBox.xaml.cs
CodeListItemStyle.xaml Fix proportions for animated GIFs 2019-12-25 10:28:40 -08:00
DataFileLoadIssue.xaml
DataFileLoadIssue.xaml.cs
DiscardChanges.xaml
DiscardChanges.xaml.cs
EditAddress.xaml Allow setting the start/end address for a block 2019-12-25 18:17:50 -08:00
EditAddress.xaml.cs Allow setting the start/end address for a block 2019-12-25 18:17:50 -08:00
EditAppSettings.xaml Two changes to "dense hex" bulk data formatting 2019-12-10 17:41:00 -08:00
EditAppSettings.xaml.cs Add F6 as a shortcut for the Project Symbols editor 2019-12-13 13:05:29 -08:00
EditBitmapAnimation.xaml Fix proportions for animated GIFs 2019-12-25 10:28:40 -08:00
EditBitmapAnimation.xaml.cs Minor tweaks 2020-01-01 17:26:53 -08:00
EditComment.xaml
EditComment.xaml.cs Add file slicer tool 2019-12-29 17:59:35 -08:00
EditDataOperand.xaml Two changes to "dense hex" bulk data formatting 2019-12-10 17:41:00 -08:00
EditDataOperand.xaml.cs Fix symbol entry bug in operand editors 2019-12-26 11:04:37 -08:00
EditDefSymbol.xaml
EditDefSymbol.xaml.cs Add file slicer tool 2019-12-29 17:59:35 -08:00
EditInstructionOperand.xaml
EditInstructionOperand.xaml.cs Fix various local variable de-duplication bugs 2020-01-13 18:32:56 -08:00
EditLabel.xaml Label rework, part 7 (of 7) 2019-11-18 17:45:41 -08:00
EditLabel.xaml.cs Add file slicer tool 2019-12-29 17:59:35 -08:00
EditLocalVariableTable.xaml
EditLocalVariableTable.xaml.cs Label rework, part 2 2019-11-12 17:44:51 -08:00
EditLongComment.xaml
EditLongComment.xaml.cs
EditLvTableLocation.xaml
EditLvTableLocation.xaml.cs More progress on visualization 2019-11-26 18:54:42 -08:00
EditNote.xaml
EditNote.xaml.cs
EditProjectProperties.xaml
EditProjectProperties.xaml.cs Add file concatenation tool 2019-12-28 17:22:19 -08:00
EditStatusFlags.xaml
EditStatusFlags.xaml.cs
EditVisualization.xaml Visualization editor UX enhancements 2019-12-31 20:39:51 -08:00
EditVisualization.xaml.cs Visualization editor UX enhancements 2019-12-31 20:39:51 -08:00
EditVisualizationSet.xaml Fix proportions for animated GIFs 2019-12-25 10:28:40 -08:00
EditVisualizationSet.xaml.cs Minor tweaks 2020-01-01 17:26:53 -08:00
Export.xaml Add visualization sets to exported HTML 2019-12-13 17:15:38 -08:00
Export.xaml.cs Add visualization sets to exported HTML 2019-12-13 17:15:38 -08:00
FindBox.xaml
FindBox.xaml.cs
FontPicker.xaml
FontPicker.xaml.cs
FormatAddressTable.xaml
FormatAddressTable.xaml.cs Label rework, part 6 2019-11-18 13:36:53 -08:00
GotoBox.xaml
GotoBox.xaml.cs Label rework, part 4 2019-11-16 16:44:08 -08:00
MainWindow.xaml Add file slicer tool 2019-12-29 17:59:35 -08:00
MainWindow.xaml.cs Add file slicer tool 2019-12-29 17:59:35 -08:00
NewProject.xaml
NewProject.xaml.cs
ProjectLoadIssues.xaml
ProjectLoadIssues.xaml.cs