Changeset 2449aef
- Timestamp:
- Dec 1, 2017, 10:37:19 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 82f3226
- Parents:
- 027c496
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Tuples/TupleAssignment.cc ¶
r027c496 r2449aef 23 23 24 24 #include "CodeGen/OperatorTable.h" 25 #include "Common/PassVisitor.h" 25 26 #include "Common/UniqueName.h" // for UniqueName 26 27 #include "Common/utility.h" // for zipWith … … 277 278 // xxx - maybe this should happen in alternative finder for every StmtExpr? 278 279 // 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 279 struct EnvRemover : public Visitor { 280 virtual void visit( ExprStmt * stmt ) { 281 delete stmt->get_expr()->get_env(); 282 stmt->get_expr()->set_env( nullptr ); 283 Visitor::visit( stmt ); 280 struct EnvRemover { 281 void previsit( ExprStmt * stmt ) { 282 delete stmt->expr->env; 283 stmt->expr->env = nullptr; 284 284 } 285 285 }; … … 293 293 ret->set_init( ctorInit ); 294 294 ResolvExpr::resolveCtorInit( ctorInit, spotter.currentFinder.get_indexer() ); // resolve ctor/dtors for the new object 295 EnvRemoverrm; // remove environments from subexpressions of StmtExprs295 PassVisitor<EnvRemover> rm; // remove environments from subexpressions of StmtExprs 296 296 ctorInit->accept( rm ); 297 297 }
Note: See TracChangeset
for help on using the changeset viewer.