Changeset beefc34c for src/Parser/DeclarationNode.cc
- Timestamp:
- Jun 7, 2018, 6:12:11 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
- Children:
- 6eb131c, 7b28e4a
- Parents:
- 174845e (diff), 85b1deb (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r174845e rbeefc34c 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue May 22 08:39:29201813 // Update Count : 107 412 // Last Modified On : Thu Jun 7 12:08:55 2018 13 // Update Count : 1079 14 14 // 15 15 … … 174 174 } 175 175 176 DeclarationNode * DeclarationNode::newFunction( string * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body ) {176 DeclarationNode * DeclarationNode::newFunction( const string * name, DeclarationNode * ret, DeclarationNode * param, StatementNode * body ) { 177 177 DeclarationNode * newnode = new DeclarationNode; 178 178 newnode->name = name; … … 245 245 } // DeclarationNode::newForall 246 246 247 DeclarationNode * DeclarationNode::newFromTypedef( string * name ) {247 DeclarationNode * DeclarationNode::newFromTypedef( const string * name ) { 248 248 DeclarationNode * newnode = new DeclarationNode; 249 249 newnode->type = new TypeData( TypeData::SymbolicInst ); … … 268 268 } // DeclarationNode::newAggregate 269 269 270 DeclarationNode * DeclarationNode::newEnum( string * name, DeclarationNode * constants, bool body ) {270 DeclarationNode * DeclarationNode::newEnum( const string * name, DeclarationNode * constants, bool body ) { 271 271 assert( name ); 272 272 DeclarationNode * newnode = new DeclarationNode; … … 278 278 } // DeclarationNode::newEnum 279 279 280 DeclarationNode * DeclarationNode::newEnumConstant( string * name, ExpressionNode * constant ) {280 DeclarationNode * DeclarationNode::newEnumConstant( const string * name, ExpressionNode * constant ) { 281 281 DeclarationNode * newnode = new DeclarationNode; 282 282 newnode->name = name; … … 285 285 } // DeclarationNode::newEnumConstant 286 286 287 DeclarationNode * DeclarationNode::newName( string * name ) {287 DeclarationNode * DeclarationNode::newName( const string * name ) { 288 288 DeclarationNode * newnode = new DeclarationNode; 289 289 newnode->name = name; … … 291 291 } // DeclarationNode::newName 292 292 293 DeclarationNode * DeclarationNode::newFromTypeGen( string * name, ExpressionNode * params ) {293 DeclarationNode * DeclarationNode::newFromTypeGen( const string * name, ExpressionNode * params ) { 294 294 DeclarationNode * newnode = new DeclarationNode; 295 295 newnode->type = new TypeData( TypeData::SymbolicInst ); … … 300 300 } // DeclarationNode::newFromTypeGen 301 301 302 DeclarationNode * DeclarationNode::newTypeParam( TypeClass tc, string * name ) {302 DeclarationNode * DeclarationNode::newTypeParam( TypeClass tc, const string * name ) { 303 303 DeclarationNode * newnode = new DeclarationNode; 304 304 newnode->type = nullptr; … … 331 331 } // DeclarationNode::newTraitUse 332 332 333 DeclarationNode * DeclarationNode::newTypeDecl( string * name, DeclarationNode * typeParams ) {333 DeclarationNode * DeclarationNode::newTypeDecl( const string * name, DeclarationNode * typeParams ) { 334 334 DeclarationNode * newnode = new DeclarationNode; 335 335 newnode->name = name; … … 406 406 } // DeclarationNode::newBuiltinType 407 407 408 DeclarationNode * DeclarationNode::newAttr( string * name, ExpressionNode * expr ) {408 DeclarationNode * DeclarationNode::newAttr( const string * name, ExpressionNode * expr ) { 409 409 DeclarationNode * newnode = new DeclarationNode; 410 410 newnode->type = nullptr; … … 415 415 } 416 416 417 DeclarationNode * DeclarationNode::newAttr( string * name, DeclarationNode * type ) {417 DeclarationNode * DeclarationNode::newAttr( const string * name, DeclarationNode * type ) { 418 418 DeclarationNode * newnode = new DeclarationNode; 419 419 newnode->type = nullptr; … … 424 424 } 425 425 426 DeclarationNode * DeclarationNode::newAttribute( string * name, ExpressionNode * expr ) {426 DeclarationNode * DeclarationNode::newAttribute( const string * name, ExpressionNode * expr ) { 427 427 DeclarationNode * newnode = new DeclarationNode; 428 428 newnode->type = nullptr; … … 545 545 type->aggregate.params->appendList( q->type->forall ); // augment forall qualifier 546 546 } else { // not polymorphic 547 type->aggregate.params = q->type->forall; // make polymorphic type 548 // change implicit typedef from TYPEDEFname to TYPEGENname 549 typedefTable.changeKind( *type->aggregate.name, TYPEGENname ); 547 type->aggregate.params = q->type->forall; // set forall qualifier 550 548 } // if 551 549 } else { // not polymorphic
Note: See TracChangeset
for help on using the changeset viewer.