aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2020-03-26 13:51:14 -0400
committerBob Arnson <bob@firegiant.com>2020-03-26 15:14:33 -0400
commit1adfdda935b814541693cd550bb34fdbf2942b1f (patch)
tree72b815664870bd37b9c049faa102348cc872fdd9 /src/WixToolset.Core
parent22c97adba70fa838b8f285d404750d0f8fe685d8 (diff)
downloadwix-1adfdda935b814541693cd550bb34fdbf2942b1f.tar.gz
wix-1adfdda935b814541693cd550bb34fdbf2942b1f.tar.bz2
wix-1adfdda935b814541693cd550bb34fdbf2942b1f.zip
Add intermediate levels to track how IR has been lowered.
Diffstat (limited to 'src/WixToolset.Core')
-rw-r--r--src/WixToolset.Core/Compiler.cs2
-rw-r--r--src/WixToolset.Core/Librarian.cs4
-rw-r--r--src/WixToolset.Core/Linker.cs8
-rw-r--r--src/WixToolset.Core/Resolver.cs2
4 files changed, 14 insertions, 2 deletions
diff --git a/src/WixToolset.Core/Compiler.cs b/src/WixToolset.Core/Compiler.cs
index de718c84..8c0c4a39 100644
--- a/src/WixToolset.Core/Compiler.cs
+++ b/src/WixToolset.Core/Compiler.cs
@@ -163,6 +163,8 @@ namespace WixToolset.Core
163 this.Core = null; 163 this.Core = null;
164 } 164 }
165 165
166 target.UpdateLevel(IntermediateLevels.Compiled);
167
166 return this.Messaging.EncounteredError ? null : target; 168 return this.Messaging.EncounteredError ? null : target;
167 } 169 }
168 170
diff --git a/src/WixToolset.Core/Librarian.cs b/src/WixToolset.Core/Librarian.cs
index b6be73e9..d862c326 100644
--- a/src/WixToolset.Core/Librarian.cs
+++ b/src/WixToolset.Core/Librarian.cs
@@ -63,7 +63,9 @@ namespace WixToolset.Core
63 section.LibraryId = context.LibraryId; 63 section.LibraryId = context.LibraryId;
64 } 64 }
65 65
66 library = new Intermediate(context.LibraryId, sections, localizationsByCulture); 66 library = new Intermediate(context.LibraryId, IntermediateLevels.Compiled, sections, localizationsByCulture);
67
68 library.UpdateLevel(IntermediateLevels.Combined);
67 69
68 this.Validate(library); 70 this.Validate(library);
69 } 71 }
diff --git a/src/WixToolset.Core/Linker.cs b/src/WixToolset.Core/Linker.cs
index 6ef252b7..f05aabd1 100644
--- a/src/WixToolset.Core/Linker.cs
+++ b/src/WixToolset.Core/Linker.cs
@@ -70,6 +70,12 @@ namespace WixToolset.Core
70 extension.PreLink(this.Context); 70 extension.PreLink(this.Context);
71 } 71 }
72 72
73 var invalidIntermediates = this.Context.Intermediates.Where(i => !i.HasLevel(Data.IntermediateLevels.Compiled));
74 if (invalidIntermediates.Any())
75 {
76 this.Messaging.Write(ErrorMessages.IntermediatesMustBeCompiled(String.Join(", ", invalidIntermediates.Select(i => i.Id))));
77 }
78
73 Intermediate intermediate = null; 79 Intermediate intermediate = null;
74 try 80 try
75 { 81 {
@@ -564,7 +570,7 @@ namespace WixToolset.Core
564 var collate = new CollateLocalizationsCommand(this.Messaging, localizations); 570 var collate = new CollateLocalizationsCommand(this.Messaging, localizations);
565 var localizationsByCulture = collate.Execute(); 571 var localizationsByCulture = collate.Execute();
566 572
567 intermediate = new Intermediate(resolvedSection.Id, new[] { resolvedSection }, localizationsByCulture); 573 intermediate = new Intermediate(resolvedSection.Id, Data.IntermediateLevels.Linked, new[] { resolvedSection }, localizationsByCulture);
568 574
569#if MOVE_TO_BACKEND 575#if MOVE_TO_BACKEND
570 this.CheckOutputConsistency(output); 576 this.CheckOutputConsistency(output);
diff --git a/src/WixToolset.Core/Resolver.cs b/src/WixToolset.Core/Resolver.cs
index 6913ce98..d4a03d82 100644
--- a/src/WixToolset.Core/Resolver.cs
+++ b/src/WixToolset.Core/Resolver.cs
@@ -114,6 +114,8 @@ namespace WixToolset.Core
114 114
115 var expectedEmbeddedFiles = filesWithEmbeddedFiles.GetExpectedEmbeddedFiles(); 115 var expectedEmbeddedFiles = filesWithEmbeddedFiles.GetExpectedEmbeddedFiles();
116 116
117 context.IntermediateRepresentation.UpdateLevel(IntermediateLevels.Resolved);
118
117 return new ResolveResult 119 return new ResolveResult
118 { 120 {
119 Codepage = codepage.HasValue ? codepage.Value : -1, 121 Codepage = codepage.HasValue ? codepage.Value : -1,