On 3/2/13, Maxime Chevalier <[email protected]> wrote: > To access class fields in machine code generated by my JIT > compiler, I need to be able to know the offset and size of the > said fields. It seems that D requires a pointer to an instance of > the class to make this work.
Shouldn't the following work for you?
class C { int a; int[4] b; }
void main()
{
pragma(msg, C.a.sizeof);
pragma(msg, C.a.offsetof);
pragma(msg, C.b.sizeof);
pragma(msg, C.b.offsetof);
}
