Changeset 4040425 for src/SynTree


Ignore:
Timestamp:
Mar 2, 2016, 6:15:02 PM (10 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
36ebd03, b63e376
Parents:
8f610e85
Message:

change keyword type to otype and context to trait

Location:
src/SynTree
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/AggregateDecl.cc

    r8f610e85 r4040425  
    1010// Created On       : Sun May 17 23:56:39 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jun 13 08:12:49 2015
    13 // Update Count     : 6
     12// Last Modified On : Wed Mar  2 17:28:00 2016
     13// Update Count     : 7
    1414//
    1515
     
    6464std::string EnumDecl::typeString() const { return "enum"; }
    6565
    66 std::string ContextDecl::typeString() const { return "context"; }
     66std::string TraitDecl::typeString() const { return "context"; }
    6767
    6868// Local Variables: //
  • src/SynTree/Declaration.h

    r8f610e85 r4040425  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Dec 09 14:08:22 2015
    13 // Update Count     : 32
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed Mar  2 17:28:11 2016
     13// Update Count     : 33
    1414//
    1515
     
    246246};
    247247
    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 ); }
     248class 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 ); }
    255255        virtual void accept( Visitor &v ) { v.visit( this ); }
    256256        virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); }
  • src/SynTree/Mutator.cc

    r8f610e85 r4040425  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul 25 19:21:33 2015
    13 // Update Count     : 11
     12// Last Modified On : Wed Mar  2 17:28:20 2016
     13// Update Count     : 12
    1414//
    1515
     
    6363}
    6464
    65 Declaration *Mutator::mutate( ContextDecl *aggregateDecl ) {
     65Declaration *Mutator::mutate( TraitDecl *aggregateDecl ) {
    6666        handleAggregateDecl( aggregateDecl );
    6767        return aggregateDecl;
     
    387387}
    388388
    389 Type *Mutator::mutate( ContextInstType *aggregateUseType ) {
     389Type *Mutator::mutate( TraitInstType *aggregateUseType ) {
    390390        handleReferenceToType( aggregateUseType );
    391391        mutateAll( aggregateUseType->get_members(), *this );
  • src/SynTree/Mutator.h

    r8f610e85 r4040425  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 19 22:26:16 2015
    13 // Update Count     : 8
     12// Last Modified On : Wed Mar  2 17:33:11 2016
     13// Update Count     : 9
    1414//
    1515#include <cassert>
     
    3131        virtual Declaration* mutate( UnionDecl *aggregateDecl );
    3232        virtual Declaration* mutate( EnumDecl *aggregateDecl );
    33         virtual Declaration* mutate( ContextDecl *aggregateDecl );
     33        virtual Declaration* mutate( TraitDecl *aggregateDecl );
    3434        virtual TypeDecl* mutate( TypeDecl *typeDecl );
    3535        virtual Declaration* mutate( TypedefDecl *typeDecl );
     
    8585        virtual Type* mutate( UnionInstType *aggregateUseType );
    8686        virtual Type* mutate( EnumInstType *aggregateUseType );
    87         virtual Type* mutate( ContextInstType *aggregateUseType );
     87        virtual Type* mutate( TraitInstType *aggregateUseType );
    8888        virtual Type* mutate( TypeInstType *aggregateUseType );
    8989        virtual Type* mutate( TupleType *tupleType );
  • src/SynTree/ReferenceToType.cc

    r8f610e85 r4040425  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Jun  7 08:31:48 2015
    13 // Update Count     : 4
     12// Last Modified On : Wed Mar  2 17:28:51 2016
     13// Update Count     : 5
    1414//
    1515
     
    8383std::string EnumInstType::typeString() const { return "enum"; }
    8484
    85 std::string ContextInstType::typeString() const { return "context"; }
     85std::string TraitInstType::typeString() const { return "context"; }
    8686
    87 ContextInstType::ContextInstType( const ContextInstType &other ) : Parent( other ) {
     87TraitInstType::TraitInstType( const TraitInstType &other ) : Parent( other ) {
    8888        cloneAll( other.members, members );
    8989}
    9090
    91 ContextInstType::~ContextInstType() {
     91TraitInstType::~TraitInstType() {
    9292        deleteAll( members );
    9393}
  • src/SynTree/SynTree.h

    r8f610e85 r4040425  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 23 23:25:04 2015
    13 // Update Count     : 3
     12// Last Modified On : Wed Mar  2 17:29:00 2016
     13// Update Count     : 4
    1414//
    1515
     
    3030class UnionDecl;
    3131class EnumDecl;
    32 class ContextDecl;
     32class TraitDecl;
    3333class NamedTypeDecl;
    3434class TypeDecl;
     
    9292class UnionInstType;
    9393class EnumInstType;
    94 class ContextInstType;
     94class TraitInstType;
    9595class TypeInstType;
    9696class TupleType;
  • src/SynTree/Type.h

    r8f610e85 r4040425  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar  2 17:10:38 2016
    13 // Update Count     : 20
     12// Last Modified On : Wed Mar  2 17:29:08 2016
     13// Update Count     : 21
    1414//
    1515
     
    296296};
    297297
    298 class ContextInstType : public ReferenceToType {
     298class TraitInstType : public ReferenceToType {
    299299        typedef ReferenceToType Parent;
    300300  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();
    304304
    305305        std::list< Declaration* >& get_members() { return members; }
    306306
    307         virtual ContextInstType *clone() const { return new ContextInstType( *this ); }
     307        virtual TraitInstType *clone() const { return new TraitInstType( *this ); }
    308308        virtual void accept( Visitor &v ) { v.visit( this ); }
    309309        virtual Type *acceptMutator( Mutator &m ) { return m.mutate( this ); }
  • src/SynTree/TypeSubstitution.cc

    r8f610e85 r4040425  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 11:10:04 2015
    13 // Update Count     : 2
     12// Last Modified On : Wed Mar  2 17:29:15 2016
     13// Update Count     : 3
    1414//
    1515
     
    190190}
    191191
    192 Type * TypeSubstitution::mutate( ContextInstType *aggregateUseType ) {
     192Type * TypeSubstitution::mutate( TraitInstType *aggregateUseType ) {
    193193        return handleType( aggregateUseType );
    194194}
  • src/SynTree/TypeSubstitution.h

    r8f610e85 r4040425  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May 18 11:12:30 2015
    13 // Update Count     : 1
     12// Last Modified On : Wed Mar  2 17:33:19 2016
     13// Update Count     : 2
    1414//
    1515
     
    7272        virtual Type* mutate(UnionInstType *aggregateUseType);
    7373        virtual Type* mutate(EnumInstType *aggregateUseType);
    74         virtual Type* mutate(ContextInstType *aggregateUseType);
     74        virtual Type* mutate(TraitInstType *aggregateUseType);
    7575        virtual Type* mutate(TupleType *tupleType);
    7676        virtual Type* mutate(VarArgsType *varArgsType);
  • src/SynTree/Visitor.cc

    r8f610e85 r4040425  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 24 16:11:05 2015
    13 // Update Count     : 15
     12// Last Modified On : Wed Mar  2 17:29:23 2016
     13// Update Count     : 16
    1414//
    1515
     
    5656}
    5757
    58 void Visitor::visit( ContextDecl *aggregateDecl ) {
     58void Visitor::visit( TraitDecl *aggregateDecl ) {
    5959        visit( static_cast< AggregateDecl* >( aggregateDecl ) );
    6060}
     
    326326}
    327327
    328 void Visitor::visit( ContextInstType *aggregateUseType ) {
     328void Visitor::visit( TraitInstType *aggregateUseType ) {
    329329        visit( static_cast< ReferenceToType * >( aggregateUseType ) );
    330330        acceptAll( aggregateUseType->get_members(), *this );
  • src/SynTree/Visitor.h

    r8f610e85 r4040425  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jan 25 21:20:44 2016
    13 // Update Count     : 5
     12// Last Modified On : Wed Mar  2 17:33:35 2016
     13// Update Count     : 6
    1414//
    1515
     
    3131        virtual void visit( UnionDecl *aggregateDecl );
    3232        virtual void visit( EnumDecl *aggregateDecl );
    33         virtual void visit( ContextDecl *aggregateDecl );
     33        virtual void visit( TraitDecl *aggregateDecl );
    3434        virtual void visit( TypeDecl *typeDecl );
    3535        virtual void visit( TypedefDecl *typeDecl );
     
    8585        virtual void visit( UnionInstType *aggregateUseType );
    8686        virtual void visit( EnumInstType *aggregateUseType );
    87         virtual void visit( ContextInstType *aggregateUseType );
     87        virtual void visit( TraitInstType *aggregateUseType );
    8888        virtual void visit( TypeInstType *aggregateUseType );
    8989        virtual void visit( TupleType *tupleType );
Note: See TracChangeset for help on using the changeset viewer.