Is it possible to include JIT in my code in some .NET assembly code?

I would like to understand how ubiquitous the inline JIT can be.

Suppose in my code I call some function from say System.IOassembly and pass a callback link to the function implemented in my code to call from this function System.IO. There is a call in my function GetCallingAssembly(). Therefore, if my callback is inserted into System.IO, the call GetCallingAssembly()that was originally in my code and was intended to say that the "current" method is called from the inside System.IOwill say that it is now called from my code.

Is it possible that such an attachment or .NET runtime assemblies are handled differently so that JIT embedding of user code in .NET runtime code is not allowed?

+5
source share
1 answer

We can safely assume that the callback will not be nested. .NET Framework assemblies are always set by ngen.exe during installation, after which there is no way to modify this code. In addition, delegate callbacks are never enabled, even if the jitter optimizer can determine what the delegate assignment method will be.

+3
source

All Articles