Changeset 70a1c3ae for src/CodeGen


Ignore:
Timestamp:
Jan 29, 2019, 4:09:59 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
no_list
Children:
bee0694
Parents:
ede87c6
Message:

Starting to remove std::list to see if it affects performance, started with List of attributes

Location:
src/CodeGen
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    rede87c6 r70a1c3ae  
    129129        }
    130130
    131         void CodeGenerator::genAttributes( list< Attribute * > & attributes ) {
     131        void CodeGenerator::genAttributes( vector< Attribute * > & attributes ) {
    132132          if ( attributes.empty() ) return;
    133133                output << "__attribute__ ((";
    134                 for ( list< Attribute * >::iterator attr( attributes.begin() );; ) {
     134                for ( vector< Attribute * >::iterator attr( attributes.begin() );; ) {
    135135                        output << (*attr)->name;
    136136                        if ( ! (*attr)->parameters.empty() ) {
  • src/CodeGen/CodeGenerator.h

    rede87c6 r70a1c3ae  
    118118                void postvisit( ImplicitCtorDtorStmt * );
    119119
    120                 void genAttributes( std::list< Attribute * > & attributes );
     120                void genAttributes( std::vector< Attribute * > & attributes );
    121121
    122122                template< class Iterator > void genCommaList( Iterator begin, Iterator end );
Note: See TracChangeset for help on using the changeset viewer.