[Mono-list] Reference runtime internal variable in managed code
Miguel de Icaza
27 Aug 2003 18:05:01 -0400
> I can certainly do the patching in "mono_method_to_ir()". But the problem is
> how I can enable such condition check from user code to internal data
> structure of the runtime. And do it quickly.
There are plenty of ways of doing this.
Look at how the marshal.c file generates on the flight IL code to do the
marshaling. Accessing a runtime variable is simple: load the address of
the variable, and then do a dereference, something like:
Or you could generate the X86 code directly in the code emitter as well.