Ignore:
Timestamp:
Oct 27, 2022, 12:29:48 PM (21 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
22a0e87
Parents:
63d1ebe
Message:

Replaced Mangle::typeMode() with Mangle::mangleType(...), as it is how typeMode() was always used and it is shorter. Various other clean-up in the Mangler files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Mangler.cc

    r63d1ebe r0026d67  
    99// Author           : Richard C. Bilson
    1010// Created On       : Sun May 17 21:40:29 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jan 11 21:56:06 2021
    13 // Update Count     : 74
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Fri Oct 21 16:18:00 2022
     13// Update Count     : 75
    1414//
    1515#include "Mangler.h"
     
    418418                        void postvisit( const ast::QualifiedType * qualType );
    419419
    420                         std::string get_mangleName() { return mangleName; }
     420                        /// The result is the current constructed mangled name.
     421                        std::string result() const { return mangleName; }
    421422                  private:
    422423                        std::string mangleName;         ///< Mangled name being constructed
     
    444445        } // namespace
    445446
    446 
    447447        std::string mangle( const ast::Node * decl, Mangle::Mode mode ) {
    448                 ast::Pass<Mangler_new> mangler( mode );
    449                 maybeAccept( decl, mangler );
    450                 return mangler.core.get_mangleName();
     448                return ast::Pass<Mangler_new>::read( decl, mode );
    451449        }
    452450
     
    689687                                        } // for
    690688                                        for ( auto & assert : ptype->assertions ) {
    691                                                 ast::Pass<Mangler_new> sub_mangler(
    692                                                         mangleOverridable, typeMode, mangleGenericParams, nextVarNum, varNums );
    693                                                 assert->var->accept( sub_mangler );
    694                                                 assertionNames.push_back( sub_mangler.core.get_mangleName() );
     689                                                assertionNames.push_back( ast::Pass<Mangler_new>::read(
     690                                                        assert->var.get(),
     691                                                        mangleOverridable, typeMode, mangleGenericParams, nextVarNum, varNums ) );
    695692                                                acount++;
    696693                                        } // for
Note: See TracChangeset for help on using the changeset viewer.