Custom calling conventions

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Feb 21 12:33:31 PST 2012


On Tue, Feb 21, 2012 at 08:01:11PM +0000, Iain Buclaw wrote:
> On 21 February 2012 17:10, Manu <turkeyman at gmail.com> wrote:
[...]
> > With the (typically VM based) languages I was referring to, there's
> > no direct linkage, all communication must be via some API, so the
> > intrinsic knowledge of foreign structures is not necessary in that
> > case. You would always need to understand the layout or contents of
> > foreign structures via some sort of marshalling api/class, since the
> > VM is free to do whatever it likes internally.

Doesn't JNI define the standards as to how things are laid out?


> You will need to know where things are with Java Classes, so I would
> have thought that would be a very problematical issue for you...
> Although D (gdc) follows a similiar but not identical ABI to Java
> (vtable should be located in the same area).
[...]

Can Java data structures even be mapped to D types at all? Don't you
already have to marshall/translate data structures anyway?


T

-- 
"Real programmers can write assembly code in any language. :-)" -- Larry Wall


More information about the Digitalmars-d mailing list