Changeset 70a1c3ae for src/SynTree
- Timestamp:
- Jan 29, 2019, 4:09:59 PM (5 years ago)
- Branches:
- no_list
- Children:
- bee0694
- Parents:
- ede87c6
- Location:
- src/SynTree
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/AggregateDecl.cc
rede87c6 r70a1c3ae 25 25 26 26 27 AggregateDecl::AggregateDecl( const std::string &name, const std:: list< Attribute * > & attributes, LinkageSpec::Spec linkage ) : Parent( name, Type::StorageClasses(), linkage ), body( false ), attributes( attributes ) {27 AggregateDecl::AggregateDecl( const std::string &name, const std::vector< Attribute * > & attributes, LinkageSpec::Spec linkage ) : Parent( name, Type::StorageClasses(), linkage ), body( false ), attributes( attributes ) { 28 28 } 29 29 -
src/SynTree/ArrayType.cc
rede87c6 r70a1c3ae 24 24 25 25 26 ArrayType::ArrayType( const Type::Qualifiers &tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std:: list< Attribute * > & attributes )26 ArrayType::ArrayType( const Type::Qualifiers &tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::vector< Attribute * > & attributes ) 27 27 : Type( tq, attributes ), base( base ), dimension( dimension ), isVarLen( isVarLen ), isStatic( isStatic ) { 28 28 base->set_lvalue( false ); -
src/SynTree/AttrType.cc
rede87c6 r70a1c3ae 25 25 26 26 27 AttrType::AttrType( const Type::Qualifiers &tq, const std::string &name, Expression *expr, const std:: list< Attribute * > & attributes )27 AttrType::AttrType( const Type::Qualifiers &tq, const std::string &name, Expression *expr, const std::vector< Attribute * > & attributes ) 28 28 : Type( tq, attributes ), name( name ), expr( expr ), type( 0 ), isType( false ) { 29 29 } 30 30 31 AttrType::AttrType( const Type::Qualifiers &tq, const std::string &name, Type *type, const std:: list< Attribute * > & attributes )31 AttrType::AttrType( const Type::Qualifiers &tq, const std::string &name, Type *type, const std::vector< Attribute * > & attributes ) 32 32 : Type( tq, attributes ), name( name ), expr( 0 ), type( type ), isType( true ) { 33 33 } -
src/SynTree/Attribute.h
rede87c6 r70a1c3ae 19 19 #include <list> // for list 20 20 #include <string> // for string, operator== 21 #include <vector> 21 22 22 23 #include "BaseSyntaxNode.h" … … 54 55 }; 55 56 56 const std:: list< Attribute * > noAttributes;57 const std::vector< Attribute * > noAttributes; 57 58 58 59 // Local Variables: // -
src/SynTree/BasicType.cc
rede87c6 r70a1c3ae 22 22 class Attribute; 23 23 24 BasicType::BasicType( const Type::Qualifiers &tq, Kind bt, const std:: list< Attribute * > & attributes ) : Type( tq, attributes ), kind( bt ) {}24 BasicType::BasicType( const Type::Qualifiers &tq, Kind bt, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ), kind( bt ) {} 25 25 26 26 void BasicType::print( std::ostream &os, Indenter indent ) const { -
src/SynTree/Declaration.h
rede87c6 r70a1c3ae 20 20 #include <list> // for list 21 21 #include <string> // for string, operator+, allocator, to_string 22 #include <vector> 22 23 23 24 #include "BaseSyntaxNode.h" // for BaseSyntaxNode … … 83 84 84 85 Expression *asmName; 85 std:: list< Attribute * > attributes;86 std::vector< Attribute * > attributes; 86 87 bool isDeleted = false; 87 88 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 ); 89 90 DeclarationWithType( const DeclarationWithType &other ); 90 91 virtual ~DeclarationWithType(); … … 101 102 DeclarationWithType * set_asmName( Expression *newValue ) { asmName = newValue; return this; } 102 103 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; } 105 106 106 107 Type::FuncSpecifiers get_funcSpec() const { return fs; } … … 125 126 126 127 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() ); 128 129 ObjectDecl( const ObjectDecl &other ); 129 130 virtual ~ObjectDecl(); … … 155 156 156 157 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() ); 158 159 FunctionDecl( const FunctionDecl &other ); 159 160 virtual ~FunctionDecl(); … … 265 266 std::list<TypeDecl*> parameters; 266 267 bool body; 267 std:: list< Attribute * > attributes;268 std::vector< Attribute * > attributes; 268 269 AggregateDecl * parent = nullptr; 269 270 270 AggregateDecl( const std::string &name, const std:: list< Attribute * > & attributes = std::list< classAttribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall );271 AggregateDecl( const std::string &name, const std::vector< Attribute * > & attributes = std::vector< Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ); 271 272 AggregateDecl( const AggregateDecl &other ); 272 273 virtual ~AggregateDecl(); … … 275 276 std::list<TypeDecl*>& get_parameters() { return parameters; } 276 277 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; } 279 280 280 281 bool has_body() const { return body; } … … 290 291 typedef AggregateDecl Parent; 291 292 public: 292 StructDecl( const std::string &name, DeclarationNode::Aggregate kind = DeclarationNode::Struct, const std:: list< Attribute * > & attributes = std::list< classAttribute * >(), 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 ) {} 293 294 StructDecl( const StructDecl &other ) : Parent( other ), kind( other.kind ) {} 294 295 … … 308 309 typedef AggregateDecl Parent; 309 310 public: 310 UnionDecl( const std::string &name, const std:: list< Attribute * > & attributes = std::list< classAttribute * >(), 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 ) {} 311 312 UnionDecl( const UnionDecl &other ) : Parent( other ) {} 312 313 … … 321 322 typedef AggregateDecl Parent; 322 323 public: 323 EnumDecl( const std::string &name, const std:: list< Attribute * > & attributes = std::list< classAttribute * >(), 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 ) {} 324 325 EnumDecl( const EnumDecl &other ) : Parent( other ) {} 325 326 … … 337 338 typedef AggregateDecl Parent; 338 339 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 ) { 340 341 assertf( attributes.empty(), "attribute unsupported for traits" ); 341 342 } -
src/SynTree/DeclarationWithType.cc
rede87c6 r70a1c3ae 24 24 #include "Type.h" // for Type, Type::FuncSpecifiers, Type::St... 25 25 26 DeclarationWithType::DeclarationWithType( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, const std:: list< Attribute * > & attributes, Type::FuncSpecifiers fs )26 DeclarationWithType::DeclarationWithType( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, const std::vector< Attribute * > & attributes, Type::FuncSpecifiers fs ) 27 27 : Declaration( name, scs, linkage ), asmName( nullptr ), attributes( attributes ), fs( fs ) { 28 28 } -
src/SynTree/FunctionDecl.cc
rede87c6 r70a1c3ae 30 30 extern bool translation_unit_nomain; 31 31 32 FunctionDecl::FunctionDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, std:: list< Attribute * > attributes, Type::FuncSpecifiers fs )32 FunctionDecl::FunctionDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, std::vector< Attribute * > attributes, Type::FuncSpecifiers fs ) 33 33 : Parent( name, scs, linkage, attributes, fs ), type( type ), statements( statements ) { 34 34 // 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 25 25 class Attribute; 26 26 27 FunctionType::FunctionType( const Type::Qualifiers &tq, bool isVarArgs, const std:: list< Attribute * > & attributes ) : Type( tq, attributes ), isVarArgs( isVarArgs ) {27 FunctionType::FunctionType( const Type::Qualifiers &tq, bool isVarArgs, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ), isVarArgs( isVarArgs ) { 28 28 } 29 29 -
src/SynTree/Label.h
rede87c6 r70a1c3ae 19 19 #include <list> 20 20 #include <iostream> 21 #include <vector> 21 22 #include "SynTree.h" 22 23 23 24 class Label { 24 25 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 ) {} 26 27 Label( const char * name, Statement * labelled = 0 ) : name( name ), labelled( labelled ) {} 27 28 … … 31 32 Statement * get_statement() const { return labelled; } 32 33 void set_statement( Statement * newValue ) { labelled = newValue; } 33 std:: list< Attribute * >& get_attributes() { return attributes; }34 std::vector< Attribute * >& get_attributes() { return attributes; } 34 35 35 36 operator std::string() const { return name; } … … 38 39 std::string name; 39 40 Statement * labelled; 40 std:: list< Attribute * > attributes;41 std::vector< Attribute * > attributes; 41 42 }; 42 43 -
src/SynTree/ObjectDecl.cc
rede87c6 r70a1c3ae 26 26 #include "Type.h" // for Type, Type::StorageClasses, Type::Fu... 27 27 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 )28 ObjectDecl::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 ) 29 29 : Parent( name, scs, linkage, attributes, fs ), type( type ), init( init ), bitfieldWidth( bitfieldWidth ) { 30 30 } -
src/SynTree/PointerType.cc
rede87c6 r70a1c3ae 23 23 class Attribute; 24 24 25 PointerType::PointerType( const Type::Qualifiers &tq, Type *base, const std:: list< Attribute * > & attributes )25 PointerType::PointerType( const Type::Qualifiers &tq, Type *base, const std::vector< Attribute * > & attributes ) 26 26 : Type( tq, attributes ), base( base ), dimension( 0 ), isVarLen( false ), isStatic( false ) { 27 27 } 28 28 29 PointerType::PointerType( const Type::Qualifiers &tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std:: list< Attribute * > & attributes )29 PointerType::PointerType( const Type::Qualifiers &tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::vector< Attribute * > & attributes ) 30 30 : Type( tq, attributes ), base( base ), dimension( dimension ), isVarLen( isVarLen ), isStatic( isStatic ) { 31 31 } -
src/SynTree/ReferenceToType.cc
rede87c6 r70a1c3ae 27 27 class Attribute; 28 28 29 ReferenceToType::ReferenceToType( const Type::Qualifiers &tq, const std::string &name, const std:: list< Attribute * > & attributes ) : Type( tq, attributes ), name( name ), hoistType( false ) {29 ReferenceToType::ReferenceToType( const Type::Qualifiers &tq, const std::string &name, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ), name( name ), hoistType( false ) { 30 30 } 31 31 … … 59 59 } // namespace 60 60 61 StructInstType::StructInstType( const Type::Qualifiers & tq, StructDecl * baseStruct, const std:: list< Attribute * > & attributes ) :61 StructInstType::StructInstType( const Type::Qualifiers & tq, StructDecl * baseStruct, const std::vector< Attribute * > & attributes ) : 62 62 Parent( tq, baseStruct->name, attributes ), baseStruct( baseStruct ) {} 63 63 … … 102 102 103 103 104 UnionInstType::UnionInstType( const Type::Qualifiers & tq, UnionDecl * baseUnion, const std:: list< Attribute * > & attributes ) :104 UnionInstType::UnionInstType( const Type::Qualifiers & tq, UnionDecl * baseUnion, const std::vector< Attribute * > & attributes ) : 105 105 Parent( tq, baseUnion->name, attributes ), baseUnion( baseUnion ) {} 106 106 … … 145 145 146 146 147 EnumInstType::EnumInstType( const Type::Qualifiers & tq, EnumDecl * baseEnum, const std:: list< Attribute * > & attributes ) :147 EnumInstType::EnumInstType( const Type::Qualifiers & tq, EnumDecl * baseEnum, const std::vector< Attribute * > & attributes ) : 148 148 Parent( tq, baseEnum->get_name(), attributes ), baseEnum( baseEnum ) {} 149 149 … … 167 167 std::string TraitInstType::typeString() const { return "trait"; } 168 168 169 TraitInstType::TraitInstType( const Type::Qualifiers & tq, TraitDecl * baseTrait, const std:: list< Attribute * > & attributes ) : Parent( tq, baseTrait->name, attributes ), baseTrait( baseTrait ) {}169 TraitInstType::TraitInstType( const Type::Qualifiers & tq, TraitDecl * baseTrait, const std::vector< Attribute * > & attributes ) : Parent( tq, baseTrait->name, attributes ), baseTrait( baseTrait ) {} 170 170 171 171 TraitInstType::TraitInstType( const TraitInstType &other ) : Parent( other ), baseTrait( other.baseTrait ) { … … 177 177 bool TraitInstType::isComplete() const { assert( false ); } 178 178 179 TypeInstType::TypeInstType( const Type::Qualifiers &tq, const std::string &name, TypeDecl *baseType, const std:: list< Attribute * > & attributes ) : Parent( tq, name, attributes ) {179 TypeInstType::TypeInstType( const Type::Qualifiers &tq, const std::string &name, TypeDecl *baseType, const std::vector< Attribute * > & attributes ) : Parent( tq, name, attributes ) { 180 180 set_baseType( baseType ); 181 181 } 182 182 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 ) {183 TypeInstType::TypeInstType( const Type::Qualifiers &tq, const std::string &name, bool isFtype, const std::vector< Attribute * > & attributes ) : Parent( tq, name, attributes ), baseType( 0 ), isFtype( isFtype ) { 184 184 } 185 185 -
src/SynTree/ReferenceType.cc
rede87c6 r70a1c3ae 19 19 #include "Common/utility.h" 20 20 21 ReferenceType::ReferenceType( const Type::Qualifiers &tq, Type *base, const std:: list< Attribute * > & attributes )21 ReferenceType::ReferenceType( const Type::Qualifiers &tq, Type *base, const std::vector< Attribute * > & attributes ) 22 22 : Type( tq, attributes ), base( base ) { 23 23 assertf( base, "Reference Type with a null base created." ); -
src/SynTree/TupleType.cc
rede87c6 r70a1c3ae 25 25 class Attribute; 26 26 27 TupleType::TupleType( const Type::Qualifiers &tq, const std::list< Type * > & types, const std:: list< Attribute * > & attributes ) : Type( tq, attributes ), types( types ) {27 TupleType::TupleType( const Type::Qualifiers &tq, const std::list< Type * > & types, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ), types( types ) { 28 28 for ( Type * t : *this ) { 29 29 // 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 56 56 ); 57 57 58 Type::Type( const Qualifiers &tq, const std:: list< Attribute * > & attributes ) : tq( tq ), attributes( attributes ) {}58 Type::Type( const Qualifiers &tq, const std::vector< Attribute * > & attributes ) : tq( tq ), attributes( attributes ) {} 59 59 60 60 Type::Type( const Type &other ) : BaseSyntaxNode( other ), tq( other.tq ) { -
src/SynTree/Type.h
rede87c6 r70a1c3ae 21 21 #include <ostream> // for ostream, operator<<, basic_ostream 22 22 #include <string> // for string 23 #include <vector> 23 24 24 25 #include "BaseSyntaxNode.h" // for BaseSyntaxNode … … 137 138 Qualifiers tq; 138 139 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 ); 142 143 Type( const Type & other ); 143 144 virtual ~Type(); … … 159 160 ForallList& get_forall() { return forall; } 160 161 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; } 163 164 164 165 /// How many elemental types are represented by this type … … 194 195 class VoidType : public Type { 195 196 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 * >() ); 197 198 198 199 virtual unsigned size() const override { return 0; }; … … 238 239 static const char *typeNames[]; // string names for basic types, MUST MATCH with Kind 239 240 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 * >() ); 241 242 242 243 Kind get_kind() { return kind; } … … 260 261 bool isStatic; 261 262 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 * >() ); 264 265 PointerType( const PointerType& ); 265 266 virtual ~PointerType(); … … 291 292 bool isStatic; 292 293 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 * >() ); 294 295 ArrayType( const ArrayType& ); 295 296 virtual ~ArrayType(); … … 334 335 Type *base; 335 336 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 * >() ); 337 338 ReferenceType( const ReferenceType & ); 338 339 virtual ~ReferenceType(); … … 367 368 bool isVarArgs; 368 369 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 * >() ); 370 371 FunctionType( const FunctionType& ); 371 372 virtual ~FunctionType(); … … 391 392 bool hoistType; 392 393 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 ); 394 395 ReferenceToType( const ReferenceToType & other ); 395 396 virtual ~ReferenceToType(); … … 418 419 StructDecl *baseStruct; 419 420 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 * >() ); 422 423 StructInstType( const StructInstType & other ) : Parent( other ), baseStruct( other.baseStruct ) {} 423 424 … … 455 456 UnionDecl *baseUnion; 456 457 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 * >() ); 459 460 UnionInstType( const UnionInstType & other ) : Parent( other ), baseUnion( other.baseUnion ) {} 460 461 … … 492 493 EnumDecl *baseEnum = nullptr; 493 494 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 * >() ); 496 497 EnumInstType( const EnumInstType & other ) : Parent( other ), baseEnum( other.baseEnum ) {} 497 498 … … 519 520 TraitDecl * baseTrait = nullptr; 520 521 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 * >() ); 523 524 TraitInstType( const TraitInstType & other ); 524 525 ~TraitInstType(); … … 541 542 bool isFtype; 542 543 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 * >() ); 545 546 TypeInstType( const TypeInstType & other ); 546 547 ~TypeInstType(); … … 566 567 std::list<Declaration *> members; 567 568 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 * >() ); 569 570 TupleType( const TupleType& ); 570 571 virtual ~TupleType(); … … 601 602 bool is_basetypeof; ///< true iff is basetypeof type 602 603 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 * >() ); 606 607 TypeofType( const TypeofType& ); 607 608 virtual ~TypeofType(); … … 625 626 bool isType; 626 627 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 * >() ); 629 630 AttrType( const AttrType& ); 630 631 virtual ~AttrType(); … … 651 652 public: 652 653 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 * >() ); 654 655 655 656 virtual bool isComplete() const override{ return true; } // xxx - is this right? … … 665 666 public: 666 667 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 * >() ); 668 669 669 670 virtual ZeroType *clone() const override { return new ZeroType( *this ); } … … 677 678 public: 678 679 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 * >() ); 680 681 681 682 virtual OneType *clone() const override { return new OneType( *this ); } -
src/SynTree/TypeofType.cc
rede87c6 r70a1c3ae 23 23 class Attribute; 24 24 25 TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, 26 const std:: list< Attribute * > & attributes )25 TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, 26 const std::vector< Attribute * > & attributes ) 27 27 : Type( tq, attributes ), expr( expr ), is_basetypeof(false) {} 28 28 29 TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, bool is_basetypeof, 30 const std:: list< Attribute * > & attributes )29 TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, bool is_basetypeof, 30 const std::vector< Attribute * > & attributes ) 31 31 : Type( tq, attributes ), expr( expr ), is_basetypeof( is_basetypeof ) {} 32 32 -
src/SynTree/VarArgsType.cc
rede87c6 r70a1c3ae 21 21 class Attribute; 22 22 23 VarArgsType::VarArgsType() : Type( Type::Qualifiers(), std:: list< Attribute * >() ) {}23 VarArgsType::VarArgsType() : Type( Type::Qualifiers(), std::vector< Attribute * >() ) {} 24 24 25 VarArgsType::VarArgsType( Type::Qualifiers tq, const std:: list< Attribute * > & attributes ) : Type( tq, attributes ) {}25 VarArgsType::VarArgsType( Type::Qualifiers tq, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ) {} 26 26 27 27 void VarArgsType::print( std::ostream &os, Indenter indent ) const { -
src/SynTree/VoidType.cc
rede87c6 r70a1c3ae 21 21 class Attribute; 22 22 23 VoidType::VoidType( const Type::Qualifiers &tq, const std:: list< Attribute * > & attributes ) : Type( tq, attributes ) {23 VoidType::VoidType( const Type::Qualifiers &tq, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ) { 24 24 } 25 25 -
src/SynTree/ZeroOneType.cc
rede87c6 r70a1c3ae 21 21 class Attribute; 22 22 23 ZeroType::ZeroType() : Type( Type::Qualifiers(), std:: list< Attribute * >() ) {}23 ZeroType::ZeroType() : Type( Type::Qualifiers(), std::vector< Attribute * >() ) {} 24 24 25 ZeroType::ZeroType( Type::Qualifiers tq, const std:: list< Attribute * > & attributes ) : Type( tq, attributes ) {}25 ZeroType::ZeroType( Type::Qualifiers tq, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ) {} 26 26 27 27 void ZeroType::print( std::ostream &os, Indenter ) const { … … 29 29 } 30 30 31 OneType::OneType() : Type( Type::Qualifiers(), std:: list< Attribute * >() ) {}31 OneType::OneType() : Type( Type::Qualifiers(), std::vector< Attribute * >() ) {} 32 32 33 OneType::OneType( Type::Qualifiers tq, const std:: list< Attribute * > & attributes ) : Type( tq, attributes ) {}33 OneType::OneType( Type::Qualifiers tq, const std::vector< Attribute * > & attributes ) : Type( tq, attributes ) {} 34 34 35 35 void OneType::print( std::ostream &os, Indenter ) const {
Note: See TracChangeset
for help on using the changeset viewer.