Changes in src/Tuples/TupleAssignment.cc [938dd75:9058414]
- File:
-
- 1 edited
-
src/Tuples/TupleAssignment.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/TupleAssignment.cc
r938dd75 r9058414 281 281 } 282 282 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 compositeEnv283 // removes environments from subexpressions within statement exprs, which could throw off later passes like those in Box which rely on PolyMutator. 284 284 // 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 285 286 struct EnvRemover { 286 287 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 } 296 291 }; 297 292 … … 305 300 ResolvExpr::resolveCtorInit( ctorInit, spotter.currentFinder.get_indexer() ); // resolve ctor/dtors for the new object 306 301 PassVisitor<EnvRemover> rm; // remove environments from subexpressions of StmtExprs 307 rm.pass.compositeEnv = &compositeEnv;308 302 ctorInit->accept( rm ); 309 303 }
Note:
See TracChangeset
for help on using the changeset viewer.