1
0
mirror of https://github.com/fadden/6502bench.git synced 2025-07-19 06:24:05 +00:00

Make "smart" PLP handling optional

We try to be clever with PHP/PLP, but sometimes we get it wrong.  If
we get it wrong a lot, we want to turn it off.  Now we can.
This commit is contained in:
Andy McFadden
2019-09-02 15:57:59 -07:00
parent 54e7f68490
commit 431ad94d95
8 changed files with 64 additions and 23 deletions

View File

@@ -219,6 +219,7 @@ namespace SourceGen {
public string DefaultTextScanMode { get; set; }
public int MinCharsForString { get; set; }
public bool SeekNearbyTargets { get; set; }
public bool SmartPlpHandling { get; set; }
public SerAnalysisParameters() { }
public SerAnalysisParameters(ProjectProperties.AnalysisParameters src) {
@@ -226,6 +227,7 @@ namespace SourceGen {
DefaultTextScanMode = src.DefaultTextScanMode.ToString();
MinCharsForString = src.MinCharsForString;
SeekNearbyTargets = src.SeekNearbyTargets;
SmartPlpHandling = src.SmartPlpHandling;
}
}
public class SerAddressMap {
@@ -511,6 +513,13 @@ namespace SourceGen {
spf.ProjectProps.AnalysisParams.MinCharsForString;
proj.ProjectProps.AnalysisParams.SeekNearbyTargets =
spf.ProjectProps.AnalysisParams.SeekNearbyTargets;
if (spf._ContentVersion < 2) {
// This was made optional in v1.3. Default it to true for older projects.
proj.ProjectProps.AnalysisParams.SmartPlpHandling = true;
} else {
proj.ProjectProps.AnalysisParams.SmartPlpHandling =
spf.ProjectProps.AnalysisParams.SmartPlpHandling;
}
// Deserialize ProjectProperties: external file identifiers.
Debug.Assert(proj.ProjectProps.PlatformSymbolFileIdentifiers.Count == 0);