Early work to make it possible to call the interpreter from ReadyToRun code #2910
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This prototype implements the most basic version of ready to run support to let the interpreter to work with ready to run code. It is far from complete. Right now, it can
InterpreterPrecode
inmethod.cpp
, andstatic
,parameterless
method from ReadyToRun code to interpreter, using a few redirections.This is for Windows, x64 only.
ExternalMethodFixupWorker
to determine eventually where that will go.2.1 Create the
InterpreterMethodInfo
object and make it available through the newly introducedInterpreterImport
redirection cell, and2.2 Redirect the call to a
InterpreterStub
that will do two things:InterpreterMethodInfo
object from theInterpreterImport
redirection cell torcx
, and thenWith that the interpreter will get the interpreter method info and work on it and return to the original caller.
The
AppContext
changes are just so I can test making these calls - the math is there just to avoid optimization.To test this out, simply run any application (since it will run
AppContext
setup and fail there regardless) with the same set of environment variables as before but turn onDOTNET_ReadyToRun
.