RuntimeInformation(https://github.com/lambdageek/mono/blob/mjit/mcs/class/Mono.Compiler/Mono.Compiler/RuntimeInformation.cs#L55) such as
ComputeStaticFieldAddressthat call into the runtime to get the required info. A more involved example (that we didn't get to during hack week) might be for a call from one method to another - in that case we would need to provide an internal call method where we could query the runtime for the address of the callee if it has already been JITed, or else cooperate on setting up a trampoline to JIT the callee the first time it is needed.
MONO_EXPERIMENTSlanded, I was planning on spending some time to make a PR of just the native/managed interface for mjit. In the short term I don't think I can find the time to do it, however.
if (llvm)and it would be nice to have a reason to make that go through a consistent set of indirection
git diff origin/master
method-to-ir.c. This file is essentially the front-end to the "Mini JIT compiler"
mini-runtime.c(yeah... the naming is... confusing)
method-to-ir.cbecause I know a little about the mini jit, in contrast to LLVM jit. I will dive into
mini-runtime.cnow to get more familiar with the whole process.
MONO_CEE_MONO_JIT_ATTACHis another good example of "misleading names" :sweat_smile: JIT in that context means a thread that runs managed code (with the JIT). these days the JIT could be AOT'd code or the interpreter... so the name of this opcode should really be