Mangling: initial attempt

Martin von Loewis loewis at informatik.hu-berlin.de
Mon Jan 24 18:46:15 UTC 2000


> 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> ?

Very interesting indeed - learn something new about C++ every day.

> 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?

It seems that would work. However, I feel it is inconsistent to use
one way of qualifying for nested names, and another way for the
toplevel name. Instead, I'd say that, instead of

  <prefix><length><name>

you have

  <prefix><identifier>

and <identifier> is either

  <length><name>
or
  Q{<length><name>}*E

So instead of _11fQ1N, you get _1Q1N1fE. So method name would be
mangled just as a class name.

Regards,
Martin




More information about the cxx-abi-dev mailing list