mirror of
https://github.com/fadden/6502bench.git
synced 2024-08-20 11:28:58 +00:00
Correct handling of local variables. We now correctly uniquify them with regard to non-unique labels. Because local vars can effectively have global scope we mostly want to treat them as global, but they're uniquified relative to other globals very late in the process, so we can't just throw them in the symbol table and be done. Fortunately local variables exist in a separate namespace, so we just need to uniquify the variables relative to the post-localization symbol table. In other words, we take the symbol table, apply the label map, and rename any variable that clashes. This also fixes an older problem where we weren't masking the leading '_' on variable labels when generating 64tass output. The code list now makes non-unique labels obvious, but you can't tell the difference between unique global and unique local. What's more, the default type value in Edit Label is now adjusted to Global for unique locals that were auto-generated. To make it a bit easier to figure out what's what, the Info panel now has a "label type" line that reports the type. The 2023-non-unique-labels test had some additional tests added to exercise conflicts with local variables. The 2019-local-variables test output changed slightly because the de-duplicated variable naming convention was simplified.
177 lines
7.8 KiB
Plaintext
177 lines
7.8 KiB
Plaintext
### 6502bench SourceGen dis65 v1.0 ###
|
|
{
|
|
"_ContentVersion":3,"FileDataLength":180,"FileDataCrc32":381569947,"ProjectProps":{
|
|
"CpuName":"6502","IncludeUndocumentedInstr":false,"TwoByteBrk":false,"EntryFlags":32702671,"AutoLabelStyle":"Simple","AnalysisParams":{
|
|
"AnalyzeUncategorizedData":true,"DefaultTextScanMode":"LowHighAscii","MinCharsForString":4,"SeekNearbyTargets":true,"SmartPlpHandling":true},
|
|
"PlatformSymbolFileIdentifiers":[],"ExtensionScriptFileIdentifiers":[],"ProjectSyms":{
|
|
}},
|
|
"AddressMap":[{
|
|
"Offset":0,"Addr":4096}],"TypeHints":[{
|
|
"Low":0,"High":0,"Hint":"Code"},
|
|
{
|
|
"Low":149,"High":152,"Hint":"InlineData"}],"StatusFlagOverrides":{
|
|
},
|
|
"Comments":{
|
|
},
|
|
"LongComments":{
|
|
},
|
|
"Notes":{
|
|
},
|
|
"UserLabels":{
|
|
"2":{
|
|
"Label":"L1000","Value":4098,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"12":{
|
|
"Label":"loop1","Value":4108,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"17":{
|
|
"Label":"loop1","Value":4113,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"20":{
|
|
"Label":"global1","Value":4116,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"23":{
|
|
"Label":"loop","Value":4119,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"25":{
|
|
"Label":"loop","Value":4121,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"34":{
|
|
"Label":"global2","Value":4130,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"35":{
|
|
"Label":"loop","Value":4131,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"36":{
|
|
"Label":"global3","Value":4132,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"47":{
|
|
"Label":"fwd1","Value":4143,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"48":{
|
|
"Label":"fwd2","Value":4144,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"49":{
|
|
"Label":"global4","Value":4145,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"52":{
|
|
"Label":"loop","Value":4148,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"53":{
|
|
"Label":"global5","Value":4149,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"57":{
|
|
"Label":"global6","Value":4153,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"58":{
|
|
"Label":"spin1","Value":4154,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"61":{
|
|
"Label":"spin2","Value":4157,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"65":{
|
|
"Label":"spin1","Value":4161,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"90":{
|
|
"Label":"skip","Value":4186,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"91":{
|
|
"Label":"global_","Value":4187,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"92":{
|
|
"Label":"_global","Value":4188,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"94":{
|
|
"Label":"__","Value":4190,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"99":{
|
|
"Label":"___","Value":4195,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"101":{
|
|
"Label":"__","Value":4197,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"105":{
|
|
"Label":"anno","Value":4201,"Source":"User","Type":"LocalOrGlobalAddr","LabelAnno":"Uncertain"},
|
|
"107":{
|
|
"Label":"T106B","Value":4203,"Source":"User","Type":"GlobalAddr","LabelAnno":"Generated"},
|
|
"115":{
|
|
"Label":"skip","Value":4211,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"116":{
|
|
"Label":"JMP","Value":4212,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"119":{
|
|
"Label":"JMP0","Value":4215,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"122":{
|
|
"Label":"JMP1","Value":4218,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"125":{
|
|
"Label":"JMP","Value":4221,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"128":{
|
|
"Label":"JMP0","Value":4224,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"131":{
|
|
"Label":"JMP1","Value":4227,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"134":{
|
|
"Label":"JMP","Value":4230,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"137":{
|
|
"Label":"jmp","Value":4233,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"140":{
|
|
"Label":"Jmp","Value":4236,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"143":{
|
|
"Label":"BRA","Value":4239,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"146":{
|
|
"Label":"brl","Value":4242,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"149":{
|
|
"Label":"LDAL","Value":4245,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"160":{
|
|
"Label":"plain","Value":4256,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"163":{
|
|
"Label":"plain","Value":4259,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"},
|
|
"166":{
|
|
"Label":"global8","Value":4262,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"169":{
|
|
"Label":"X_under1","Value":4265,"Source":"User","Type":"GlobalAddr","LabelAnno":"None"},
|
|
"172":{
|
|
"Label":"X__dub1","Value":4268,"Source":"User","Type":"NonUniqueLocalAddr","LabelAnno":"None"}},
|
|
"OperandFormats":{
|
|
"58":{
|
|
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"spin2§00003d","Part":"Low"}},
|
|
"61":{
|
|
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"spin1§00003a","Part":"Low"}},
|
|
"65":{
|
|
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"spin1§00003a","Part":"Low"}},
|
|
"68":{
|
|
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"spin1§000041","Part":"Low"}},
|
|
"70":{
|
|
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"spin1§00003a","Part":"Low"}},
|
|
"72":{
|
|
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"spin2§00003d","Part":"Low"}},
|
|
"74":{
|
|
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"spin1§00003a","Part":"High"}},
|
|
"76":{
|
|
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"spin2§00003d","Part":"High"}},
|
|
"80":{
|
|
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"spin1§00003a","Part":"Low"}},
|
|
"82":{
|
|
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"spin2§00003d","Part":"Low"}},
|
|
"84":{
|
|
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"spin1§000041","Part":"Low"}},
|
|
"86":{
|
|
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"spin1§00003a","Part":"Low"}},
|
|
"87":{
|
|
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"spin2§00003d","Part":"Low"}},
|
|
"88":{
|
|
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"spin1§00003a","Part":"High"}},
|
|
"89":{
|
|
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"spin2§00003d","Part":"High"}},
|
|
"113":{
|
|
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
|
"Label":"T106B","Part":"Low"}}},
|
|
"LvTables":{
|
|
"154":{
|
|
"Variables":[{
|
|
"DataDescriptor":{
|
|
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
|
"Comment":"","HasWidth":true,"Direction":"ReadWrite","MultiMask":null,"Label":"plain","Value":17,"Source":"Variable","Type":"ExternalAddr","LabelAnno":"None"},
|
|
{
|
|
"DataDescriptor":{
|
|
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
|
"Comment":"","HasWidth":true,"Direction":"ReadWrite","MultiMask":null,"Label":"_under1","Value":18,"Source":"Variable","Type":"ExternalAddr","LabelAnno":"None"},
|
|
{
|
|
"DataDescriptor":{
|
|
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
|
"Comment":"","HasWidth":true,"Direction":"ReadWrite","MultiMask":null,"Label":"__dub1","Value":19,"Source":"Variable","Type":"ExternalAddr","LabelAnno":"None"}],"ClearPrevious":false},
|
|
"175":{
|
|
"Variables":[{
|
|
"DataDescriptor":{
|
|
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
|
"Comment":"","HasWidth":true,"Direction":"ReadWrite","MultiMask":null,"Label":"_under1","Value":34,"Source":"Variable","Type":"ExternalAddr","LabelAnno":"None"}],"ClearPrevious":false}}}
|