1
0
mirror of https://github.com/fadden/6502bench.git synced 2025-01-04 01:29:55 +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
Res
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
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
App.config
App.xaml
App.xaml.cs Version 1.5.0-dev3 2019-12-26 11:09:28 -08:00
AppSettings.cs
AutoLabel.cs
ChangeSet.cs
CodeAnalysis.cs
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
Exporter.cs Minor tweaks 2020-01-01 17:26:53 -08:00
ExternalFile.cs
FormatDescriptor.cs
FormattedOperandCache.cs
HelpAccess.cs
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
MultiLineComment.cs
NavStack.cs
PlatformSymbols.cs
ProjectFile.cs Update project file formatting 2019-12-31 13:59:08 -08:00
ProjectProperties.cs
PseudoOp.cs
RuntimeDataAccess.cs
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
SystemDefaults.cs
SystemDefs.cs
UndoableChange.cs
Visualization.cs Minor tweaks 2020-01-01 17:26:53 -08:00
VisualizationAnimation.cs
VisualizationSet.cs Fix proxy object timeout in visualization editor 2019-12-28 14:00:48 -08:00
WeakSymbolRef.cs
XrefSet.cs Fix various local variable de-duplication bugs 2020-01-13 18:32:56 -08:00