Changeset 31ce3d6


Ignore:
Timestamp:
Mar 20, 2017, 3:20:34 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
e04b636
Parents:
7c70089 (diff), 6e8f1df (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
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r7c70089 r31ce3d6  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar 17 08:46:05 2017
    13 // Update Count     : 1017
     12// Last Modified On : Fri Mar 17 15:46:33 2017
     13// Update Count     : 1018
    1414//
    1515
     
    3636const char * DeclarationNode::signednessNames[] = { "signed", "unsigned", "NoSignednessNames" };
    3737const char * DeclarationNode::lengthNames[] = { "short", "long", "long long", "NoLengthNames" };
    38 const char * DeclarationNode::aggregateNames[] = { "struct", "union", "context", "NoAggregateNames" };
     38const char * DeclarationNode::aggregateNames[] = { "struct", "union", "trait", "coroutine", "monitor", "thread", "NoAggregateNames" };
    3939const char * DeclarationNode::typeClassNames[] = { "otype", "dtype", "ftype", "NoTypeClassNames" };
    4040const char * DeclarationNode::builtinTypeNames[] = { "__builtin_va_list", "NoBuiltinTypeNames" };
  • src/Parser/ParseNode.h

    r7c70089 r31ce3d6  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 08:32:43 2017
    13 // Update Count     : 776
     12// Last Modified On : Fri Mar 17 15:42:18 2017
     13// Update Count     : 777
    1414//
    1515
     
    206206        enum Signedness { Signed, Unsigned, NoSignedness };
    207207        enum Length { Short, Long, LongLong, NoLength };
    208         enum Aggregate { Struct, Union, Trait, NoAggregate };
     208        enum Aggregate { Struct, Union, Trait, Coroutine, Monitor, Thread, NoAggregate };
    209209        enum TypeClass { Otype, Dtype, Ftype, Ttype, NoTypeClass };
    210210        enum BuiltinType { Valist, Zero, One, NoBuiltinType };
  • src/Parser/TypeData.cc

    r7c70089 r31ce3d6  
    1010// Created On       : Sat May 16 15:12:51 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar 17 08:46:10 2017
    13 // Update Count     : 560
     12// Last Modified On : Fri Mar 17 15:52:43 2017
     13// Update Count     : 563
    1414//
    1515
     
    619619        switch ( td->aggregate.kind ) {
    620620          case DeclarationNode::Struct:
    621                 at = new StructDecl( *td->aggregate.name, attributes );
     621          case DeclarationNode::Coroutine:
     622          case DeclarationNode::Monitor:
     623          case DeclarationNode::Thread:
     624                at = new StructDecl( *td->aggregate.name, td->aggregate.kind, attributes );
    622625                buildForall( td->aggregate.params, at->get_parameters() );
    623626                break;
     
    656659                          switch ( type->aggregate.kind ) {
    657660                                case DeclarationNode::Struct:
     661                                case DeclarationNode::Coroutine:
     662                                case DeclarationNode::Monitor:
     663                                case DeclarationNode::Thread:
    658664                                  ret = new StructInstType( buildQualifiers( type ), (StructDecl *)typedecl );
    659665                                  break;
     
    671677                          switch ( type->aggregate.kind ) {
    672678                                case DeclarationNode::Struct:
     679                                case DeclarationNode::Coroutine:
     680                                case DeclarationNode::Monitor:
     681                                case DeclarationNode::Thread:
    673682                                  ret = new StructInstType( buildQualifiers( type ), *type->aggregate.name );
    674683                                  break;
     
    703712                  switch ( type->aggregate.kind ) {
    704713                        case DeclarationNode::Struct:
     714                        case DeclarationNode::Coroutine:
     715                        case DeclarationNode::Monitor:
     716                        case DeclarationNode::Thread:
    705717                          ret = new StructInstType( buildQualifiers( type ), *type->aggregate.name );
    706718                          break;
  • src/Parser/parser.yy

    r7c70089 r31ce3d6  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 12:57:03 2017
    13 // Update Count     : 2316
     12// Last Modified On : Fri Mar 17 15:42:22 2017
     13// Update Count     : 2317
    1414//
    1515
     
    16381638                { $$ = DeclarationNode::Union; }
    16391639        | COROUTINE
    1640                 { $$ = DeclarationNode::Struct; }
     1640                { $$ = DeclarationNode::Coroutine; }
    16411641        | MONITOR
    1642                 { $$ = DeclarationNode::Struct; }
     1642                { $$ = DeclarationNode::Monitor; }
    16431643        | THREAD
    1644                 { $$ = DeclarationNode::Struct; }
     1644                { $$ = DeclarationNode::Thread; }
    16451645        ;
    16461646
  • src/SynTree/Declaration.h

    r7c70089 r31ce3d6  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Mar 16 08:34:11 2017
    13 // Update Count     : 118
     12// Last Modified On : Fri Mar 17 16:05:08 2017
     13// Update Count     : 121
    1414//
    1515
     
    255255        typedef AggregateDecl Parent;
    256256  public:
    257         StructDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >() ) : Parent( name, attributes ) {}
     257        StructDecl( const std::string &name, DeclarationNode::Aggregate kind = DeclarationNode::Struct, const std::list< Attribute * > & attributes = std::list< class Attribute * >() ) : Parent( name, attributes ), kind( kind ) {}
    258258        StructDecl( const StructDecl &other ) : Parent( other ) {}
    259259
     260        bool is_coroutine() { return kind == DeclarationNode::Coroutine; }
     261        bool is_monitor() { return kind == DeclarationNode::Monitor; }
     262        bool is_thread() { return kind == DeclarationNode::Thread; }
     263
    260264        virtual StructDecl *clone() const { return new StructDecl( *this ); }
    261265        virtual void accept( Visitor &v ) { v.visit( this ); }
    262266        virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); }
    263267  private:
     268        DeclarationNode::Aggregate kind;
    264269        virtual std::string typeString() const;
    265270};
  • src/driver/Makefile.am

    r7c70089 r31ce3d6  
    3232
    3333install-exec-hook:
     34        @test -z "$(CFA_BINDIR)" || $(MKDIR_P) "$(CFA_BINDIR)"
    3435        @echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) cfa '$(CFA_BINDIR)/$(CFA_NAME)'"; \
    3536        $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) cfa $(CFA_BINDIR)/$(CFA_NAME) || exit $$?
  • src/driver/Makefile.in

    r7c70089 r31ce3d6  
    530530
    531531install-exec-hook:
     532        @test -z "$(CFA_BINDIR)" || $(MKDIR_P) "$(CFA_BINDIR)"
    532533        @echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) cfa '$(CFA_BINDIR)/$(CFA_NAME)'"; \
    533534        $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) cfa $(CFA_BINDIR)/$(CFA_NAME) || exit $$?
Note: See TracChangeset for help on using the changeset viewer.