This is the mail archive of the
mailing list for the GCC project.
Re: C++ and Java CNI: Check Java references
- To: "James Mansion" <james at westongold dot com>
- Subject: Re: C++ and Java CNI: Check Java references
- From: Jason Merrill <jason_merrill at redhat dot com>
- Date: 14 May 2001 00:40:01 +0200
- Cc: gcc at gcc dot gnu dot org
- References: <ODEEJFFGLIBKGLFBJHOIIEGEDMAA.email@example.com>
>>>>> "James" == James Mansion <firstname.lastname@example.org> writes:
>> Just to be pedantic, it's impossible to eliminate the abstraction penalty
>> when the ABI is different for passing a pointer v. a smart pointer. But if
>> you can inline most of the uses it shouldn't be a big deal.
> Isn't this exactly why its so worthwhile to have an ability to tag
> functions as 'fast_call' or whatever, guaranteeing that the compiler
> at the call site and implementation are 'the same' and so the call
> can be made more efficiently for pass/return of small structs?
I suspect the benefit would be small; smart pointers are usually passed by
invisible reference not just because they're structs, but because they have
> Its gross to have smart pointers passed differently within a
> system where the binary representation is identical to a single
> pointer. Also painful to pass pair<> (or similar) objects around
> by reference - even an x86 has enough registers to be worthwhile.
The normal x86 calling convention doesn't pass any arguments in registers.