Changeset 4616622 for src/GenPoly/Box.cc
- Timestamp:
- Feb 8, 2023, 3:07:57 PM (15 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 46ab782, 5e3f1e1
- Parents:
- 2d028039 (diff), ccb29b4 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
r2d028039 r4616622 488 488 for ( FunctionType const * const funType : functions ) { 489 489 std::string mangleName = mangleAdapterName( funType, scopeTyVars ); 490 if ( adapters.find( mangleName ) == adapters.end() ) {490 if ( !adapters.contains( mangleName ) ) { 491 491 std::string adapterName = makeAdapterName( mangleName ); 492 492 adapters.insert( std::pair< std::string, DeclarationWithType *>( mangleName, new ObjectDecl( adapterName, Type::StorageClasses(), LinkageSpec::C, nullptr, new PointerType( Type::Qualifiers(), makeAdapterType( funType, scopeTyVars ) ), nullptr ) ) ); … … 1487 1487 if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( ty ) ) { 1488 1488 // do not try to monomorphize generic parameters 1489 if ( scopeTyVars. find( typeInst->get_name() ) != scopeTyVars.end() && ! genericParams.count( typeInst->name ) ) {1489 if ( scopeTyVars.contains( typeInst->get_name() ) && ! genericParams.count( typeInst->name ) ) { 1490 1490 // polymorphic aggregate members should be converted into monomorphic members. 1491 1491 // Using char[size_T] here respects the expected sizing rules of an aggregate type. … … 1696 1696 1697 1697 if ( auto typeInst = dynamic_cast< TypeInstType const * >( ty ) ) { 1698 if ( scopeTyVars. find( typeInst->get_name() ) != scopeTyVars.end() ) {1698 if ( scopeTyVars.contains( typeInst->get_name() ) ) { 1699 1699 // NOTE assumes here that getting put in the scopeTyVars included having the layout variables set 1700 1700 return true; … … 1704 1704 // check if this type already has a layout generated for it 1705 1705 std::string typeName = mangleType( ty ); 1706 if ( knownLayouts. find( typeName ) != knownLayouts.end() ) return true;1706 if ( knownLayouts.contains( typeName ) ) return true; 1707 1707 1708 1708 // check if any of the type parameters have dynamic layout; if none do, this type is (or will be) monomorphized … … 1741 1741 // check if this type already has a layout generated for it 1742 1742 std::string typeName = mangleType( ty ); 1743 if ( knownLayouts. find( typeName ) != knownLayouts.end() ) return true;1743 if ( knownLayouts.contains( typeName ) ) return true; 1744 1744 1745 1745 // check if any of the type parameters have dynamic layout; if none do, this type is (or will be) monomorphized … … 1832 1832 } else { 1833 1833 std::string offsetName = offsetofName( mangleType( ty ) ); 1834 if ( knownOffsets. find( offsetName ) != knownOffsets.end() ) {1834 if ( knownOffsets.contains( offsetName ) ) { 1835 1835 // use the already-generated offsets for this type 1836 1836 ret = new NameExpr( offsetName );
Note: See TracChangeset
for help on using the changeset viewer.