Changeset dd05e12
- Timestamp:
- Mar 2, 2018, 5:34:51 PM (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:
- 09c72d5
- Parents:
- 986dd36
- git-author:
- Rob Schluntz <rschlunt@…> (03/02/18 17:08:09)
- git-committer:
- Rob Schluntz <rschlunt@…> (03/02/18 17:34:51)
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/InitTweak/FixInit.cc
r986dd36 rdd05e12 448 448 ResolvExpr::findVoidExpression( resolved, indexer ); 449 449 assert( resolved ); 450 if ( resolved-> get_env()) {450 if ( resolved->env ) { 451 451 // Extract useful information and discard new environments. Keeping them causes problems in PolyMutator passes. 452 env->add( *resolved-> get_env());453 delete resolved-> get_env();454 resolved-> set_env( nullptr );452 env->add( *resolved->env ); 453 delete resolved->env; 454 resolved->env = nullptr; 455 455 } // if 456 456 delete stmt; -
src/ResolvExpr/Resolver.cc
r986dd36 rdd05e12 788 788 stmtExpr->accept( resolver ); 789 789 stmtExpr->computeResult(); 790 // xxx - aggregate the environments from all statements? Possibly in AlternativeFinder instead? 790 791 } 791 792 … … 793 794 visit_children = false; 794 795 // xxx - fallback init has been removed => remove fallbackInit function and remove complexity from FixInit and remove C-init from ConstructorInit 795 maybeAccept( ctorInit-> get_ctor(), *visitor );796 maybeAccept( ctorInit-> get_dtor(), *visitor );796 maybeAccept( ctorInit->ctor, *visitor ); 797 maybeAccept( ctorInit->dtor, *visitor ); 797 798 798 799 // found a constructor - can get rid of C-style initializer 799 delete ctorInit-> get_init();800 ctorInit-> set_init( NULL );800 delete ctorInit->init; 801 ctorInit->init = nullptr; 801 802 802 803 // intrinsic single parameter constructors and destructors do nothing. Since this was 803 804 // implicitly generated, there's no way for it to have side effects, so get rid of it 804 805 // to clean up generated code. 805 if ( InitTweak::isIntrinsicSingleArgCallStmt( ctorInit-> get_ctor()) ) {806 delete ctorInit-> get_ctor();807 ctorInit-> set_ctor( NULL );808 } 809 810 if ( InitTweak::isIntrinsicSingleArgCallStmt( ctorInit-> get_dtor()) ) {811 delete ctorInit-> get_dtor();812 ctorInit-> set_dtor( NULL );806 if ( InitTweak::isIntrinsicSingleArgCallStmt( ctorInit->ctor ) ) { 807 delete ctorInit->ctor; 808 ctorInit->ctor = nullptr; 809 } 810 811 if ( InitTweak::isIntrinsicSingleArgCallStmt( ctorInit->dtor ) ) { 812 delete ctorInit->dtor; 813 ctorInit->dtor = nullptr; 813 814 } 814 815
Note: See TracChangeset
for help on using the changeset viewer.