mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-01 23:49:22 -06:00
Adding support for mono and NativeAOT. As for NativeAOT, we have some upstream issues need to be resolved before we can use `JitDisasmAssemblies` to print disasm for the specified assembly only, where it would fail with: ``` Unhandled exception: ILCompiler.CodeGenerationFailedException: Code generation failed for method '[S.P.CoreLib]<Module>..cctor()' ---> System.NotImplementedException: getClassModule at Internal.JitInterface.CorInfoImpl.getClassModule(CORINFO_CLASS_STRUCT_*) + 0x2b at Internal.JitInterface.CorInfoImpl._getClassModule(IntPtr, IntPtr*, CORINFO_CLASS_STRUCT_*) + 0x39 --- End of inner exception stack trace --- at Internal.JitInterface.CorInfoImpl.CompileMethodInternal(IMethodNode, MethodIL) + 0x273 at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodCodeNode, MethodIL) + 0x63 at ILCompiler.RyuJitCompilation.CompileSingleMethod(CorInfoImpl, MethodCodeNode) + 0x97 at ILCompiler.RyuJitCompilation.CompileSingleThreaded(List`1) + 0xee at ILCompiler.RyuJitCompilation.ComputeDependencyNodeDependencies(List`1) + 0x173 at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes() + 0x159 at ILCompiler.RyuJitCompilation.CompileInternal(String, ObjectDumper) + 0x26 at ILCompiler.Compilation.ILCompiler.ICompilation.Compile(String, ObjectDumper) + 0x5d at ILCompiler.Program.Run() + 0x2a55 at ILCompiler.ILCompilerRootCommand.<>c__DisplayClass240_0.<.ctor>b__0(ParseResult) + 0x321 at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult) + 0x6f ``` For now, workaround with removing `JitDisasmAssemblies` and print disasm for all assemblies instead. (see the second commit) /cc: @MichalStrehovsky We need to implement `getClassModule`, `getModuleAssembly` and `getAssemblyName` in ilc to make `JitDisasmAssemblies` work correctly. Closes #5668