- Timestamp:
- Jan 20, 2021, 4:49:40 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 454f478
- Parents:
- 92bfda0 (diff), fd54fef (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. - Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/parser.yy
r92bfda0 rdafbde8 2441 2441 type_parameter: // CFA 2442 2442 type_class identifier_or_type_name 2443 { typedefTable.addToScope( *$2, TYPEDEFname, "9" ); } 2443 { typedefTable.addToScope( *$2, TYPEDEFname, "9" ); 2444 if ( $1 == TypeDecl::Otype ) { SemanticError( yylloc, "otype keyword is deprecated" ); } 2445 if ( $1 == TypeDecl::Dtype ) { SemanticError( yylloc, "dtype keyword is deprecated" ); } 2446 if ( $1 == TypeDecl::Ttype ) { SemanticError( yylloc, "ttype keyword is deprecated" ); } 2447 } 2444 2448 type_initializer_opt assertion_list_opt 2445 2449 { $$ = DeclarationNode::newTypeParam( $1, $2 )->addTypeInitializer( $4 )->addAssertions( $5 ); } -
src/ResolvExpr/PolyCost.cc
r92bfda0 rdafbde8 35 35 PassVisitor<PolyCost> coster( env, indexer ); 36 36 type->accept( coster ); 37 return coster.pass.result;37 return (coster.pass.result > 0) ? 1 : 0; 38 38 } 39 39 … … 87 87 ast::Pass<PolyCost_new> costing( symtab, env ); 88 88 type->accept( costing ); 89 return costing.core.result;89 return (costing.core.result > 0) ? 1 : 0; 90 90 } 91 91 -
src/ResolvExpr/SpecCost.cc
r92bfda0 rdafbde8 43 43 // mark specialization of base type 44 44 void postvisit(ReferenceType*) { if ( count >= 0 ) ++count; } 45 46 void postvisit(StructInstType*) { if ( count >= 0 ) ++count; } 47 void postvisit(UnionInstType*) { if ( count >= 0 ) ++count; } 45 48 46 49 private: … … 82 85 void previsit(StructInstType* sty) { 83 86 count = minover( sty->parameters ); 84 visit_children = false;85 87 } 86 88 … … 88 90 void previsit(UnionInstType* uty) { 89 91 count = minover( uty->parameters ); 90 visit_children = false;91 92 } 92 93 … … 174 175 void postvisit( const ast::ArrayType * ) { if ( count >= 0 ) ++count; } 175 176 void postvisit( const ast::ReferenceType * ) { if ( count >= 0 ) ++count; } 177 178 void postvisit( const ast::StructInstType * ) { if ( count >= 0 ) ++count; } 179 void postvisit( const ast::UnionInstType * ) { if ( count >= 0 ) ++count; } 176 180 177 181 // Use the minimal specialization value over returns and params. … … 189 193 void previsit( const ast::StructInstType * sty ) { 190 194 count = minimumPresent( sty->params, expr_result ); 191 visit_children = false;192 195 } 193 196 … … 195 198 void previsit( const ast::UnionInstType * uty ) { 196 199 count = minimumPresent( uty->params, expr_result ); 197 visit_children = false;198 200 } 199 201
Note:
See TracChangeset
for help on using the changeset viewer.