Ignore:
Timestamp:
May 17, 2015, 1:19:35 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
0dd3a2f
Parents:
b87a5ed
Message:

licencing: second groups of files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/GenPoly/PolyMutator.cc

    rb87a5ed ra32b204  
    2828PolyMutator::mutateStatementList( std::list< Statement* > &statements )
    2929{
    30   for( std::list< Statement* >::iterator i = statements.begin(); i != statements.end(); ++i ) {
    31     if( !stmtsToAddAfter.empty() ) {
     30  for ( std::list< Statement* >::iterator i = statements.begin(); i != statements.end(); ++i ) {
     31    if ( ! stmtsToAddAfter.empty() ) {
    3232      statements.splice( i, stmtsToAddAfter );
    3333    }
    3434    *i = (*i)->acceptMutator( *this );
    35     if( !stmtsToAdd.empty() ) {
     35    if ( ! stmtsToAdd.empty() ) {
    3636      statements.splice( i, stmtsToAdd );
    3737    }
    3838  }
    39   if( !stmtsToAddAfter.empty() ) {
     39  if ( ! stmtsToAddAfter.empty() ) {
    4040    statements.splice( statements.end(), stmtsToAddAfter );
    4141  }
     
    4646{
    4747  Statement *newStmt = maybeMutate( stmt, *this );
    48   if( !stmtsToAdd.empty() || !stmtsToAddAfter.empty() ) {
     48  if ( ! stmtsToAdd.empty() || ! stmtsToAddAfter.empty() ) {
    4949    CompoundStmt *compound = new CompoundStmt( noLabels );
    5050    compound->get_kids().splice( compound->get_kids().end(), stmtsToAdd );
     
    6161PolyMutator::mutateExpression( Expression *expr )
    6262{
    63   if( expr ) {
    64     if( expr->get_env() ) {
     63  if ( expr ) {
     64    if ( expr->get_env() ) {
    6565      env = expr->get_env();
    6666    }
     
    167167PolyMutator::mutate(UntypedExpr *untypedExpr)
    168168{
    169   for( std::list< Expression* >::iterator i = untypedExpr->get_args().begin(); i != untypedExpr->get_args().end(); ++i ) {
     169  for ( std::list< Expression* >::iterator i = untypedExpr->get_args().begin(); i != untypedExpr->get_args().end(); ++i ) {
    170170    *i = mutateExpression( *i );
    171171  }
     
    177177PolyMutator::makeTyVarMap( Type *type, TyVarMap &tyVarMap )
    178178{
    179   for( std::list< TypeDecl* >::const_iterator tyVar = type->get_forall().begin(); tyVar != type->get_forall().end(); ++tyVar ) {
     179  for ( std::list< TypeDecl* >::const_iterator tyVar = type->get_forall().begin(); tyVar != type->get_forall().end(); ++tyVar ) {
    180180    assert( *tyVar );
    181181    tyVarMap[ (*tyVar)->get_name() ] = (*tyVar)->get_kind();
    182182  }
    183   if( PointerType *pointer = dynamic_cast< PointerType* >( type ) ) {
     183  if ( PointerType *pointer = dynamic_cast< PointerType* >( type ) ) {
    184184    makeTyVarMap( pointer->get_base(), tyVarMap );
    185185  }
Note: See TracChangeset for help on using the changeset viewer.