1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-12-01 07:50:37 +00:00

Clear Lv xrefs at start of xref gen

Local variable cross-references were accumulating without bound on
every refresh.
This commit is contained in:
Andy McFadden 2020-01-14 17:56:55 -08:00
parent b387298685
commit 0013718d59

View File

@ -1442,6 +1442,12 @@ namespace SourceGen {
(sym as DefSymbol).Xrefs.Clear();
}
}
// TODO: seriously, put the XrefSet ref somewhere else
foreach (LocalVariableTable lvt in LvTables.Values) {
for (int i = 0; i < lvt.Count; i++) {
lvt[i].Xrefs.Clear();
}
}
// Create a mapping from label (which must be unique) to file offset. This
// is different from UserLabels (which only has user-created labels, and is
@ -1594,7 +1600,7 @@ namespace SourceGen {
}
/// <summary>
/// Adds an Xref entry to an XrefSet. The XrefSet will be created if necessary.
/// Adds an Xref entry to an XrefSet in mXrefs. The XrefSet will be created if necessary.
/// </summary>
/// <param name="offset">File offset for which cross-references are being noted.</param>
/// <param name="xref">Cross reference to add to the set.</param>