Changeset 36ebd03 for src/SynTree


Ignore:
Timestamp:
Mar 3, 2016, 1:28:56 PM (10 years ago)
Author:
Aaron Moss <a3moss@…>
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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/SynTree
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/AggregateDecl.cc

    r9d7b3ea r36ebd03  
    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

    r9d7b3ea r36ebd03  
    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

    r9d7b3ea r36ebd03  
    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

    r9d7b3ea r36ebd03  
    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

    r9d7b3ea r36ebd03  
    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

    r9d7b3ea r36ebd03  
    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

    r9d7b3ea r36ebd03  
    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 : Fri Dec 18 14:46:18 2015
    13 // Update Count     : 18
     11// Last Modified By : Peter A. Buhr
     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 ); }
     
    402402/// Represents the GCC built-in varargs type
    403403class VarArgsType : public Type {
     404  public:
    404405        VarArgsType();
    405         VarArgsType( Type::Qualifiers &tq );
     406        VarArgsType( Type::Qualifiers tq );
    406407
    407408        virtual VarArgsType *clone() const { return new VarArgsType( *this ); }
  • src/SynTree/TypeSubstitution.cc

    r9d7b3ea r36ebd03  
    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

    r9d7b3ea r36ebd03  
    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/VarArgsType.cc

    r9d7b3ea r36ebd03  
    99// Author           : Aaron B. Moss
    1010// Created On       : Thu Feb 25 16:34:00 2016
    11 // Last Modified By : Aaron B. Moss
    12 // Last Modified On : Thu Feb 25 16:34:00 2016
    13 // Update Count     : 1
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed Mar  2 17:10:40 2016
     13// Update Count     : 2
    1414//
    1515
     
    1818VarArgsType::VarArgsType() : Type( Type::Qualifiers() ) {}
    1919
    20 VarArgsType::VarArgsType( Type::Qualifiers &tq ) : Type( tq ) {}
     20VarArgsType::VarArgsType( Type::Qualifiers tq ) : Type( tq ) {}
    2121
    2222void VarArgsType::print( std::ostream &os, int indent ) const {
  • src/SynTree/Visitor.cc

    r9d7b3ea r36ebd03  
    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

    r9d7b3ea r36ebd03  
    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.