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
InterpreterPrecodeinmethod.cpp, andstatic,parameterlessmethod from ReadyToRun code to interpreter, using a few redirections.This is for Windows, x64 only.
ExternalMethodFixupWorkerto determine eventually where that will go.2.1 Create the
InterpreterMethodInfoobject and make it available through the newly introducedInterpreterImportredirection cell, and2.2 Redirect the call to a
InterpreterStubthat will do two things:InterpreterMethodInfoobject from theInterpreterImportredirection cell torcx, and thenWith that the interpreter will get the interpreter method info and work on it and return to the original caller.
The
AppContextchanges 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
AppContextsetup and fail there regardless) with the same set of environment variables as before but turn onDOTNET_ReadyToRun.