Changeset f1f481a


Ignore:
Timestamp:
Oct 28, 2022, 5:54:15 PM (18 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
0b1ca47
Parents:
15c93d8
Message:

Cleaning old box pass for easier translation. Removing unused functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    r15c93d8 rf1f481a  
    221221        } // anonymous namespace
    222222
    223         /// version of mutateAll with special handling for translation unit so you can check the end of the prelude when debugging
    224         template< typename MutatorType >
    225         inline void mutateTranslationUnit( std::list< Declaration* > &translationUnit, MutatorType &mutator ) {
    226                 bool seenIntrinsic = false;
    227                 SemanticErrorException errors;
    228                 for ( typename std::list< Declaration* >::iterator i = translationUnit.begin(); i != translationUnit.end(); ++i ) {
    229                         try {
    230                                 if ( *i ) {
    231                                         if ( (*i)->get_linkage() == LinkageSpec::Intrinsic ) {
    232                                                 seenIntrinsic = true;
    233                                         } else if ( seenIntrinsic ) {
    234                                                 seenIntrinsic = false; // break on this line when debugging for end of prelude
    235                                         }
    236 
    237                                         *i = dynamic_cast< Declaration* >( (*i)->acceptMutator( mutator ) );
    238                                         assert( *i );
    239                                 } // if
    240                         } catch( SemanticErrorException &e ) {
    241                                 errors.append( e );
    242                         } // try
    243                 } // for
    244                 if ( ! errors.isEmpty() ) {
    245                         throw errors;
    246                 } // if
    247         }
    248 
    249223        void box( std::list< Declaration *>& translationUnit ) {
    250224                PassVisitor<LayoutFunctionBuilder> layoutBuilder;
     
    306280                layoutDecl->fixUniqueId();
    307281                return layoutDecl;
    308         }
    309 
    310         /// Makes a unary operation
    311         Expression *makeOp( const std::string &name, Expression *arg ) {
    312                 UntypedExpr *expr = new UntypedExpr( new NameExpr( name ) );
    313                 expr->args.push_back( arg );
    314                 return expr;
    315282        }
    316283
Note: See TracChangeset for help on using the changeset viewer.