local names

Alex Samuel samuel at indetermi.net
Fri Sep 1 22:51:25 UTC 2000


Jim,

I think we're in violent agreement -- at least on the mangling scheme,
if not how to express it in writing.  I come up with all the same
manglings you do for your examples.

For instance,

  Jim> Finally, Mark's original example, which has two <local-name>
  Jim> levels:
  ...
  Jim> yielding the final result:
  Jim>	Z Z 3foo v E N 1C 3bar E v E N 1D 3baz E v

this is the same mangling I submitted with this example.  (I was the
one who invented this monstrosity -- does Mark automatically get
blamed for all the horrendous pathological cases now? ;)

My point is that in none of your three examples did you use the
production <component> ::= <local-name> (unless I am egregiously
misinterpreting your notation), and I maintain it's not necessary.  It
only confuses the issue that you address with

  Jim> The key difference from the original "problem" is, I think,
  Jim> that I do not think that the base function name should be
  Jim> considered part of the entity name.

That's what I meant in my first message about this when I wrote

  Alex>  - When invoking <entity name> from <local-name>, the
  Alex>    expansion of <name> needs to stop at the innermost
  Alex>    function scope, to prevent an infinite recusion.

In the first example, the <components> are (left to right) `1C' and
`1D'.  In the second example, they are `1C', `3foo', and `1D'.  In the
third example, they are `3foo', `1C', `3bar', `1D', and `3baz'.  None
of these are <local-names>; observe that a <local-name> must begin
with a `Z'.  Instead, they're just plain <source-name>s (via
<unqualified-name>).

Regards
Alex




More information about the cxx-abi-dev mailing list