Changeset 8c49c0e for src/SymTab


Ignore:
Timestamp:
Sep 19, 2016, 4:39:33 PM (8 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
aefcc3b
Parents:
3c13c03
Message:

decouple code that uses Type's forall list from std::list in preparation for trying to replace with a managed list

Location:
src/SymTab
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Indexer.cc

    r3c13c03 r8c49c0e  
    143143                for ( DeclarationWithType * decl : copy ) {
    144144                        if ( FunctionDecl * function = dynamic_cast< FunctionDecl * >( decl ) ) {
    145                                 std::list< DeclarationWithType * > params = function->get_functionType()->get_parameters();
     145                                std::list< DeclarationWithType * > & params = function->get_functionType()->get_parameters();
    146146                                assert( ! params.empty() );
    147147                                // use base type of pointer, so that qualifiers on the pointer type aren't considered.
  • src/SymTab/Mangler.cc

    r3c13c03 r8c49c0e  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // Mangler.cc -- 
     7// Mangler.cc --
    88//
    99// Author           : Richard C. Bilson
     
    3535                return mangler.get_mangleName();
    3636        }
    37        
     37
    3838        Mangler::Mangler( bool mangleOverridable, bool typeMode )
    3939                : nextVarNum( 0 ), isTopLevel( true ), mangleOverridable( mangleOverridable ), typeMode( typeMode ) {}
    40                
     40
    4141        Mangler::Mangler( const Mangler &rhs ) : mangleName() {
    4242                varNums = rhs.varNums;
     
    115115                        "Ir",   // LongDoubleImaginary
    116116                };
    117  
     117
    118118                printQualifiers( basicType );
    119119                mangleName << btLetter[ basicType->get_kind() ];
     
    245245                // skip if not including qualifiers
    246246                if ( typeMode ) return;
    247                
     247
    248248                if ( ! type->get_forall().empty() ) {
    249249                        std::list< std::string > assertionNames;
    250250                        int tcount = 0, dcount = 0, fcount = 0;
    251251                        mangleName << "A";
    252                         for ( std::list< TypeDecl* >::iterator i = type->get_forall().begin(); i != type->get_forall().end(); ++i ) {
     252                        for ( Type::ForallList::iterator i = type->get_forall().begin(); i != type->get_forall().end(); ++i ) {
    253253                                switch ( (*i)->get_kind() ) {
    254254                                  case TypeDecl::Any:
  • src/SymTab/Validate.cc

    r3c13c03 r8c49c0e  
    429429        /// Fix up assertions
    430430        void forallFixer( Type *func ) {
    431                 for ( std::list< TypeDecl * >::iterator type = func->get_forall().begin(); type != func->get_forall().end(); ++type ) {
     431                for ( Type::ForallList::iterator type = func->get_forall().begin(); type != func->get_forall().end(); ++type ) {
    432432                        std::list< DeclarationWithType * > toBeDone, nextRound;
    433433                        toBeDone.splice( toBeDone.end(), (*type )->get_assertions() );
Note: See TracChangeset for help on using the changeset viewer.