Ignore:
Timestamp:
Dec 15, 2015, 2:56:43 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, ctor, deferred_resn, demangler, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, string, with_gc
Children:
4389966, ffad73a
Parents:
5e92fee
Message:

Switched size/align parameters over to use SymTab::Mangler in preparation for addition of generic types

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Mangler.cc

    r5e92fee r78dd0da  
    3030
    3131namespace SymTab {
    32         Mangler::Mangler( bool mangleOverridable ) : nextVarNum( 0 ), isTopLevel( true ), mangleOverridable( mangleOverridable ) {
    33         }
    34 
    35 //Mangler::Mangler( const Mangler & )
    36 //  : mangleName(), varNums( varNums ), nextVarNum( nextVarNum ), isTopLevel( isTopLevel )
    37 //{
    38 //}
     32        Mangler::Mangler( bool mangleOverridable, bool includeQualifiers )
     33                : nextVarNum( 0 ), isTopLevel( true ), mangleOverridable( mangleOverridable ), includeQualifiers(includeQualifiers) {}
     34               
    3935        Mangler::Mangler( const Mangler &rhs ) : mangleName() {
    4036                varNums = rhs.varNums;
     
    4238                isTopLevel = rhs.isTopLevel;
    4339                mangleOverridable = rhs.mangleOverridable;
     40                includeQualifiers = rhs.includeQualifiers;
    4441        }
    4542
     
    209206
    210207        void Mangler::printQualifiers( Type *type ) {
     208                // skip if not including qualifiers
     209                if ( ! includeQualifiers ) return;
     210               
    211211                if ( ! type->get_forall().empty() ) {
    212212                        std::list< std::string > assertionNames;
     
    227227                                varNums[ (*i )->get_name() ] = std::pair< int, int >( nextVarNum++, (int )(*i )->get_kind() );
    228228                                for ( std::list< DeclarationWithType* >::iterator assert = (*i )->get_assertions().begin(); assert != (*i )->get_assertions().end(); ++assert ) {
    229                                         Mangler sub_mangler( mangleOverridable );
     229                                        Mangler sub_mangler( mangleOverridable, includeQualifiers );
    230230                                        sub_mangler.nextVarNum = nextVarNum;
    231231                                        sub_mangler.isTopLevel = false;
Note: See TracChangeset for help on using the changeset viewer.