Changes in / [65e9bc1:0e7ea335]
- 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.