1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-07 07:28:57 +00:00
6502bench/SourceGen
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
..
AsmGen Tweak Merlin DS output 2020-01-01 17:45:32 -08:00
Examples Add visualization tutorial 2019-12-28 13:19:40 -08:00
Properties Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
Res Check for hidden visualizations 2019-12-25 11:15:22 -08:00
RuntimeData Updated the RuntimeData README 2020-01-01 18:06:59 -08:00
Sandbox Add file concatenation tool 2019-12-28 17:22:19 -08:00
SGTestData Fix various local variable de-duplication bugs 2020-01-13 18:32:56 -08:00
Tests Label rework, part 6 2019-11-18 13:36:53 -08:00
Tools Add file slicer tool 2019-12-29 17:59:35 -08:00
WpfGui Fix various local variable de-duplication bugs 2020-01-13 18:32:56 -08:00
Anattrib.cs Correctly handle embedded instruction edge case 2019-10-19 17:28:45 -07:00
App.config Fix startup issues 2019-07-20 17:36:12 -07:00
App.xaml Improve visualization 2019-12-04 15:59:37 -08:00
App.xaml.cs Version 1.5.0-dev3 2019-12-26 11:09:28 -08:00
AppSettings.cs Add visualization sets to exported HTML 2019-12-13 17:15:38 -08:00
AutoLabel.cs Label rework, part 1 2019-11-08 21:02:15 -08:00
ChangeSet.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
CodeAnalysis.cs Tweak visualizer interface 2019-12-05 10:29:00 -08:00
DataAnalysis.cs Allow setting the start/end address for a block 2019-12-25 18:17:50 -08:00
DefSymbol.cs Fix various local variable de-duplication bugs 2020-01-13 18:32:56 -08:00
DisasmProject.cs Tweak def symbol sort order 2020-01-04 16:56:31 -08:00
DisplayList.cs Add visualization tutorial 2019-12-28 13:19:40 -08:00
DisplayListSelection.cs Add C64 encodings to instruction and data operand editors 2019-08-15 17:53:12 -07:00
Exporter.cs Minor tweaks 2020-01-01 17:26:53 -08:00
ExternalFile.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
FormatDescriptor.cs Fix junk alignment check 2019-10-23 13:25:50 -07:00
FormattedOperandCache.cs Add a string operand cache 2019-08-17 17:03:06 -07:00
HelpAccess.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
LineListGen.cs Fix various local variable de-duplication bugs 2020-01-13 18:32:56 -08:00
LocalVariableLookup.cs Fix various local variable de-duplication bugs 2020-01-13 18:32:56 -08:00
LocalVariableTable.cs Fix various local variable de-duplication bugs 2020-01-13 18:32:56 -08:00
MainController.cs Work around the mysterious shrinking side-window problem 2020-01-01 17:27:03 -08:00
MessageList.cs Check for hidden visualizations 2019-12-25 11:15:22 -08:00
MultiLineComment.cs Tweak line folding code 2019-11-01 19:47:56 -07:00
NavStack.cs Tweak navigation 2019-10-10 11:57:36 -07:00
PlatformSymbols.cs Update comments, remove unused var 2019-10-27 21:29:44 -07:00
ProjectFile.cs Update project file formatting 2019-12-31 13:59:08 -08:00
ProjectProperties.cs Optionally treat BRKs as two-byte instructions 2019-10-09 14:55:56 -07:00
PseudoOp.cs Two changes to "dense hex" bulk data formatting 2019-12-10 17:41:00 -08:00
RuntimeDataAccess.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
SourceGen.csproj Add file slicer tool 2019-12-29 17:59:35 -08:00
Symbol.cs Fix symbol entry bug in operand editors 2019-12-26 11:04:37 -08:00
SymbolTable.cs Label rework, part 6 2019-11-18 13:36:53 -08:00
SystemDefaults.cs Optionally treat BRKs as two-byte instructions 2019-10-09 14:55:56 -07:00
SystemDefs.cs Move WPF code from SourceGenWPF to SourceGen 2019-07-20 13:28:37 -07:00
UndoableChange.cs Groundwork for visualization sets 2019-11-22 20:45:57 -08:00
Visualization.cs Minor tweaks 2020-01-01 17:26:53 -08:00
VisualizationAnimation.cs Fix proportions for animated GIFs 2019-12-25 10:28:40 -08:00
VisualizationSet.cs Fix proxy object timeout in visualization editor 2019-12-28 14:00:48 -08:00
WeakSymbolRef.cs Add local variable uniquification 2019-08-31 14:19:50 -07:00
XrefSet.cs Fix various local variable de-duplication bugs 2020-01-13 18:32:56 -08:00