Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/TupleAssignment.cc

    r938dd75 r9058414  
    281281        }
    282282
    283         // removes environments from subexpressions within statement exprs, which could throw off later passes like those in Box which rely on PolyMutator, and adds the bindings to the compositeEnv
     283        // removes environments from subexpressions within statement exprs, which could throw off later passes like those in Box which rely on PolyMutator.
    284284        // xxx - maybe this should happen in alternative finder for every StmtExpr?
     285        // xxx - it's possible that these environments could contain some useful information. Maybe the right thing to do is aggregate the environments and pass the aggregate back to be added into the compositeEnv
    285286        struct EnvRemover {
    286287                void previsit( ExprStmt * stmt ) {
    287                         assert( compositeEnv );
    288                         if ( stmt->expr->env ) {
    289                                 compositeEnv->add( *stmt->expr->env );
    290                                 delete stmt->expr->env;
    291                                 stmt->expr->env = nullptr;
    292                         }
    293                 }
    294 
    295                 ResolvExpr::TypeEnvironment * compositeEnv = nullptr;
     288                        delete stmt->expr->env;
     289                        stmt->expr->env = nullptr;
     290                }
    296291        };
    297292
     
    305300                        ResolvExpr::resolveCtorInit( ctorInit, spotter.currentFinder.get_indexer() ); // resolve ctor/dtors for the new object
    306301                        PassVisitor<EnvRemover> rm; // remove environments from subexpressions of StmtExprs
    307                         rm.pass.compositeEnv = &compositeEnv;
    308302                        ctorInit->accept( rm );
    309303                }
Note: See TracChangeset for help on using the changeset viewer.