Mangling: initial attempt

Daveed Vandevoorde daveed at edg.com
Mon Jan 24 17:35:30 UTC 2000


Martin von Loewis wrote:
> 
> > For template functions, <type> lists the return type followed by the
> > parameter types.
> 
> Why is it necessary to have the return type in a template function
> instance?

Because you can have multiple function template that differ only by
return types (and you can instantiate/call them by taking their address).

Isn't that cool in a devious kindof way <grin> ?

> Also, for covariant returns, there will be two entries in the
> vtable. Shouldn't there be the return type in virtual functions which
> return covariantly?

That might be the best option.  I haven't thought much about the
impact of virtual tables on the mangling yet.  But what you say
sound right.

> > 12) "_11fQ1N": Ret? N::f();
> 
> This should be _11fQ1NE.
> 
> > 13) "_14beepQ6System5Sound: Ret? System::Sound::beep();
> 
> Likewise, this shoud be _14beepQ6System5SoundE.

You're right.  At first, I intended to have Q...E segments for all
qualified names.  However, that led to some ambiguity.  So now there
is a different N...E segment, and only the last segment is Q...E.
So in fact we can drop the last E since it is implicit in the end
of the string.

What do you think?

	Daveed




More information about the cxx-abi-dev mailing list