Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cxx-abi-dev] Name mangling question


  • To: loewis@xxxxxxxxxxxxxxxxxxxxxxx (Martin v. Löwis)
  • Subject: Re: [cxx-abi-dev] Name mangling question
  • From: nasgaard@xxxxxxxxxx
  • Date: Wed, 27 Nov 2002 12:12:18 -0500

Ok...This is making more sense now.  Based on what you are saying we have
not interpreted the document correctly.
We interpreted it as having to walk the other productions first, then look
for a substitution for what was generated by the production.  That's how we
got to <nested name> before <substitution>.

Howard W. Nasgaard
C++ Compiler Development
e-mail: nasgaard@xxxxxxxxxx
C2/KD2/8200/MKM
905-413-3683
Tie: 969-3683



                                                                                                                                                    
                      loewis@xxxxxxxxxxxx                                                                                                           
                      u-berlin.de (Martin        To:       Howard Nasgaard/Toronto/IBM@IBMCA                                                        
                      v. Löwis)                  cc:       Mark Mitchell <mark@xxxxxxxxxxxxxxxx>, cxx-abi-dev@xxxxxxxxxxxxxxxx                      
                                                 Subject:  Re: [cxx-abi-dev] Name mangling question                                                 
                      11/27/2002 11:59 AM                                                                                                           
                                                                                                                                                    
                                                                                                                                                    



nasgaard@xxxxxxxxxx writes:

> Here the mangled name is _ZN6locale5_Impl3fooERNS_3BarE.  Note the N...E.
> Unless I have a gross misunderstanding (which is possible) we build up
the
> type by following productions through type and nested name.  Then, after
> building a name we look for a substitution.

No. You do that vice versa. You first look for substitutions, then you
start
mangling. This is necessary because, after substitution, you may find that
your identifier which was originally nested is not nested anymore. You emit
a nested-name only if it is still nested after substitutions.

So while you go through <type>, you don't go through <nested-name>;
instead,
you go through <substition>.

Regards,
Martin