Changeset 36ebd03 for src/SynTree
- Timestamp:
- Mar 3, 2016, 1:28:56 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 3627356
- Parents:
- 9d7b3ea (diff), 4040425 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/SynTree
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/AggregateDecl.cc
r9d7b3ea r36ebd03 10 10 // Created On : Sun May 17 23:56:39 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jun 13 08:12:49 201513 // Update Count : 612 // Last Modified On : Wed Mar 2 17:28:00 2016 13 // Update Count : 7 14 14 // 15 15 … … 64 64 std::string EnumDecl::typeString() const { return "enum"; } 65 65 66 std::string ContextDecl::typeString() const { return "context"; }66 std::string TraitDecl::typeString() const { return "context"; } 67 67 68 68 // Local Variables: // -
src/SynTree/Declaration.h
r9d7b3ea r36ebd03 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Dec 09 14:08:22 201513 // Update Count : 3 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Mar 2 17:28:11 2016 13 // Update Count : 33 14 14 // 15 15 … … 246 246 }; 247 247 248 class ContextDecl : public AggregateDecl {249 typedef AggregateDecl Parent; 250 public: 251 ContextDecl( const std::string &name ) : Parent( name ) {}252 ContextDecl( const ContextDecl &other ) : Parent( other ) {}253 254 virtual ContextDecl *clone() const { return new ContextDecl( *this ); }248 class TraitDecl : public AggregateDecl { 249 typedef AggregateDecl Parent; 250 public: 251 TraitDecl( const std::string &name ) : Parent( name ) {} 252 TraitDecl( const TraitDecl &other ) : Parent( other ) {} 253 254 virtual TraitDecl *clone() const { return new TraitDecl( *this ); } 255 255 virtual void accept( Visitor &v ) { v.visit( this ); } 256 256 virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); } -
src/SynTree/Mutator.cc
r9d7b3ea r36ebd03 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jul 25 19:21:33 201513 // Update Count : 1 112 // Last Modified On : Wed Mar 2 17:28:20 2016 13 // Update Count : 12 14 14 // 15 15 … … 63 63 } 64 64 65 Declaration *Mutator::mutate( ContextDecl *aggregateDecl ) {65 Declaration *Mutator::mutate( TraitDecl *aggregateDecl ) { 66 66 handleAggregateDecl( aggregateDecl ); 67 67 return aggregateDecl; … … 387 387 } 388 388 389 Type *Mutator::mutate( ContextInstType *aggregateUseType ) {389 Type *Mutator::mutate( TraitInstType *aggregateUseType ) { 390 390 handleReferenceToType( aggregateUseType ); 391 391 mutateAll( aggregateUseType->get_members(), *this ); -
src/SynTree/Mutator.h
r9d7b3ea r36ebd03 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Nov 19 22:26:16 201513 // Update Count : 812 // Last Modified On : Wed Mar 2 17:33:11 2016 13 // Update Count : 9 14 14 // 15 15 #include <cassert> … … 31 31 virtual Declaration* mutate( UnionDecl *aggregateDecl ); 32 32 virtual Declaration* mutate( EnumDecl *aggregateDecl ); 33 virtual Declaration* mutate( ContextDecl *aggregateDecl );33 virtual Declaration* mutate( TraitDecl *aggregateDecl ); 34 34 virtual TypeDecl* mutate( TypeDecl *typeDecl ); 35 35 virtual Declaration* mutate( TypedefDecl *typeDecl ); … … 85 85 virtual Type* mutate( UnionInstType *aggregateUseType ); 86 86 virtual Type* mutate( EnumInstType *aggregateUseType ); 87 virtual Type* mutate( ContextInstType *aggregateUseType );87 virtual Type* mutate( TraitInstType *aggregateUseType ); 88 88 virtual Type* mutate( TypeInstType *aggregateUseType ); 89 89 virtual Type* mutate( TupleType *tupleType ); -
src/SynTree/ReferenceToType.cc
r9d7b3ea r36ebd03 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Jun 7 08:31:48 201513 // Update Count : 412 // Last Modified On : Wed Mar 2 17:28:51 2016 13 // Update Count : 5 14 14 // 15 15 … … 83 83 std::string EnumInstType::typeString() const { return "enum"; } 84 84 85 std::string ContextInstType::typeString() const { return "context"; }85 std::string TraitInstType::typeString() const { return "context"; } 86 86 87 ContextInstType::ContextInstType( const ContextInstType &other ) : Parent( other ) {87 TraitInstType::TraitInstType( const TraitInstType &other ) : Parent( other ) { 88 88 cloneAll( other.members, members ); 89 89 } 90 90 91 ContextInstType::~ContextInstType() {91 TraitInstType::~TraitInstType() { 92 92 deleteAll( members ); 93 93 } -
src/SynTree/SynTree.h
r9d7b3ea r36ebd03 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jul 23 23:25:04 201513 // Update Count : 312 // Last Modified On : Wed Mar 2 17:29:00 2016 13 // Update Count : 4 14 14 // 15 15 … … 30 30 class UnionDecl; 31 31 class EnumDecl; 32 class ContextDecl;32 class TraitDecl; 33 33 class NamedTypeDecl; 34 34 class TypeDecl; … … 92 92 class UnionInstType; 93 93 class EnumInstType; 94 class ContextInstType;94 class TraitInstType; 95 95 class TypeInstType; 96 96 class TupleType; -
src/SynTree/Type.h
r9d7b3ea r36ebd03 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Fri Dec 18 14:46:18 201513 // Update Count : 1811 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Mar 2 17:29:08 2016 13 // Update Count : 21 14 14 // 15 15 … … 296 296 }; 297 297 298 class ContextInstType : public ReferenceToType {298 class TraitInstType : public ReferenceToType { 299 299 typedef ReferenceToType Parent; 300 300 public: 301 ContextInstType( const Type::Qualifiers &tq, const std::string &name ) : Parent( tq, name ) {}302 ContextInstType( const ContextInstType &other );303 ~ ContextInstType();301 TraitInstType( const Type::Qualifiers &tq, const std::string &name ) : Parent( tq, name ) {} 302 TraitInstType( const TraitInstType &other ); 303 ~TraitInstType(); 304 304 305 305 std::list< Declaration* >& get_members() { return members; } 306 306 307 virtual ContextInstType *clone() const { return new ContextInstType( *this ); }307 virtual TraitInstType *clone() const { return new TraitInstType( *this ); } 308 308 virtual void accept( Visitor &v ) { v.visit( this ); } 309 309 virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); } … … 402 402 /// Represents the GCC built-in varargs type 403 403 class VarArgsType : public Type { 404 public: 404 405 VarArgsType(); 405 VarArgsType( Type::Qualifiers &tq );406 VarArgsType( Type::Qualifiers tq ); 406 407 407 408 virtual VarArgsType *clone() const { return new VarArgsType( *this ); } -
src/SynTree/TypeSubstitution.cc
r9d7b3ea r36ebd03 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon May 18 11:10:04 201513 // Update Count : 212 // Last Modified On : Wed Mar 2 17:29:15 2016 13 // Update Count : 3 14 14 // 15 15 … … 190 190 } 191 191 192 Type * TypeSubstitution::mutate( ContextInstType *aggregateUseType ) {192 Type * TypeSubstitution::mutate( TraitInstType *aggregateUseType ) { 193 193 return handleType( aggregateUseType ); 194 194 } -
src/SynTree/TypeSubstitution.h
r9d7b3ea r36ebd03 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon May 18 11:12:30 201513 // Update Count : 112 // Last Modified On : Wed Mar 2 17:33:19 2016 13 // Update Count : 2 14 14 // 15 15 … … 72 72 virtual Type* mutate(UnionInstType *aggregateUseType); 73 73 virtual Type* mutate(EnumInstType *aggregateUseType); 74 virtual Type* mutate( ContextInstType *aggregateUseType);74 virtual Type* mutate(TraitInstType *aggregateUseType); 75 75 virtual Type* mutate(TupleType *tupleType); 76 76 virtual Type* mutate(VarArgsType *varArgsType); -
src/SynTree/VarArgsType.cc
r9d7b3ea r36ebd03 9 9 // Author : Aaron B. Moss 10 10 // Created On : Thu Feb 25 16:34:00 2016 11 // Last Modified By : Aaron B. Moss12 // Last Modified On : Thu Feb 25 16:34:00 201613 // Update Count : 111 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Mar 2 17:10:40 2016 13 // Update Count : 2 14 14 // 15 15 … … 18 18 VarArgsType::VarArgsType() : Type( Type::Qualifiers() ) {} 19 19 20 VarArgsType::VarArgsType( Type::Qualifiers &tq ) : Type( tq ) {}20 VarArgsType::VarArgsType( Type::Qualifiers tq ) : Type( tq ) {} 21 21 22 22 void VarArgsType::print( std::ostream &os, int indent ) const { -
src/SynTree/Visitor.cc
r9d7b3ea r36ebd03 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 24 16:11:05 201513 // Update Count : 1 512 // Last Modified On : Wed Mar 2 17:29:23 2016 13 // Update Count : 16 14 14 // 15 15 … … 56 56 } 57 57 58 void Visitor::visit( ContextDecl *aggregateDecl ) {58 void Visitor::visit( TraitDecl *aggregateDecl ) { 59 59 visit( static_cast< AggregateDecl* >( aggregateDecl ) ); 60 60 } … … 326 326 } 327 327 328 void Visitor::visit( ContextInstType *aggregateUseType ) {328 void Visitor::visit( TraitInstType *aggregateUseType ) { 329 329 visit( static_cast< ReferenceToType * >( aggregateUseType ) ); 330 330 acceptAll( aggregateUseType->get_members(), *this ); -
src/SynTree/Visitor.h
r9d7b3ea r36ebd03 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jan 25 21:20:44201613 // Update Count : 512 // Last Modified On : Wed Mar 2 17:33:35 2016 13 // Update Count : 6 14 14 // 15 15 … … 31 31 virtual void visit( UnionDecl *aggregateDecl ); 32 32 virtual void visit( EnumDecl *aggregateDecl ); 33 virtual void visit( ContextDecl *aggregateDecl );33 virtual void visit( TraitDecl *aggregateDecl ); 34 34 virtual void visit( TypeDecl *typeDecl ); 35 35 virtual void visit( TypedefDecl *typeDecl ); … … 85 85 virtual void visit( UnionInstType *aggregateUseType ); 86 86 virtual void visit( EnumInstType *aggregateUseType ); 87 virtual void visit( ContextInstType *aggregateUseType );87 virtual void visit( TraitInstType *aggregateUseType ); 88 88 virtual void visit( TypeInstType *aggregateUseType ); 89 89 virtual void visit( TupleType *tupleType );
Note:
See TracChangeset
for help on using the changeset viewer.