Changeset 4616622 for src/GenPoly/Box.cc


Ignore:
Timestamp:
Feb 8, 2023, 3:07:57 PM (15 months ago)
Author:
caparson <caparson@…>
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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    r2d028039 r4616622  
    488488                                for ( FunctionType const * const funType : functions ) {
    489489                                        std::string mangleName = mangleAdapterName( funType, scopeTyVars );
    490                                         if ( adapters.find( mangleName ) == adapters.end() ) {
     490                                        if ( !adapters.contains( mangleName ) ) {
    491491                                                std::string adapterName = makeAdapterName( mangleName );
    492492                                                adapters.insert( std::pair< std::string, DeclarationWithType *>( mangleName, new ObjectDecl( adapterName, Type::StorageClasses(), LinkageSpec::C, nullptr, new PointerType( Type::Qualifiers(), makeAdapterType( funType, scopeTyVars ) ), nullptr ) ) );
     
    14871487                                        if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( ty ) ) {
    14881488                                                // 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 ) ) {
    14901490                                                        // polymorphic aggregate members should be converted into monomorphic members.
    14911491                                                        // Using char[size_T] here respects the expected sizing rules of an aggregate type.
     
    16961696
    16971697                        if ( auto typeInst = dynamic_cast< TypeInstType const * >( ty ) ) {
    1698                                 if ( scopeTyVars.find( typeInst->get_name() ) != scopeTyVars.end() ) {
     1698                                if ( scopeTyVars.contains( typeInst->get_name() ) ) {
    16991699                                        // NOTE assumes here that getting put in the scopeTyVars included having the layout variables set
    17001700                                        return true;
     
    17041704                                // check if this type already has a layout generated for it
    17051705                                std::string typeName = mangleType( ty );
    1706                                 if ( knownLayouts.find( typeName ) != knownLayouts.end() ) return true;
     1706                                if ( knownLayouts.contains( typeName ) ) return true;
    17071707
    17081708                                // check if any of the type parameters have dynamic layout; if none do, this type is (or will be) monomorphized
     
    17411741                                // check if this type already has a layout generated for it
    17421742                                std::string typeName = mangleType( ty );
    1743                                 if ( knownLayouts.find( typeName ) != knownLayouts.end() ) return true;
     1743                                if ( knownLayouts.contains( typeName ) ) return true;
    17441744
    17451745                                // check if any of the type parameters have dynamic layout; if none do, this type is (or will be) monomorphized
     
    18321832                        } else {
    18331833                                std::string offsetName = offsetofName( mangleType( ty ) );
    1834                                 if ( knownOffsets.find( offsetName ) != knownOffsets.end() ) {
     1834                                if ( knownOffsets.contains( offsetName ) ) {
    18351835                                        // use the already-generated offsets for this type
    18361836                                        ret = new NameExpr( offsetName );
Note: See TracChangeset for help on using the changeset viewer.