Really, nulling and clearing parser data is just for debug builds.

This commit is contained in:
Adrian Conlon
2024-06-14 22:45:29 +01:00
parent 30f8b8a600
commit ed830bfd53
+13 -2
View File
@@ -342,6 +342,11 @@
this.FreezeParsedData();
// Intermediate data no longer needed
// Only "frozen" parsed data is needed.
#if DEBUG
this._parsed_intermediate.Clear();
#endif
this.ExtractFiles();
this.ExtractLines();
this.ExtractModules();
@@ -351,8 +356,15 @@
this.ExtractSymbols();
this.ExtractTypes();
// Frozen parsed data is no longer needed
#if DEBUG
this._parsed = null;
#endif
// We are now mostly parsed
this.Parsed = true;
// Oh, except for marking addressable scopes
this.BuildAddressableScopes();
}
@@ -364,7 +376,6 @@
intermediateSections.Add(name, FrozenDictionary.ToFrozenDictionary(entries));
}
this._parsed = FrozenDictionary.ToFrozenDictionary(intermediateSections);
this._parsed_intermediate.Clear();
}
private void BuildAddressableScopes()
@@ -457,7 +468,7 @@
return FrozenDictionary.ToFrozenDictionary(dictionary);
}
#endregion
#endregion
}
}
}