www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Assembler and Delegates

What is the correct way to invoke a delegate from inline assembler?  Also, where
does the this pointer go when I am calling a function in an object?

In C++ the following would work,

mov ECX, [object pointer];
// Push arguments
call class_method;

But in D, I'm not so sure what is going on.  It seems like EAX gets the pointer
in most cases, but I can't be certain that this is always true.  It is possible
that it is just another parameter, in which case is it the first or the last?
Also, I'm not positive on the memory layout of the delegate object.

Any info at all would be much appreciated.
Nov 28 2005