Changeset 13d326ec for src/GenPoly


Ignore:
Timestamp:
Jul 26, 2022, 4:45:07 PM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
2af1943
Parents:
1b97cc87
Message:

More clean-up, including some removing some duplicate functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/SpecializeNew.cpp

    r1b97cc87 r13d326ec  
    230230        if ( auto tuple = type.as<ast::TupleType>() ) {
    231231                std::vector<ast::ptr<ast::Expr>> exprs;
    232                 for ( const ast::Type * t : *tuple ) {
     232                for ( const ast::ptr<ast::Type> & t : *tuple ) {
    233233                        exprs.push_back( structureArg( location, t, begin, end ) );
    234234                }
     
    248248                        if (typeMap.count(typeInst->base)) {
    249249                                ast::TypeInstType * newInst = mutate(typeInst);
    250                                 newInst->expr_id = typeMap[typeInst->base].first;
    251                                 newInst->formal_usage = typeMap[typeInst->base].second;
     250                                auto const & pair = typeMap[typeInst->base];
     251                                newInst->expr_id = pair.first;
     252                                newInst->formal_usage = pair.second;
    252253                                return newInst;
    253254                        }
     
    462463        if ( specialized != expr->arg ) {
    463464                // Assume that the specialization incorporates the cast.
    464                 // std::cerr << expr <<std::endl;
    465465                return specialized;
    466466        } else {
Note: See TracChangeset for help on using the changeset viewer.