Open
Description
This issue tracks required work and progress for the porting of the mono interpreter to CoreCLR. The end goal of this issue is to be able to run entire test suites in full interpreter mode (without any JIT/AOT) on desktop platforms (ex. arm64 linux). This issue will be updated on the fly as the implementation progresses.
M1 - basic compilation and interpreting support of a simple method
- interp wire-in Initial interpreter wire-in #112202 CoreCLR interpreter basic compilation and execution #112369
- interp executor in libcoreclr CoreCLR interpreter basic compilation and execution #112369
- interpreter runtime test CoreCLR interpreter basic compilation and execution #112369
M2 - stress tests involving object manipulation
- constant loads and unchecked binops Expand capability of CoreCLR Interpreter #113292
- ldlocal/ldarg Expand capability of CoreCLR Interpreter #113292
- static direct calls Expand capability of CoreCLR Interpreter #113292
- full var offset allocator Expand capability of CoreCLR Interpreter #113292
- basic block formation and implementation of branch opcodes Expand capability of CoreCLR Interpreter #113292
- newobj creation Add field access support to CoreCLR Interpreter #114049
- field access opcodes Add field access support to CoreCLR Interpreter #114049
- indirect load/store opcodes Add field access support to CoreCLR Interpreter #114049
- precise GC scanning Interpreter GC info stage 3: Report locals to the GC #114469
- GC safepoints [clr-interp] Add safepoints at method entry and backwards branch #115567
- conversion opcodes Expand capability of CoreCLR Interpreter #113292
- valuetypes (locals, fields, ctor) Add field access support to CoreCLR Interpreter #114049
- basic generics working ?
- static fields Add field access support to CoreCLR Interpreter #114049
M3 - EH and interpreter calls
- basic non exceptional path for try/finally/leave
- exception throw support and resume to correct handler clause
- implement invocation of finally/filter clauses from EH
- null checks and ovf opcodes
- interp virtual call support [clr-interp] Add support for virtual method calls #114529
- interp interface call support [clr-interp] Add support for virtual method calls #114529
- direct calls to non-interp code Interpreter to JIT/AOT calls #115375
M4 - mixing with compiled code
- figure out separation between interp/jit/R2R code for testing purposes
- calli and ldftn with interpreter target method
- calli and ldftn with jitted target method
- delegate creation and invocation with interpreter target method
- other delegate scenarios, passing it between interp/jit with either interpreted or jitted target method
M5 - pinvoke support, full interpreter support for Hello World
- implement pinvoke support Interpreter P/Invoke support #115393
- implement reverse pinvoke support
- bugfixes and feature support for
Console.WriteLine("Hello World")
in full interpreter mode
M6 - IL opcodes for CoreCLR startup ordered by number of occurrences:
- array support [clr-interp] Implement array support for primitive types #115553
- ldlen
- newarr
- stelem
- ldelem
- array ref support
- ldelema
- ldelem.ref
- stelem.ref
- ldtoken Implement ldtoken in the interpreter #115723
- isinst, castclass
- box, unbox [WIP] Interpreter boxing/unboxing #115549
- sizeof Implement sizeof() in the interpreter #115745
- ldobj, stobj Implement CEE_LDOBJ and CEE_STOBJ in the interpreter #115900
- cpobj
- localloc [clr-interp] Implement
CEE_LOCALLOC
and frame data allocator for dynamic stack allocations #114860 - floating point conversion opcodes
- mkrefany, refanyval, refanytype
- cpblk, initblk
- constrained calls
- volatile prefix and memory barriers
- tailcall prefix
- readonly prefix
- bugfixes and feature support for test suites
- ldc.r8 with double.MinValue return NaN
Nice to have refactorings/improvements that are out of scope of this project:
- Remove the usage of StackType, we could rely exclusively on the InterpType instead
- Optimize reimportation. Use a graph clique approach similar to RyuJIT, rather than naive retries.