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:
authorJohn Chen (CLR) <jochen@microsoft.com>2015-11-16 23:59:35 +0300
committerJohn Chen (CLR) <jochen@microsoft.com>2015-12-16 00:14:33 +0300
commit3d67d94d0c1e4067340dd473015e3b72eaf57b03 (patch)
tree76ee6e8c0fab18f9169e7ca54e760d0778a85fea /src/ILCompiler.Compiler
parenta55a1d6136bccca166efc4f7a10bba7e49438e03 (diff)
Add JIT-EE interface wrappers to handle exceptions
* When JIT calls into the JIT-EE interface, the call is wrapped. All managed exceptions are caught by the wrapper, and re-throw as native exceptions. * The call from ILCompiler to JIT is also wrapped. The wrapper catches all native exceptions, and re-throws them as managed exceptions. * The message and call stack from the original managed exception is captured and stored in the unmanaged exception object, and restored in the managed exception thrown by the JIT wrapper. * A new native module (jitinterface.dll or jitinterface.so) is added to contain the native part of the wrappers. Long term, we should consider whether to merge this into JIT.
Diffstat (limited to 'src/ILCompiler.Compiler')
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/Compilation.cs27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/Compilation.cs b/src/ILCompiler.Compiler/src/Compiler/Compilation.cs
index bc161052e..0147987dc 100644
--- a/src/ILCompiler.Compiler/src/Compiler/Compilation.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/Compilation.cs
@@ -235,25 +235,6 @@ namespace ILCompiler
}
}
- // List of methods that are known to throw an exception during compilation.
- // On Windows it's fine to throw it because we have a catchall block.
- // On Linux, throwing a managed exception to native code will bring down the process.
- // https://github.com/dotnet/corert/issues/162
- private HashSet<TypeAndMethod> _skipJitList = new HashSet<TypeAndMethod>
- {
- new TypeAndMethod("System.SR", "GetResourceString"),
- new TypeAndMethod("System.Text.StringBuilder", "AppendFormatHelper"),
- new TypeAndMethod("System.Collections.Concurrent.ConcurrentUnifier`2", "GetOrAdd"),
- new TypeAndMethod("System.Globalization.NumberFormatInfo", "GetInstance"),
- new TypeAndMethod("System.Collections.Concurrent.ConcurrentUnifierW`2", "GetOrAdd"),
- new TypeAndMethod("System.Collections.Generic.LowLevelDictionary`2", "Find"),
- new TypeAndMethod("System.Collections.Generic.LowLevelDictionary`2", "GetBucket"),
- new TypeAndMethod("System.Collections.Generic.ArraySortHelper`1", "InternalBinarySearch"),
- new TypeAndMethod("System.RuntimeExceptionHelpers", "SerializeExceptionsForDump"),
- new TypeAndMethod("System.InvokeUtils", "CheckArgument"),
- new TypeAndMethod("System.Runtime.InteropServices.ExceptionHelpers", "GetMappingExceptionForHR"),
- };
-
private void ComputeDependencyNodeDependencies(List<DependencyNodeCore<NodeFactory>> obj)
{
foreach (MethodCodeNode methodCodeNodeNeedingCode in obj)
@@ -268,17 +249,11 @@ namespace ILCompiler
try
{
- MetadataType owningType = method.OwningType as MetadataType;
- if (owningType != null && Path.DirectorySeparatorChar != '\\' && _skipJitList.Contains(new TypeAndMethod(owningType.GetFullName(), method.Name)))
- {
- throw new NotImplementedException("SkipJIT");
- }
-
_corInfo.CompileMethod(methodCodeNodeNeedingCode);
}
catch (Exception e)
{
- Log.WriteLine("*** " + e.Message + " (" + method + ")");
+ Log.WriteLine("*** " + method + ": " + e.Message);
// Call the __not_yet_implemented method
DependencyAnalysis.X64.X64Emitter emit = new DependencyAnalysis.X64.X64Emitter(_nodeFactory);