Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2017-11-08 11:30:15 +0300
committerGitHub <noreply@github.com>2017-11-08 11:30:15 +0300
commit2bc2edc1e2b1b0e835366668b53ccfc48ece0949 (patch)
tree4d55abbb3e618bebd2a3845a360e7448fe110b53
parentcf990d8db1f5febbcb2e03b708eb26eef7be2321 (diff)
parenta0495d135109f4f6b60df64883fd1dffa747ae31 (diff)
Merge pull request #4889 from dotnet-bot/from-tfs
Merge changes from TFS
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/PrecomputedMetadataManager.cs6
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/UtcStackTraceEmissionPolicy.cs10
2 files changed, 16 insertions, 0 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/PrecomputedMetadataManager.cs b/src/ILCompiler.Compiler/src/Compiler/PrecomputedMetadataManager.cs
index f21cedb90..2191198f0 100644
--- a/src/ILCompiler.Compiler/src/Compiler/PrecomputedMetadataManager.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/PrecomputedMetadataManager.cs
@@ -435,6 +435,12 @@ namespace ILCompiler
{
MetadataLoadedInfo loadedMetadata = _loadedMetadata.Value;
+ // Add all non-generic reflectable types as roots.
+ foreach (var type in loadedMetadata.TypesWithStrongMetadataMappings)
+ {
+ rootProvider.AddCompilationRoot(type, "Required non-generic type");
+ }
+
// Add all non-generic reflectable methods as roots.
// Virtual methods need special handling (e.g. with dependency tracking) since they can be abstract.
foreach (var method in loadedMetadata.MethodMappings.Keys)
diff --git a/src/ILCompiler.Compiler/src/Compiler/UtcStackTraceEmissionPolicy.cs b/src/ILCompiler.Compiler/src/Compiler/UtcStackTraceEmissionPolicy.cs
index 533759f15..1c44d690e 100644
--- a/src/ILCompiler.Compiler/src/Compiler/UtcStackTraceEmissionPolicy.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/UtcStackTraceEmissionPolicy.cs
@@ -122,9 +122,14 @@ namespace ILCompiler
/// </summary>
string GetAppExeDirectory()
{
+#if !CORERT
var process = Process.GetCurrentProcess();
string fullPath = process.MainModule.FileName;
return Path.GetDirectoryName(fullPath);
+#else
+ Debug.Assert(false);
+ return null;
+#endif
}
/// <summary>
@@ -132,6 +137,10 @@ namespace ILCompiler
/// </summary>
void LoadExceptionFile(string exceptionFileName)
{
+#if CORERT
+ Debug.Assert(false);
+ return;
+#else
if (!File.Exists(exceptionFileName))
return;
@@ -183,6 +192,7 @@ namespace ILCompiler
line = tr.ReadLine();
}
}
+#endif
}
}
}