Changeset 70a1c3ae for src/SynTree


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/SynTree
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/AggregateDecl.cc

    rede87c6 r70a1c3ae  
    2525
    2626
    27 AggregateDecl::AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes, LinkageSpec::Spec linkage ) : Parent( name, Type::StorageClasses(), linkage ), body( false ), attributes( attributes ) {
     27AggregateDecl::AggregateDecl( const std::string &name, const std::vector< Attribute * > & attributes, LinkageSpec::Spec linkage ) : Parent( name, Type::StorageClasses(), linkage ), body( false ), attributes( attributes ) {
    2828}
    2929
  • src/SynTree/ArrayType.cc

    rede87c6 r70a1c3ae  
    2424
    2525
    26 ArrayType::ArrayType( const Type::Qualifiers &tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes )
     26ArrayType::ArrayType( const Type::Qualifiers &tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::vector< Attribute * > & attributes )
    2727        : Type( tq, attributes ), base( base ), dimension( dimension ), isVarLen( isVarLen ), isStatic( isStatic ) {
    2828        base->set_lvalue( false );
  • src/SynTree/AttrType.cc

    rede87c6 r70a1c3ae  
    2525
    2626
    27 AttrType::AttrType( const Type::Qualifiers &tq, const std::string &name, Expression *expr, const std::list< Attribute * > & attributes )
     27AttrType::AttrType( const Type::Qualifiers &tq, const std::string &name, Expression *expr, const std::vector< Attribute * > & attributes )
    2828        : Type( tq, attributes ), name( name ), expr( expr ), type( 0 ), isType( false ) {
    2929}
    3030
    31 AttrType::AttrType( const Type::Qualifiers &tq, const std::string &name, Type *type, const std::list< Attribute * > & attributes )
     31AttrType::AttrType( const Type::Qualifiers &tq, const std::string &name, Type *type, const std::vector< Attribute * > & attributes )
    3232        : Type( tq, attributes ), name( name ), expr( 0 ), type( type ), isType( true ) {
    3333}
  • src/SynTree/Attribute.h

    rede87c6 r70a1c3ae  
    1919#include <list>    // for list
    2020#include <string>  // for string, operator==
     21#include <vector>
    2122
    2223#include "BaseSyntaxNode.h"
     
    5455};
    5556
    56 const std::list< Attribute * > noAttributes;
     57const std::vector< Attribute * > noAttributes;
    5758
    5859// Local Variables: //
  • src/SynTree/BasicType.cc

    rede87c6 r70a1c3ae  
    2222class Attribute;
    2323
    24 BasicType::BasicType( const Type::Qualifiers &tq, Kind bt, const std::list< Attribute * > & attributes ) : Type( tq, attributes ), kind( bt ) {}
     24BasicType::BasicType( const Type::Qualifiers &tq, Kind bt, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ), kind( bt ) {}
    2525
    2626void BasicType::print( std::ostream &os, Indenter indent ) const {
  • src/SynTree/Declaration.h

    rede87c6 r70a1c3ae  
    2020#include <list>                  // for list
    2121#include <string>                // for string, operator+, allocator, to_string
     22#include <vector>
    2223
    2324#include "BaseSyntaxNode.h"      // for BaseSyntaxNode
     
    8384
    8485        Expression *asmName;
    85         std::list< Attribute * > attributes;
     86        std::vector< Attribute * > attributes;
    8687        bool isDeleted = false;
    8788
    88         DeclarationWithType( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes, Type::FuncSpecifiers fs );
     89        DeclarationWithType( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, const std::vector< Attribute * > & attributes, Type::FuncSpecifiers fs );
    8990        DeclarationWithType( const DeclarationWithType &other );
    9091        virtual ~DeclarationWithType();
     
    101102        DeclarationWithType * set_asmName( Expression *newValue ) { asmName = newValue; return this; }
    102103
    103         std::list< Attribute * >& get_attributes() { return attributes; }
    104         const std::list< Attribute * >& get_attributes() const { return attributes; }
     104        std::vector< Attribute * >& get_attributes() { return attributes; }
     105        const std::vector< Attribute * >& get_attributes() const { return attributes; }
    105106
    106107        Type::FuncSpecifiers get_funcSpec() const { return fs; }
     
    125126
    126127        ObjectDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, Expression *bitfieldWidth, Type *type, Initializer *init,
    127                                 const std::list< Attribute * > attributes = std::list< Attribute * >(), Type::FuncSpecifiers fs = Type::FuncSpecifiers() );
     128                                const std::vector< Attribute * > attributes = std::vector< Attribute * >(), Type::FuncSpecifiers fs = Type::FuncSpecifiers() );
    128129        ObjectDecl( const ObjectDecl &other );
    129130        virtual ~ObjectDecl();
     
    155156
    156157        FunctionDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements,
    157                                   const std::list< Attribute * > attributes = std::list< Attribute * >(), Type::FuncSpecifiers fs = Type::FuncSpecifiers() );
     158                                  const std::vector< Attribute * > attributes = std::vector< Attribute * >(), Type::FuncSpecifiers fs = Type::FuncSpecifiers() );
    158159        FunctionDecl( const FunctionDecl &other );
    159160        virtual ~FunctionDecl();
     
    265266        std::list<TypeDecl*> parameters;
    266267        bool body;
    267         std::list< Attribute * > attributes;
     268        std::vector< Attribute * > attributes;
    268269        AggregateDecl * parent = nullptr;
    269270
    270         AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall );
     271        AggregateDecl( const std::string &name, const std::vector< Attribute * > & attributes = std::vector< Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall );
    271272        AggregateDecl( const AggregateDecl &other );
    272273        virtual ~AggregateDecl();
     
    275276        std::list<TypeDecl*>& get_parameters() { return parameters; }
    276277
    277         std::list< Attribute * >& get_attributes() { return attributes; }
    278         const std::list< Attribute * >& get_attributes() const { return attributes; }
     278        std::vector< Attribute * >& get_attributes() { return attributes; }
     279        const std::vector< Attribute * >& get_attributes() const { return attributes; }
    279280
    280281        bool has_body() const { return body; }
     
    290291        typedef AggregateDecl Parent;
    291292  public:
    292         StructDecl( const std::string &name, DeclarationNode::Aggregate kind = DeclarationNode::Struct, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ), kind( kind ) {}
     293        StructDecl( const std::string &name, DeclarationNode::Aggregate kind = DeclarationNode::Struct, const std::vector< Attribute * > & attributes = std::vector< Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ), kind( kind ) {}
    293294        StructDecl( const StructDecl &other ) : Parent( other ), kind( other.kind ) {}
    294295
     
    308309        typedef AggregateDecl Parent;
    309310  public:
    310         UnionDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ) {}
     311        UnionDecl( const std::string &name, const std::vector< Attribute * > & attributes = std::vector< Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ) {}
    311312        UnionDecl( const UnionDecl &other ) : Parent( other ) {}
    312313
     
    321322        typedef AggregateDecl Parent;
    322323  public:
    323         EnumDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ) {}
     324        EnumDecl( const std::string &name, const std::vector< Attribute * > & attributes = std::vector< Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ) : Parent( name, attributes, linkage ) {}
    324325        EnumDecl( const EnumDecl &other ) : Parent( other ) {}
    325326
     
    337338        typedef AggregateDecl Parent;
    338339  public:
    339         TraitDecl( const std::string &name, const std::list< Attribute * > & attributes, LinkageSpec::Spec linkage ) : Parent( name, attributes, linkage ) {
     340        TraitDecl( const std::string &name, const std::vector< Attribute * > & attributes, LinkageSpec::Spec linkage ) : Parent( name, attributes, linkage ) {
    340341                assertf( attributes.empty(), "attribute unsupported for traits" );
    341342        }
  • src/SynTree/DeclarationWithType.cc

    rede87c6 r70a1c3ae  
    2424#include "Type.h"                // for Type, Type::FuncSpecifiers, Type::St...
    2525
    26 DeclarationWithType::DeclarationWithType( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes, Type::FuncSpecifiers fs )
     26DeclarationWithType::DeclarationWithType( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, const std::vector< Attribute * > & attributes, Type::FuncSpecifiers fs )
    2727        : Declaration( name, scs, linkage ), asmName( nullptr ), attributes( attributes ), fs( fs ) {
    2828}
  • src/SynTree/FunctionDecl.cc

    rede87c6 r70a1c3ae  
    3030extern bool translation_unit_nomain;
    3131
    32 FunctionDecl::FunctionDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, std::list< Attribute * > attributes, Type::FuncSpecifiers fs )
     32FunctionDecl::FunctionDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, std::vector< Attribute * > attributes, Type::FuncSpecifiers fs )
    3333        : Parent( name, scs, linkage, attributes, fs ), type( type ), statements( statements ) {
    3434        // hack forcing the function "main" to have Cforall linkage to replace main even if it is inside an extern
  • src/SynTree/FunctionType.cc

    rede87c6 r70a1c3ae  
    2525class Attribute;
    2626
    27 FunctionType::FunctionType( const Type::Qualifiers &tq, bool isVarArgs, const std::list< Attribute * > & attributes ) : Type( tq, attributes ), isVarArgs( isVarArgs ) {
     27FunctionType::FunctionType( const Type::Qualifiers &tq, bool isVarArgs, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ), isVarArgs( isVarArgs ) {
    2828}
    2929
  • src/SynTree/Label.h

    rede87c6 r70a1c3ae  
    1919#include <list>
    2020#include <iostream>
     21#include <vector>
    2122#include "SynTree.h"
    2223
    2324class Label {
    2425  public:
    25         Label( const std::string & name = "", Statement * labelled = 0, const std::list< Attribute * > & attributes = std::list< Attribute * >() ) : name( name ), labelled( labelled ), attributes( attributes ) {}
     26        Label( const std::string & name = "", Statement * labelled = 0, const std::vector< Attribute * > & attributes = std::vector< Attribute * >() ) : name( name ), labelled( labelled ), attributes( attributes ) {}
    2627        Label( const char * name, Statement * labelled = 0 ) : name( name ), labelled( labelled ) {}
    2728
     
    3132        Statement * get_statement() const { return labelled; }
    3233        void set_statement( Statement * newValue ) { labelled = newValue; }
    33         std::list< Attribute * >& get_attributes() { return attributes; }
     34        std::vector< Attribute * >& get_attributes() { return attributes; }
    3435
    3536        operator std::string() const { return name; }
     
    3839        std::string name;
    3940        Statement * labelled;
    40         std::list< Attribute * > attributes;
     41        std::vector< Attribute * > attributes;
    4142};
    4243
  • src/SynTree/ObjectDecl.cc

    rede87c6 r70a1c3ae  
    2626#include "Type.h"                // for Type, Type::StorageClasses, Type::Fu...
    2727
    28 ObjectDecl::ObjectDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, Expression *bitfieldWidth, Type *type, Initializer *init, const std::list< Attribute * > attributes, Type::FuncSpecifiers fs )
     28ObjectDecl::ObjectDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, Expression *bitfieldWidth, Type *type, Initializer *init, const std::vector< Attribute * > attributes, Type::FuncSpecifiers fs )
    2929        : Parent( name, scs, linkage, attributes, fs ), type( type ), init( init ), bitfieldWidth( bitfieldWidth ) {
    3030}
  • src/SynTree/PointerType.cc

    rede87c6 r70a1c3ae  
    2323class Attribute;
    2424
    25 PointerType::PointerType( const Type::Qualifiers &tq, Type *base, const std::list< Attribute * > & attributes )
     25PointerType::PointerType( const Type::Qualifiers &tq, Type *base, const std::vector< Attribute * > & attributes )
    2626        : Type( tq, attributes ), base( base ), dimension( 0 ), isVarLen( false ), isStatic( false ) {
    2727}
    2828
    29 PointerType::PointerType( const Type::Qualifiers &tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes )
     29PointerType::PointerType( const Type::Qualifiers &tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::vector< Attribute * > & attributes )
    3030        : Type( tq, attributes ), base( base ), dimension( dimension ), isVarLen( isVarLen ), isStatic( isStatic ) {
    3131}
  • src/SynTree/ReferenceToType.cc

    rede87c6 r70a1c3ae  
    2727class Attribute;
    2828
    29 ReferenceToType::ReferenceToType( const Type::Qualifiers &tq, const std::string &name, const std::list< Attribute * > & attributes ) : Type( tq, attributes ), name( name ), hoistType( false ) {
     29ReferenceToType::ReferenceToType( const Type::Qualifiers &tq, const std::string &name, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ), name( name ), hoistType( false ) {
    3030}
    3131
     
    5959} // namespace
    6060
    61 StructInstType::StructInstType( const Type::Qualifiers & tq, StructDecl * baseStruct, const std::list< Attribute * > & attributes ) :
     61StructInstType::StructInstType( const Type::Qualifiers & tq, StructDecl * baseStruct, const std::vector< Attribute * > & attributes ) :
    6262                Parent( tq, baseStruct->name, attributes ), baseStruct( baseStruct ) {}
    6363
     
    102102
    103103
    104 UnionInstType::UnionInstType( const Type::Qualifiers & tq, UnionDecl * baseUnion, const std::list< Attribute * > & attributes ) :
     104UnionInstType::UnionInstType( const Type::Qualifiers & tq, UnionDecl * baseUnion, const std::vector< Attribute * > & attributes ) :
    105105                Parent( tq, baseUnion->name, attributes ), baseUnion( baseUnion ) {}
    106106
     
    145145
    146146
    147 EnumInstType::EnumInstType( const Type::Qualifiers & tq, EnumDecl * baseEnum, const std::list< Attribute * > & attributes ) :
     147EnumInstType::EnumInstType( const Type::Qualifiers & tq, EnumDecl * baseEnum, const std::vector< Attribute * > & attributes ) :
    148148                Parent( tq, baseEnum->get_name(), attributes ), baseEnum( baseEnum ) {}
    149149
     
    167167std::string TraitInstType::typeString() const { return "trait"; }
    168168
    169 TraitInstType::TraitInstType( const Type::Qualifiers & tq, TraitDecl * baseTrait, const std::list< Attribute * > & attributes ) : Parent( tq, baseTrait->name, attributes ), baseTrait( baseTrait ) {}
     169TraitInstType::TraitInstType( const Type::Qualifiers & tq, TraitDecl * baseTrait, const std::vector< Attribute * > & attributes ) : Parent( tq, baseTrait->name, attributes ), baseTrait( baseTrait ) {}
    170170
    171171TraitInstType::TraitInstType( const TraitInstType &other ) : Parent( other ), baseTrait( other.baseTrait ) {
     
    177177bool TraitInstType::isComplete() const { assert( false ); }
    178178
    179 TypeInstType::TypeInstType( const Type::Qualifiers &tq, const std::string &name, TypeDecl *baseType, const std::list< Attribute * > & attributes ) : Parent( tq, name, attributes ) {
     179TypeInstType::TypeInstType( const Type::Qualifiers &tq, const std::string &name, TypeDecl *baseType, const std::vector< Attribute * > & attributes ) : Parent( tq, name, attributes ) {
    180180        set_baseType( baseType );
    181181}
    182182
    183 TypeInstType::TypeInstType( const Type::Qualifiers &tq, const std::string &name, bool isFtype, const std::list< Attribute * > & attributes ) : Parent( tq, name, attributes ), baseType( 0 ), isFtype( isFtype ) {
     183TypeInstType::TypeInstType( const Type::Qualifiers &tq, const std::string &name, bool isFtype, const std::vector< Attribute * > & attributes ) : Parent( tq, name, attributes ), baseType( 0 ), isFtype( isFtype ) {
    184184}
    185185
  • src/SynTree/ReferenceType.cc

    rede87c6 r70a1c3ae  
    1919#include "Common/utility.h"
    2020
    21 ReferenceType::ReferenceType( const Type::Qualifiers &tq, Type *base, const std::list< Attribute * > & attributes )
     21ReferenceType::ReferenceType( const Type::Qualifiers &tq, Type *base, const std::vector< Attribute * > & attributes )
    2222        : Type( tq, attributes ), base( base ) {
    2323        assertf( base, "Reference Type with a null base created." );
  • src/SynTree/TupleType.cc

    rede87c6 r70a1c3ae  
    2525class Attribute;
    2626
    27 TupleType::TupleType( const Type::Qualifiers &tq, const std::list< Type * > & types, const std::list< Attribute * > & attributes ) : Type( tq, attributes ), types( types ) {
     27TupleType::TupleType( const Type::Qualifiers &tq, const std::list< Type * > & types, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ), types( types ) {
    2828        for ( Type * t : *this ) {
    2929                // xxx - this is very awkward. TupleTypes should contain objects so that members can be named, but if they don't have an initializer node then
  • src/SynTree/Type.cc

    rede87c6 r70a1c3ae  
    5656);
    5757
    58 Type::Type( const Qualifiers &tq, const std::list< Attribute * > & attributes ) : tq( tq ), attributes( attributes ) {}
     58Type::Type( const Qualifiers &tq, const std::vector< Attribute * > & attributes ) : tq( tq ), attributes( attributes ) {}
    5959
    6060Type::Type( const Type &other ) : BaseSyntaxNode( other ), tq( other.tq ) {
  • src/SynTree/Type.h

    rede87c6 r70a1c3ae  
    2121#include <ostream>           // for ostream, operator<<, basic_ostream
    2222#include <string>            // for string
     23#include <vector>
    2324
    2425#include "BaseSyntaxNode.h"  // for BaseSyntaxNode
     
    137138        Qualifiers tq;
    138139        ForallList forall;
    139         std::list< Attribute * > attributes;
    140 
    141         Type( const Qualifiers & tq, const std::list< Attribute * > & attributes );
     140        std::vector< Attribute * > attributes;
     141
     142        Type( const Qualifiers & tq, const std::vector< Attribute * > & attributes );
    142143        Type( const Type & other );
    143144        virtual ~Type();
     
    159160        ForallList& get_forall() { return forall; }
    160161
    161         std::list< Attribute * >& get_attributes() { return attributes; }
    162         const std::list< Attribute * >& get_attributes() const { return attributes; }
     162        std::vector< Attribute * >& get_attributes() { return attributes; }
     163        const std::vector< Attribute * >& get_attributes() const { return attributes; }
    163164
    164165        /// How many elemental types are represented by this type
     
    194195class VoidType : public Type {
    195196  public:
    196         VoidType( const Type::Qualifiers & tq, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     197        VoidType( const Type::Qualifiers & tq, const std::vector< Attribute * > & attributes = std::vector< Attribute * >() );
    197198
    198199        virtual unsigned size() const override { return 0; };
     
    238239        static const char *typeNames[];                                         // string names for basic types, MUST MATCH with Kind
    239240
    240         BasicType( const Type::Qualifiers & tq, Kind bt, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     241        BasicType( const Type::Qualifiers & tq, Kind bt, const std::vector< Attribute * > & attributes = std::vector< Attribute * >() );
    241242
    242243        Kind get_kind() { return kind; }
     
    260261        bool isStatic;
    261262
    262         PointerType( const Type::Qualifiers & tq, Type *base, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    263         PointerType( const Type::Qualifiers & tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     263        PointerType( const Type::Qualifiers & tq, Type *base, const std::vector< Attribute * > & attributes = std::vector< Attribute * >() );
     264        PointerType( const Type::Qualifiers & tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::vector< Attribute * > & attributes = std::vector< Attribute * >() );
    264265        PointerType( const PointerType& );
    265266        virtual ~PointerType();
     
    291292        bool isStatic;
    292293
    293         ArrayType( const Type::Qualifiers & tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     294        ArrayType( const Type::Qualifiers & tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::vector< Attribute * > & attributes = std::vector< Attribute * >() );
    294295        ArrayType( const ArrayType& );
    295296        virtual ~ArrayType();
     
    334335        Type *base;
    335336
    336         ReferenceType( const Type::Qualifiers & tq, Type *base, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     337        ReferenceType( const Type::Qualifiers & tq, Type *base, const std::vector< Attribute * > & attributes = std::vector< Attribute * >() );
    337338        ReferenceType( const ReferenceType & );
    338339        virtual ~ReferenceType();
     
    367368        bool isVarArgs;
    368369
    369         FunctionType( const Type::Qualifiers & tq, bool isVarArgs, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     370        FunctionType( const Type::Qualifiers & tq, bool isVarArgs, const std::vector< Attribute * > & attributes = std::vector< Attribute * >() );
    370371        FunctionType( const FunctionType& );
    371372        virtual ~FunctionType();
     
    391392        bool hoistType;
    392393
    393         ReferenceToType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes );
     394        ReferenceToType( const Type::Qualifiers & tq, const std::string & name, const std::vector< Attribute * > & attributes );
    394395        ReferenceToType( const ReferenceToType & other );
    395396        virtual ~ReferenceToType();
     
    418419        StructDecl *baseStruct;
    419420
    420         StructInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ), baseStruct( 0 ) {}
    421         StructInstType( const Type::Qualifiers & tq, StructDecl * baseStruct, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     421        StructInstType( const Type::Qualifiers & tq, const std::string & name, const std::vector< Attribute * > & attributes = std::vector< Attribute * >()  ) : Parent( tq, name, attributes ), baseStruct( 0 ) {}
     422        StructInstType( const Type::Qualifiers & tq, StructDecl * baseStruct, const std::vector< Attribute * > & attributes = std::vector< Attribute * >()  );
    422423        StructInstType( const StructInstType & other ) : Parent( other ), baseStruct( other.baseStruct ) {}
    423424
     
    455456        UnionDecl *baseUnion;
    456457
    457         UnionInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ), baseUnion( 0 ) {}
    458         UnionInstType( const Type::Qualifiers & tq, UnionDecl * baseUnion, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     458        UnionInstType( const Type::Qualifiers & tq, const std::string & name, const std::vector< Attribute * > & attributes = std::vector< Attribute * >()  ) : Parent( tq, name, attributes ), baseUnion( 0 ) {}
     459        UnionInstType( const Type::Qualifiers & tq, UnionDecl * baseUnion, const std::vector< Attribute * > & attributes = std::vector< Attribute * >()  );
    459460        UnionInstType( const UnionInstType & other ) : Parent( other ), baseUnion( other.baseUnion ) {}
    460461
     
    492493        EnumDecl *baseEnum = nullptr;
    493494
    494         EnumInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ) {}
    495         EnumInstType( const Type::Qualifiers & tq, EnumDecl * baseEnum, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     495        EnumInstType( const Type::Qualifiers & tq, const std::string & name, const std::vector< Attribute * > & attributes = std::vector< Attribute * >()  ) : Parent( tq, name, attributes ) {}
     496        EnumInstType( const Type::Qualifiers & tq, EnumDecl * baseEnum, const std::vector< Attribute * > & attributes = std::vector< Attribute * >()  );
    496497        EnumInstType( const EnumInstType & other ) : Parent( other ), baseEnum( other.baseEnum ) {}
    497498
     
    519520        TraitDecl * baseTrait = nullptr;
    520521
    521         TraitInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >() ) : Parent( tq, name, attributes ) {}
    522         TraitInstType( const Type::Qualifiers & tq, TraitDecl * baseTrait, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     522        TraitInstType( const Type::Qualifiers & tq, const std::string & name, const std::vector< Attribute * > & attributes = std::vector< Attribute * >() ) : Parent( tq, name, attributes ) {}
     523        TraitInstType( const Type::Qualifiers & tq, TraitDecl * baseTrait, const std::vector< Attribute * > & attributes = std::vector< Attribute * >() );
    523524        TraitInstType( const TraitInstType & other );
    524525        ~TraitInstType();
     
    541542        bool isFtype;
    542543
    543         TypeInstType( const Type::Qualifiers & tq, const std::string & name, TypeDecl *baseType, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
    544         TypeInstType( const Type::Qualifiers & tq, const std::string & name, bool isFtype, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     544        TypeInstType( const Type::Qualifiers & tq, const std::string & name, TypeDecl *baseType, const std::vector< Attribute * > & attributes = std::vector< Attribute * >()  );
     545        TypeInstType( const Type::Qualifiers & tq, const std::string & name, bool isFtype, const std::vector< Attribute * > & attributes = std::vector< Attribute * >()  );
    545546        TypeInstType( const TypeInstType & other );
    546547        ~TypeInstType();
     
    566567        std::list<Declaration *> members;
    567568
    568         TupleType( const Type::Qualifiers & tq, const std::list< Type * > & types, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     569        TupleType( const Type::Qualifiers & tq, const std::list< Type * > & types, const std::vector< Attribute * > & attributes = std::vector< Attribute * >()  );
    569570        TupleType( const TupleType& );
    570571        virtual ~TupleType();
     
    601602        bool is_basetypeof;  ///< true iff is basetypeof type
    602603
    603         TypeofType( const Type::Qualifiers & tq, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    604         TypeofType( const Type::Qualifiers & tq, Expression *expr, bool is_basetypeof, 
    605                 const std::list< Attribute * > & attributes = std::list< Attribute * >() );
     604        TypeofType( const Type::Qualifiers & tq, Expression *expr, const std::vector< Attribute * > & attributes = std::vector< Attribute * >() );
     605        TypeofType( const Type::Qualifiers & tq, Expression *expr, bool is_basetypeof,
     606                const std::vector< Attribute * > & attributes = std::vector< Attribute * >() );
    606607        TypeofType( const TypeofType& );
    607608        virtual ~TypeofType();
     
    625626        bool isType;
    626627
    627         AttrType( const Type::Qualifiers & tq, const std::string & name, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
    628         AttrType( const Type::Qualifiers & tq, const std::string & name, Type *type, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     628        AttrType( const Type::Qualifiers & tq, const std::string & name, Expression *expr, const std::vector< Attribute * > & attributes = std::vector< Attribute * >() );
     629        AttrType( const Type::Qualifiers & tq, const std::string & name, Type *type, const std::vector< Attribute * > & attributes = std::vector< Attribute * >()  );
    629630        AttrType( const AttrType& );
    630631        virtual ~AttrType();
     
    651652  public:
    652653        VarArgsType();
    653         VarArgsType( Type::Qualifiers tq, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     654        VarArgsType( Type::Qualifiers tq, const std::vector< Attribute * > & attributes = std::vector< Attribute * >()  );
    654655
    655656        virtual bool isComplete() const override{ return true; } // xxx - is this right?
     
    665666  public:
    666667        ZeroType();
    667         ZeroType( Type::Qualifiers tq, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     668        ZeroType( Type::Qualifiers tq, const std::vector< Attribute * > & attributes = std::vector< Attribute * >()  );
    668669
    669670        virtual ZeroType *clone() const override { return new ZeroType( *this ); }
     
    677678  public:
    678679        OneType();
    679         OneType( Type::Qualifiers tq, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
     680        OneType( Type::Qualifiers tq, const std::vector< Attribute * > & attributes = std::vector< Attribute * >()  );
    680681
    681682        virtual OneType *clone() const override { return new OneType( *this ); }
  • src/SynTree/TypeofType.cc

    rede87c6 r70a1c3ae  
    2323class Attribute;
    2424
    25 TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, 
    26         const std::list< Attribute * > & attributes )
     25TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr,
     26        const std::vector< Attribute * > & attributes )
    2727: Type( tq, attributes ), expr( expr ), is_basetypeof(false) {}
    2828
    29 TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, bool is_basetypeof, 
    30         const std::list< Attribute * > & attributes )
     29TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, bool is_basetypeof,
     30        const std::vector< Attribute * > & attributes )
    3131: Type( tq, attributes ), expr( expr ), is_basetypeof( is_basetypeof ) {}
    3232
  • src/SynTree/VarArgsType.cc

    rede87c6 r70a1c3ae  
    2121class Attribute;
    2222
    23 VarArgsType::VarArgsType() : Type( Type::Qualifiers(), std::list< Attribute * >() ) {}
     23VarArgsType::VarArgsType() : Type( Type::Qualifiers(), std::vector< Attribute * >() ) {}
    2424
    25 VarArgsType::VarArgsType( Type::Qualifiers tq, const std::list< Attribute * > & attributes ) : Type( tq, attributes ) {}
     25VarArgsType::VarArgsType( Type::Qualifiers tq, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ) {}
    2626
    2727void VarArgsType::print( std::ostream &os, Indenter indent ) const {
  • src/SynTree/VoidType.cc

    rede87c6 r70a1c3ae  
    2121class Attribute;
    2222
    23 VoidType::VoidType( const Type::Qualifiers &tq, const std::list< Attribute * > & attributes ) : Type( tq, attributes ) {
     23VoidType::VoidType( const Type::Qualifiers &tq, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ) {
    2424}
    2525
  • src/SynTree/ZeroOneType.cc

    rede87c6 r70a1c3ae  
    2121class Attribute;
    2222
    23 ZeroType::ZeroType() : Type( Type::Qualifiers(), std::list< Attribute * >() ) {}
     23ZeroType::ZeroType() : Type( Type::Qualifiers(), std::vector< Attribute * >() ) {}
    2424
    25 ZeroType::ZeroType( Type::Qualifiers tq, const std::list< Attribute * > & attributes ) : Type( tq, attributes ) {}
     25ZeroType::ZeroType( Type::Qualifiers tq, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ) {}
    2626
    2727void ZeroType::print( std::ostream &os, Indenter ) const {
     
    2929}
    3030
    31 OneType::OneType() : Type( Type::Qualifiers(), std::list< Attribute * >() ) {}
     31OneType::OneType() : Type( Type::Qualifiers(), std::vector< Attribute * >() ) {}
    3232
    33 OneType::OneType( Type::Qualifiers tq, const std::list< Attribute * > & attributes ) : Type( tq, attributes ) {}
     33OneType::OneType( Type::Qualifiers tq, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ) {}
    3434
    3535void OneType::print( std::ostream &os, Indenter ) const {
Note: See TracChangeset for help on using the changeset viewer.