Table of Contents

Delegate OnMethodCompiledCallback

Namespace
MonoMod.Core.Platforms
Assembly
MonoMod.Core.dll
A callback which is called when a method is compiled by the JIT.
public delegate void OnMethodCompiledCallback(RuntimeMethodHandle methodHandle, MethodBase? method, nint codeStart, nint codeRw, ulong codeSize)

Parameters

methodHandle RuntimeMethodHandle
The RuntimeMethodHandle of the method which was compiled.
method MethodBase
A MethodBase representing the method, if one could be found.
codeStart nint
A pointer to the start of the method code. This only represents the final location which the code will exist at.
codeRw nint
A pointer to the start of the read/write capable code. This contains the actual code data.
codeSize ulong
The size of the code.
Extension Methods

Remarks

On some runtimes, codeStart != codeRw. When this is the case, codeRw contains the actual body, which will be copied to codeStart after the hook returns.