Changeset 0e7ea335
- Timestamp:
- Mar 8, 2017, 3:27:26 PM (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:
- 3f414ef, 861799c
- Parents:
- 65e9bc1 (diff), be8bd88 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeTools/DeclStats.cc
r65e9bc1 r0e7ea335 186 186 auto& args = expr->get_args(); 187 187 unsigned fanout = args.size(); 188 188 189 ++exprs_by_fanout_at_depth[ std::make_pair(depth, fanout) ]; 189 190 for ( Expression* arg : args ) { -
src/GenPoly/InstantiateGeneric.cc
r65e9bc1 r0e7ea335 226 226 227 227 if ( (*baseParam)->isComplete() ) { 228 // substitute parameter for complete (otype or sized dtype) type; makes the struct concrete or dynamic depending on the parameter 229 out.push_back( paramType->clone() ); 228 // substitute parameter for complete (otype or sized dtype) type 229 int pointerLevels = 0; 230 if ( hasPolyBase( paramType->get_type(), &pointerLevels ) && pointerLevels > 0 ) { 231 // Make a void* with equivalent nesting 232 Type* voidPtr = new VoidType( Type::Qualifiers() ); 233 while ( pointerLevels > 0 ) { 234 // Just about data layout, so qualifiers *shouldn't* matter 235 voidPtr = new PointerType( Type::Qualifiers(), voidPtr ); 236 --pointerLevels; 237 } 238 out.push_back( new TypeExpr( voidPtr ) ); 239 } else { 240 // Just clone parameter type 241 out.push_back( paramType->clone() ); 242 } 243 // make the struct concrete or dynamic depending on the parameter 230 244 gt |= isPolyType( paramType->get_type() ) ? genericType::dynamic : genericType::concrete; 231 245 } else switch ( (*baseParam)->get_kind() ) {
Note: See TracChangeset
for help on using the changeset viewer.