Custom calling conventions

Michel Fortin michel.fortin at
Tue Feb 21 11:54:29 PST 2012

On 2012-02-21 19:45:37 +0000, Manu <turkeyman at> said:

> On 21 February 2012 20:12, Jacob Carlborg <doob at> wrote:
>> On 2012-02-21 18:03, Manu wrote:
>>> On 21 February 2012 16:59, Michel Fortin <michel.fortin at
>>> What was the primary cause of the bloat? I can't imagine my proposal
>>> causing any more bloat than the explicit jni call (or equivalent) woudl
>>> have otherwise.
>> Template bloat. Every call bridging D/Objective-C is made throw a series
>> of templates. This is for making it possible (less verbose) to create
>> bindings.
>> It might be possible to decrease the template bloat by having a tool that
>> automatically generates the bindings and outputs what the templates do
>> inline.
> Why aren't the templates inline themselves? Although if the templates do a
> lot of work, wouldn't that INCREASE the code volume?
> I can't really imagine how Obj-C linkage could bloat so much, what was
> involved? What did you have to do in addition to what a regular Obj-C
> function call would have done?

I answered in my other post. In short: virtual functions you can 
override to override Objective-C methods.

Michel Fortin
michel.fortin at

More information about the Digitalmars-d mailing list