Changes in src/Parser/DeclarationNode.cc [de62360d:721f17a]
- File:
-
- 1 edited
-
src/Parser/DeclarationNode.cc (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
rde62360d r721f17a 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 24 15:29:19201513 // Update Count : 8612 // Last Modified On : Fri Jun 26 23:36:03 2015 13 // Update Count : 105 14 14 // 15 15 … … 173 173 } 174 174 175 DeclarationNode *DeclarationNode::newAggregate( Aggregate kind, std::string *name, DeclarationNode *formals,ExpressionNode *actuals, DeclarationNode *fields ) {175 DeclarationNode *DeclarationNode::newAggregate( Aggregate kind, std::string *name, ExpressionNode *actuals, DeclarationNode *fields ) { 176 176 DeclarationNode *newnode = new DeclarationNode; 177 177 newnode->type = new TypeData( TypeData::Aggregate ); … … 189 189 newnode->appendList( typedf->addType( newnode->clone() )->addTypedef() ); 190 190 191 newnode->type->aggregate->params = formals;192 191 newnode->type->aggregate->actuals = actuals; 193 newnode->type->aggregate-> members = fields;192 newnode->type->aggregate->fields = fields; 194 193 return newnode; 195 194 } … … 251 250 newnode->type->aggregate->kind = Context; 252 251 newnode->type->aggregate->params = params; 253 newnode->type->aggregate-> members = asserts;252 newnode->type->aggregate->fields = asserts; 254 253 newnode->type->aggregate->name = assign_strptr( name ); 255 254 return newnode; … … 371 370 if ( type->kind == TypeData::Aggregate ) { 372 371 type->aggregate->params = q->type->forall; 372 // change implicit typedef from TYPEDEFname to TYPEGENname 373 typedefTable.changeKind( type->aggregate->name, TypedefTable::TG ); 373 374 } else { 374 375 type->forall = q->type->forall; … … 407 408 src = 0; 408 409 break; 409 410 410 case TypeData::Basic: 411 411 dst->qualifiers.splice( dst->qualifiers.end(), src->qualifiers ); … … 416 416 } // if 417 417 break; 418 419 418 default: 420 419 switch ( src->kind ) { … … 429 428 src = 0; 430 429 break; 431 432 430 default: 433 431 if ( dst->forall ) { … … 684 682 } else { 685 683 assert( newnode->type->aggInst->aggregate->kind == TypeData::Aggregate ); 686 delete newnode->type->aggInst->aggregate->aggregate-> members;687 newnode->type->aggInst->aggregate->aggregate-> members = 0;684 delete newnode->type->aggInst->aggregate->aggregate->fields; 685 newnode->type->aggInst->aggregate->aggregate->fields = 0; 688 686 } // if 689 687 } // if … … 710 708 } else { 711 709 assert( newType->aggInst->aggregate->kind == TypeData::Aggregate ); 712 delete newType->aggInst->aggregate->aggregate-> members;713 newType->aggInst->aggregate->aggregate-> members = 0;710 delete newType->aggInst->aggregate->aggregate->fields; 711 newType->aggInst->aggregate->aggregate->fields = 0; 714 712 } // if 715 713 } // if
Note:
See TracChangeset
for help on using the changeset viewer.