Changes in / [0e7ea335:65e9bc1]
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeTools/DeclStats.cc
r0e7ea335 r65e9bc1 186 186 auto& args = expr->get_args(); 187 187 unsigned fanout = args.size(); 188 189 188 ++exprs_by_fanout_at_depth[ std::make_pair(depth, fanout) ]; 190 189 for ( Expression* arg : args ) { -
src/GenPoly/InstantiateGeneric.cc
r0e7ea335 r65e9bc1 226 226 227 227 if ( (*baseParam)->isComplete() ) { 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 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() ); 244 230 gt |= isPolyType( paramType->get_type() ) ? genericType::dynamic : genericType::concrete; 245 231 } else switch ( (*baseParam)->get_kind() ) {
Note: See TracChangeset
for help on using the changeset viewer.