Changeset 68f9c43 for src/Common
- Timestamp:
- Mar 16, 2018, 5:15:02 PM (6 years ago)
- Branches:
- new-env, with_gc
- Children:
- 8d7bef2
- Parents:
- 6171841
- git-author:
- Aaron Moss <a3moss@…> (03/16/18 17:04:24)
- git-committer:
- Aaron Moss <a3moss@…> (03/16/18 17:15:02)
- Location:
- src/Common
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.h
r6171841 r68f9c43 152 152 virtual void visit( Attribute * attribute ) override final; 153 153 154 virtual void visit( TypeSubstitution * sub ) final; 155 154 156 virtual DeclarationWithType * mutate( ObjectDecl * objectDecl ) override final; 155 157 virtual DeclarationWithType * mutate( FunctionDecl * functionDecl ) override final; -
src/Common/PassVisitor.impl.h
r6171841 r68f9c43 2556 2556 // TypeSubstitution 2557 2557 template< typename pass_type > 2558 void PassVisitor< pass_type >::visit( TypeSubstitution * node ) { 2559 VISIT_START( node ); 2560 2561 for ( auto & p : node->typeEnv ) { 2562 indexerScopedAccept( p.second, *this ); 2563 } 2564 for ( auto & p : node->varEnv ) { 2565 indexerScopedAccept( p.second, *this ); 2566 } 2567 2568 VISIT_END( node ); 2569 } 2570 2571 template< typename pass_type > 2558 2572 TypeSubstitution * PassVisitor< pass_type >::mutate( TypeSubstitution * node ) { 2559 2573 MUTATE_START( node ); -
src/Common/module.mk
r6171841 r68f9c43 18 18 Common/UniqueName.cc \ 19 19 Common/DebugMalloc.cc \ 20 Common/GC.cc \ 20 21 Common/Assert.cc -
src/Common/utility.h
r6171841 r68f9c43 190 190 191 191 template <typename E, typename UnaryPredicate, template< typename, typename...> class Container, typename... Args > 192 void filter( Container< E *, Args... > & container, UnaryPredicate pred , bool doDelete) {192 void filter( Container< E *, Args... > & container, UnaryPredicate pred ) { 193 193 auto i = begin( container ); 194 194 while ( i != end( container ) ) { 195 195 auto it = next( i ); 196 196 if ( pred( *i ) ) { 197 if ( doDelete ) {198 delete *i;199 } // if200 197 container.erase( i ); 201 198 } // if
Note: See TracChangeset
for help on using the changeset viewer.