Re: Compiler ABI changes and XPCOM components

Bradley Baetz <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xpcom
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
On Mon, 17 Jun 2002 22:07:35 -0700, Doug Turner <[email protected]> wrote:
> Pierre Phaneuf wrote:

>> Almost, but not quite exactly. Mangling has very little effect for XPCOM
>> interfaces, but virtual method table layout has. Specifically, the few
>> places where mangling could have any effect are probably ordinary
>> functions rather than methods and could be protected with a "C" linkage.
> 
> I don't think that we were talking about vtable layout here.  My next 
> sentence was "...that most, if not all, components that I have looked at 
> do import something from xpcom."

We're talking about both. The name mangling only affects non extern "C"
stuff, but see bug 143771 (for example).

The vtable stuff is more important, though, for the obvious reasons.

> 
>> A number of compilers have options to make virtual method tables follow
>> the Microsoft COM layout (which is documented in the COM Specification),
>> so I suppose that Mozilla should use these options as much as possible
>> (it is usually an attribute that you give to a parent-less class and
>> which is inherited).
> 
> Is there a option for this in gcc?  bbaetz?
> 

I don't think so, but I really haven't looked.

If you do that, though, then won't every app which uses mozilla have to do
that? What if that app wants to use another c++ library with the standard
ABI, then? Like nautilas, for example? IMHO, we don't want to go there, 
even if it is possible.

> 
> Doug Turner
> 

Bradley
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.