Agenda for 16 March meeting

Martin von Loewis loewis at informatik.hu-berlin.de
Thu Mar 16 13:05:34 UTC 2000


>      Let's talk about the name reuse mechanism.  I've suggested that
>      we identify which constructs can be used as substitutes, and be
>      substituted themselves, in terms of the grammar.  If this seems
>      like a reasonable approach, let's go through the grammar in the
>      layout document and identify the acceptable substitutes.

I don't know whether you'll find the time, but I think the 'Sx'
mangling also deserves serious reconsiderations. I find the statement

# The abbreviation St is always treated as a qualifier and therefore
# does not need a N...E construct.

followed by the example

# _ZStN3_In4wardE

confusing at best, if not contradictory. I'd propose something along
the line of

<qualified-name> ::= <std-qual> <nesting-qualifier>+ <unqualified-name> E

<std-qual> ::= St
           ::= Sb
           ::= Ss

so that 'std::string' would be mangled as 'SsE', which is equivalent
to N3std12basic_stringIcN3std11char_traitsIcEEN3std9allocatorIcEEEE.
As such, it would also introduce the appropriate number of back
references, i.e.

S1 - std::basic_string<char,std::char_traits<char>,std::allocator<char>>
S2 - std::allocator<char>
S3 - char
S4 - std::allocator
S5 - std
S6 - std::char_traits<char>
S7 - char
S8 - std::char_traits
S9 - std
S10- char
S11- std::basic_string
S12- std

>   3) F-2:  Mangled name size.  Our hope has been that the substitution
>      mechanism will make further efforts unnecessary.  How do we go
>      about validating this?

If somebody gives me the longest mangled symbol ever seen in a real
project (plus the demangled version for that compiler), I can try to
remangle it with the new scheme.

>   4) F-6:  Demangler?

It is not too difficult to come up with an API, is it?

namespace abi{
  std::string demangle_mangled_name(const char*);
  std::string demangle_type(const char*);
}

which relate to the grammar productions <mangled-name> and <type>.

Regards,
Martin




More information about the cxx-abi-dev mailing list