Changeset 342af53 for src/SynTree


Ignore:
Timestamp:
Jan 14, 2021, 12:23:14 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
8e4aa05
Parents:
4468a70 (diff), ec19b21 (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:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Declaration.h

    r4468a70 r342af53  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Dec 13 23:11:22 2019
    13 // Update Count     : 157
     12// Last Modified On : Mon Jan 11 20:48:39 2021
     13// Update Count     : 158
    1414//
    1515
     
    201201        typedef NamedTypeDecl Parent;
    202202  public:
    203         enum Kind { Dtype, Otype, Ftype, Ttype, NUMBER_OF_KINDS };
     203        enum Kind { Dtype, DStype, Otype, Ftype, Ttype, ALtype, NUMBER_OF_KINDS };
    204204
    205205        Kind kind;
  • src/SynTree/TypeDecl.cc

    r4468a70 r342af53  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Oct  8 18:18:55 2020
    13 // Update Count     : 22
     12// Last Modified On : Tue Jan 12 16:07:33 2021
     13// Update Count     : 26
    1414//
    1515
     
    3333
    3434const char * TypeDecl::typeString() const {
    35         static const char * kindNames[] = { "sized data type", "sized object type", "sized function type", "sized tuple type" };
    36         static_assert( sizeof(kindNames)/sizeof(kindNames[0]) == TypeDecl::NUMBER_OF_KINDS, "typeString: kindNames is out of sync." );
     35        static const char * kindNames[] = { "sized data type", "sized data type", "sized object type", "sized function type", "sized tuple type", "sized array length type" };
     36        static_assert( sizeof(kindNames) / sizeof(kindNames[0]) == TypeDecl::NUMBER_OF_KINDS, "typeString: kindNames is out of sync." );
    3737        assertf( kind < TypeDecl::NUMBER_OF_KINDS, "TypeDecl kind is out of bounds." );
    3838        return isComplete() ? kindNames[ kind ] : &kindNames[ kind ][ sizeof("sized") ]; // sizeof includes '\0'
     
    4040
    4141const char * TypeDecl::genTypeString() const {
    42         static const char * kindNames[] = { "dtype", "otype", "ftype", "ttype" };
    43         static_assert( sizeof(kindNames)/sizeof(kindNames[0]) == TypeDecl::NUMBER_OF_KINDS, "genTypeString: kindNames is out of sync." );
     42        static const char * kindNames[] = { "T &", "T *", "T", "(*)", "T ...", "[T]" };
     43        static_assert( sizeof(kindNames) / sizeof(kindNames[0]) == TypeDecl::NUMBER_OF_KINDS, "genTypeString: kindNames is out of sync." );
    4444        assertf( kind < TypeDecl::NUMBER_OF_KINDS, "TypeDecl kind is out of bounds." );
    4545        return kindNames[ kind ];
Note: See TracChangeset for help on using the changeset viewer.