Changeset 70a1c3ae for src/SymTab


Ignore:
Timestamp:
Jan 29, 2019, 4:09:59 PM (7 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/SymTab
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Autogen.cc

    rede87c6 r70a1c3ae  
    264264                LinkageSpec::Spec spec = isIntrinsic ? LinkageSpec::Intrinsic : LinkageSpec::AutoGen;
    265265                FunctionDecl * decl = new FunctionDecl( fname, scs, spec, ftype, new CompoundStmt(),
    266                                                                                                 std::list< Attribute * >(), Type::FuncSpecifiers( Type::Inline ) );
     266                                                                                                std::vector< Attribute * >(), Type::FuncSpecifiers( Type::Inline ) );
    267267                decl->fixUniqueId();
    268268                return decl;
     
    692692                                        TypeInstType * inst = new TypeInstType( Type::Qualifiers(), newDecl->get_name(), newDecl );
    693693                                        newDecl->get_assertions().push_back( new FunctionDecl( "?=?", Type::StorageClasses(), LinkageSpec::Cforall, genAssignType( inst ), nullptr,
    694                                                                                                                                                    std::list< Attribute * >(), Type::FuncSpecifiers( Type::Inline ) ) );
     694                                                                                                                                                   std::vector< Attribute * >(), Type::FuncSpecifiers( Type::Inline ) ) );
    695695                                        newDecl->get_assertions().push_back( new FunctionDecl( "?{}", Type::StorageClasses(), LinkageSpec::Cforall, genDefaultType( inst ), nullptr,
    696                                                                                                                                                    std::list< Attribute * >(), Type::FuncSpecifiers( Type::Inline ) ) );
     696                                                                                                                                                   std::vector< Attribute * >(), Type::FuncSpecifiers( Type::Inline ) ) );
    697697                                        newDecl->get_assertions().push_back( new FunctionDecl( "?{}", Type::StorageClasses(), LinkageSpec::Cforall, genCopyType( inst ), nullptr,
    698                                                                                                                                                    std::list< Attribute * >(), Type::FuncSpecifiers( Type::Inline ) ) );
     698                                                                                                                                                   std::vector< Attribute * >(), Type::FuncSpecifiers( Type::Inline ) ) );
    699699                                        newDecl->get_assertions().push_back( new FunctionDecl( "^?{}", Type::StorageClasses(), LinkageSpec::Cforall, genDefaultType( inst ), nullptr,
    700                                                                                                                                                    std::list< Attribute * >(), Type::FuncSpecifiers( Type::Inline ) ) );
     700                                                                                                                                                   std::vector< Attribute * >(), Type::FuncSpecifiers( Type::Inline ) ) );
    701701                                        typeParams.push_back( newDecl );
    702702                                        done.insert( ty->get_baseType() );
  • src/SymTab/Validate.cc

    rede87c6 r70a1c3ae  
    912912                        // attributes are not carried over from typedef to function parameters/return values
    913913                        if ( ! inFunctionType ) {
    914                                 ret->attributes.splice( ret->attributes.end(), typeInst->attributes );
     914                                ret->attributes.insert( ret->attributes.end(), typeInst->attributes.begin(), typeInst->attributes.end() );
    915915                        } else {
    916916                                deleteAll( ret->attributes );
Note: See TracChangeset for help on using the changeset viewer.