1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-14 20:28: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 Minor updates 2019-10-25 18:16:09 -07:00
AboutBox.xaml.cs Minor updates 2019-10-25 18:16:09 -07:00
CodeListItemStyle.xaml Fix proportions for animated GIFs 2019-12-25 10:28:40 -08:00
DataFileLoadIssue.xaml Minor fixes 2019-09-21 18:49:03 -07:00
DataFileLoadIssue.xaml.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
DiscardChanges.xaml Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
DiscardChanges.xaml.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
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 Minor UI tweaks 2019-09-18 18:11:48 -07:00
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 Limit value range of project address symbols 2019-10-27 15:36:47 -07:00
EditDefSymbol.xaml.cs Add file slicer tool 2019-12-29 17:59:35 -08:00
EditInstructionOperand.xaml Fix HTML output 2019-09-17 19:13:28 -07:00
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 Allow explicit widths in project/platform symbols, part 2 2019-10-01 19:11:54 -07:00
EditLocalVariableTable.xaml.cs Label rework, part 2 2019-11-12 17:44:51 -08:00
EditLongComment.xaml Tweak line folding code 2019-11-01 19:47:56 -07:00
EditLongComment.xaml.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
EditLvTableLocation.xaml Add a "move table" button 2019-09-01 16:40:54 -07:00
EditLvTableLocation.xaml.cs More progress on visualization 2019-11-26 18:54:42 -08:00
EditNote.xaml Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
EditNote.xaml.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
EditProjectProperties.xaml Add change discard confirmation to project properties editor 2019-11-04 17:41:33 -08:00
EditProjectProperties.xaml.cs Add file concatenation tool 2019-12-28 17:22:19 -08:00
EditStatusFlags.xaml Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
EditStatusFlags.xaml.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
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 Add "find previous" 2019-10-09 17:47:07 -07:00
FindBox.xaml.cs Add "find previous" 2019-10-09 17:47:07 -07:00
FontPicker.xaml Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
FontPicker.xaml.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
FormatAddressTable.xaml Rename FormatSplitAddress to FormatAddressTable 2019-09-15 13:37:38 -07:00
FormatAddressTable.xaml.cs Label rework, part 6 2019-11-18 13:36:53 -08:00
GotoBox.xaml Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
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 Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
NewProject.xaml.cs Fix startup issues 2019-07-20 17:36:12 -07:00
ProjectLoadIssues.xaml Fix visibility binding 2019-10-27 10:38:29 -07:00
ProjectLoadIssues.xaml.cs Open damaged projects in read-only mode 2019-10-26 13:20:54 -07:00