Changeset 906e24d for src/ResolvExpr/typeops.h
- Timestamp:
- Sep 15, 2016, 10:17:16 AM (8 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:
- aa8f9df
- Parents:
- 96a10cd
- git-author:
- Rob Schluntz <rschlunt@…> (09/14/16 22:32:34)
- git-committer:
- Rob Schluntz <rschlunt@…> (09/15/16 10:17:16)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/typeops.h
r96a10cd r906e24d 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // typeops.h -- 7 // typeops.h -- 8 8 // 9 9 // Author : Richard C. Bilson … … 30 30 typedef typename InputIterator::value_type SetType; 31 31 typedef typename std::list< typename SetType::value_type > ListType; 32 32 33 33 if ( begin == end ) { 34 34 *out++ = ListType(); 35 35 return; 36 36 } // if 37 37 38 38 InputIterator current = begin; 39 39 begin++; … … 41 41 std::list< ListType > recursiveResult; 42 42 combos( begin, end, back_inserter( recursiveResult ) ); 43 43 44 44 for ( typename std::list< ListType >::const_iterator i = recursiveResult.begin(); i != recursiveResult.end(); ++i ) { 45 45 for ( typename ListType::const_iterator j = current->begin(); j != current->end(); ++j ) { … … 52 52 } // for 53 53 } 54 54 55 55 // in AdjustExprType.cc 56 56 /// Replaces array types with the equivalent pointer, and function types with a pointer-to-function … … 144 144 } 145 145 146 /// creates the type represented by the list of returnVals in a FunctionType. The caller owns the return value. 147 Type * extractResultType( FunctionType * functionType ); 148 146 149 // in CommonType.cc 147 150 Type *commonType( Type *type1, Type *type2, bool widenFirst, bool widenSecond, const SymTab::Indexer &indexer, TypeEnvironment &env, const OpenVarSet &openVars ); … … 152 155 // in Occurs.cc 153 156 bool occurs( Type *type, std::string varName, const TypeEnvironment &env ); 157 158 // flatten tuple type into list of types 159 template< typename OutputIterator > 160 void flatten( Type * type, OutputIterator out ) { 161 if ( TupleType * tupleType = dynamic_cast< TupleType * >( type ) ) { 162 for ( Type * t : tupleType->get_types() ) { 163 flatten( t, out ); 164 } 165 } else { 166 *out++ = type; 167 } 168 } 154 169 } // namespace ResolvExpr 155 170
Note: See TracChangeset
for help on using the changeset viewer.