Ignore:
Timestamp:
Jul 7, 2015, 1:49:58 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:
82dd287
Parents:
e0ff3e6 (diff), 8686f31 (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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TypeData.cc

    re0ff3e6 r413f7f8  
    1010// Created On       : Sat May 16 15:12:51 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jun 18 22:06:23 2015
    13 // Update Count     : 21
     12// Last Modified On : Fri Jun 26 07:30:06 2015
     13// Update Count     : 26
    1414//
    1515
     
    5353                aggregate->params = 0;
    5454                aggregate->actuals = 0;
    55                 aggregate->members = 0;
     55                aggregate->fields = 0;
    5656                break;
    5757          case AggregateInst:
     
    119119                delete aggregate->params;
    120120                delete aggregate->actuals;
    121                 delete aggregate->members;
     121                delete aggregate->fields;
    122122                delete aggregate;
    123123                break;
     
    190190                newtype->aggregate->params = maybeClone( aggregate->params );
    191191                newtype->aggregate->actuals = maybeClone( aggregate->actuals );
    192                 newtype->aggregate->members = maybeClone( aggregate->members );
     192                newtype->aggregate->fields = maybeClone( aggregate->fields );
    193193                newtype->aggregate->name = aggregate->name;
    194194                newtype->aggregate->kind = aggregate->kind;
     
    237237        if ( forall ) {
    238238                os << "forall " << endl;
    239                 forall->printList( os, indent+4 );
     239                forall->printList( os, indent + 4 );
    240240        } // if
    241241
     
    277277                os << "function" << endl;
    278278                if ( function->params ) {
    279                         os << string( indent+2, ' ' ) << "with parameters " << endl;
    280                         function->params->printList( os, indent+4 );
     279                        os << string( indent + 2, ' ' ) << "with parameters " << endl;
     280                        function->params->printList( os, indent + 4 );
    281281                } else {
    282                         os << string( indent+2, ' ' ) << "with no parameters " << endl;
     282                        os << string( indent + 2, ' ' ) << "with no parameters " << endl;
    283283                } // if
    284284                if ( function->idList ) {
    285                         os << string( indent+2, ' ' ) << "with old-style identifier list " << endl;
    286                         function->idList->printList( os, indent+4 );
     285                        os << string( indent + 2, ' ' ) << "with old-style identifier list " << endl;
     286                        function->idList->printList( os, indent + 4 );
    287287                } // if
    288288                if ( function->oldDeclList ) {
    289                         os << string( indent+2, ' ' ) << "with old-style declaration list " << endl;
    290                         function->oldDeclList->printList( os, indent+4 );
    291                 } // if
    292                 os << string( indent+2, ' ' ) << "returning ";
     289                        os << string( indent + 2, ' ' ) << "with old-style declaration list " << endl;
     290                        function->oldDeclList->printList( os, indent + 4 );
     291                } // if
     292                os << string( indent + 2, ' ' ) << "returning ";
    293293                if ( base ) {
    294                         base->print( os, indent+4 );
     294                        base->print( os, indent + 4 );
    295295                } else {
    296296                        os << "nothing ";
     
    298298                os << endl;
    299299                if ( function->hasBody ) {
    300                         os << string( indent+2, ' ' ) << "with body " << endl;
     300                        os << string( indent + 2, ' ' ) << "with body " << endl;
    301301                } // if
    302302                if ( function->body ) {
    303                         function->body->printList( os, indent+2 );
     303                        function->body->printList( os, indent + 2 );
    304304                } // if
    305305                break;
     
    307307                os << DeclarationNode::aggregateName[ aggregate->kind ] << ' ' << aggregate->name << endl;
    308308                if ( aggregate->params ) {
    309                         os << string( indent+2, ' ' ) << "with type parameters " << endl;
    310                         aggregate->params->printList( os, indent+4 );
     309                        os << string( indent + 2, ' ' ) << "with type parameters " << endl;
     310                        aggregate->params->printList( os, indent + 4 );
    311311                } // if
    312312                if ( aggregate->actuals ) {
    313                         os << string( indent+2, ' ' ) << "instantiated with actual parameters " << endl;
    314                         aggregate->actuals->printList( os, indent+4 );
    315                 } // if
    316                 if ( aggregate->members ) {
    317                         os << string( indent+2, ' ' ) << "with members " << endl;
    318                         aggregate->members->printList( os, indent+4 );
     313                        os << string( indent + 2, ' ' ) << "instantiated with actual parameters " << endl;
     314                        aggregate->actuals->printList( os, indent + 4 );
     315                } // if
     316                if ( aggregate->fields ) {
     317                        os << string( indent + 2, ' ' ) << "with members " << endl;
     318                        aggregate->fields->printList( os, indent + 4 );
    319319///     } else {
    320 ///       os << string( indent+2, ' ' ) << "with no members " << endl;
     320///       os << string( indent + 2, ' ' ) << "with no members " << endl;
    321321                } // if
    322322                break;
     
    329329                } // if
    330330                if ( aggInst->params ) {
    331                         os << string( indent+2, ' ' ) << "with parameters " << endl;
    332                         aggInst->params->printList( os, indent+2 );
     331                        os << string( indent + 2, ' ' ) << "with parameters " << endl;
     332                        aggInst->params->printList( os, indent + 2 );
    333333                } // if
    334334                break;
     
    337337                if ( enumeration->constants ) {
    338338                        os << "with constants" << endl;
    339                         enumeration->constants->printList( os, indent+2 );
     339                        enumeration->constants->printList( os, indent + 2 );
    340340                } // if
    341341                break;
     
    354354                } // if
    355355                if ( symbolic->params ) {
    356                         os << endl << string( indent+2, ' ' ) << "with parameters" << endl;
     356                        os << endl << string( indent + 2, ' ' ) << "with parameters" << endl;
    357357                        symbolic->params->printList( os, indent + 2 );
    358358                } // if
    359359                if ( symbolic->assertions ) {
    360                         os << endl << string( indent+2, ' ' ) << "with assertions" << endl;
     360                        os << endl << string( indent + 2, ' ' ) << "with assertions" << endl;
    361361                        symbolic->assertions->printList( os, indent + 4 );
    362                         os << string( indent+2, ' ' );
     362                        os << string( indent + 2, ' ' );
    363363                } // if
    364364                if ( base ) {
     
    370370                os << DeclarationNode::typeClassName[ variable->tyClass ] << " variable ";
    371371                if ( variable->assertions ) {
    372                         os << endl << string( indent+2, ' ' ) << "with assertions" << endl;
     372                        os << endl << string( indent + 2, ' ' ) << "with assertions" << endl;
    373373                        variable->assertions->printList( os, indent + 4 );
    374                         os << string( indent+2, ' ' );
     374                        os << string( indent + 2, ' ' );
    375375                } // if
    376376                break;
     
    405405        switch ( kind ) {
    406406          case Aggregate:
    407                 if ( ! toplevel && aggregate->members ) {
     407                if ( ! toplevel && aggregate->fields ) {
    408408                        ret = clone();
    409409                        ret->qualifiers.clear();
     
    515515                assert( false );
    516516        } // switch
    517 
    518517        return 0;
    519518}
     
    815814        } // switch
    816815        buildList( aggregate->params, at->get_parameters() );
    817         buildList( aggregate->members, at->get_members() );
     816        buildList( aggregate->fields, at->get_members() );
    818817
    819818        return at;
Note: See TracChangeset for help on using the changeset viewer.