Changeset 7a780ad for src/Concurrency


Ignore:
Timestamp:
Apr 18, 2024, 5:19:17 PM (4 weeks ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
38093ae
Parents:
60c5b6d
Message:

Moved ast::BasicType::Kind to ast::BasicKind? in its own hearder. This is more consistent with other utility enums (although we still use this as a enum class) and reduces what some files need to include. Also did a upgrade in a comment with MAX_INTEGER_TYPE, it is now part of the enum.

Location:
src/Concurrency
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Concurrency/Corun.cpp

    r60c5b6d r7a780ad  
    130130                new ObjectDecl( loc,
    131131                    numProcsName,
    132                     new BasicType( BasicType::Kind::UnsignedInt ),
     132                    new BasicType( BasicKind::UnsignedInt ),
    133133                    new SingleInit( loc,
    134134                        new UntypedExpr( loc,
     
    146146                new ObjectDecl( loc,
    147147                    currProcsName,
    148                     new BasicType( BasicType::Kind::UnsignedInt ),
     148                    new BasicType( BasicKind::UnsignedInt ),
    149149                    new SingleInit( loc, ConstantExpr::from_int( loc, 0 ) )
    150150                )
  • src/Concurrency/Waitfor.cpp

    r60c5b6d r7a780ad  
    244244        ast::ObjectDecl * flag = new ast::ObjectDecl( location,
    245245                namer_flg.newName(),
    246                 new ast::BasicType( ast::BasicType::Bool ),
     246                new ast::BasicType( ast::BasicKind::Bool ),
    247247                new ast::SingleInit( location,
    248248                        ast::ConstantExpr::from_ulong( location, 0 )
     
    349349        ast::ObjectDecl * timeout = new ast::ObjectDecl( topLocation,
    350350                namer_tim.newName(),
    351                 new ast::BasicType( ast::BasicType::LongLongUnsignedInt ),
     351                new ast::BasicType( ast::BasicKind::LongLongUnsignedInt ),
    352352                new ast::SingleInit( topLocation,
    353353                        ast::ConstantExpr::from_int( topLocation, -1 )
     
    397397        ast::ObjectDecl * index = new ast::ObjectDecl( location,
    398398                namer_idx.newName(),
    399                 new ast::BasicType( ast::BasicType::ShortSignedInt ),
     399                new ast::BasicType( ast::BasicKind::ShortSignedInt ),
    400400                new ast::SingleInit( location,
    401401                        ast::ConstantExpr::from_int( location, -1 )
  • src/Concurrency/Waituntil.cpp

    r60c5b6d r7a780ad  
    498498            rightExpr = genPredExpr( loc, currNode->right, idx, genLeaf );
    499499            return new LogicalExpr( loc,
    500                 new CastExpr( loc, leftExpr, new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ),
    501                 new CastExpr( loc, rightExpr, new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ),
     500                new CastExpr( loc, leftExpr, new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast ),
     501                new CastExpr( loc, rightExpr, new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast ),
    502502                LogicalFlag::AndExpr
    503503            );
     
    507507            rightExpr = genPredExpr( loc, currNode->right, idx, genLeaf );
    508508            return new LogicalExpr( loc,
    509                 new CastExpr( loc, leftExpr, new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ),
    510                 new CastExpr( loc, rightExpr, new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast ),
     509                new CastExpr( loc, leftExpr, new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast ),
     510                new CastExpr( loc, rightExpr, new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast ),
    511511                LogicalFlag::OrExpr );
    512512            break;
     
    556556            new ObjectDecl( loc,
    557557                "clause_statuses",
    558                 new PointerType( new BasicType( BasicType::Kind::LongUnsignedInt ) )
     558                new PointerType( new BasicType( BasicKind::LongUnsignedInt ) )
    559559            )
    560560        },
     
    562562            new ObjectDecl( loc,
    563563                "sat_ret",
    564                 new BasicType( BasicType::Kind::Bool )
     564                new BasicType( BasicKind::Bool )
    565565            )
    566566        },
     
    766766                new ObjectDecl( loc,
    767767                    idxName,
    768                     new BasicType( BasicType::Kind::SignedInt ),
     768                    new BasicType( BasicKind::SignedInt ),
    769769                    new SingleInit( loc, ConstantExpr::from_int( loc, 0 ) )
    770770                )
     
    893893                    new ObjectDecl( cLoc,
    894894                        currClause->whenName,
    895                         new BasicType( BasicType::Kind::Bool ),
     895                        new BasicType( BasicKind::Bool ),
    896896                        new SingleInit( cLoc, ast::deepCopy( stmt->clauses.at(i)->when_cond ) )
    897897                    )
     
    915915                new ObjectDecl( stmt->else_cond->location,
    916916                    elseWhenName,
    917                     new BasicType( BasicType::Kind::Bool ),
     917                    new BasicType( BasicKind::Bool ),
    918918                    new SingleInit( stmt->else_cond->location, ast::deepCopy( stmt->else_cond ) )
    919919                )
     
    945945                    new CastExpr( cLoc,
    946946                        new AddressExpr( cLoc, new NameExpr( cLoc, data.at(i)->nodeName ) ),
    947                         new BasicType( BasicType::Kind::LongUnsignedInt ), GeneratedFlag::ExplicitCast
     947                        new BasicType( BasicKind::LongUnsignedInt ), GeneratedFlag::ExplicitCast
    948948                    )
    949949                }
     
    986986                    new CastExpr( cLoc,
    987987                        new NameExpr( cLoc, elseWhenName ),
    988                         new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast
     988                        new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast
    989989                    ),
    990990                    new CastExpr( cLoc,
    991991                        raceFnCall,
    992                         new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast
     992                        new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast
    993993                    ),
    994994                    LogicalFlag::AndExpr
     
    10161016            new CastExpr( cLoc,
    10171017                new NameExpr( cLoc, data.at(idx)->whenName ),
    1018                 new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast
     1018                new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast
    10191019            ),
    10201020            new CastExpr( cLoc,
    10211021                baseCond,
    1022                 new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast
     1022                new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast
    10231023            ),
    10241024            LogicalFlag::AndExpr
     
    10341034                        new NameExpr( cLoc, data.at(idx)->nodeName ),
    10351035                        new AddressExpr( cLoc, new NameExpr( cLoc, data.at(idx)->statusName ) ),
    1036                         ConstantExpr::null( cLoc, new PointerType( new BasicType( BasicType::Kind::SignedInt ) ) )
     1036                        ConstantExpr::null( cLoc, new PointerType( new BasicType( BasicKind::SignedInt ) ) )
    10371037                    }
    10381038                )
     
    10961096        new ObjectDecl( loc,
    10971097            statusName,
    1098             new BasicType( BasicType::Kind::LongUnsignedInt ),
     1098            new BasicType( BasicKind::LongUnsignedInt ),
    10991099            new SingleInit( loc, ConstantExpr::from_int( loc, 0 ) )
    11001100        )
     
    11141114            new NameExpr( cLoc, "?!=?" ),
    11151115            {
    1116                 ConstantExpr::null( cLoc, new PointerType( new BasicType( BasicType::Kind::LongUnsignedInt ) ) ),
     1116                ConstantExpr::null( cLoc, new PointerType( new BasicType( BasicKind::LongUnsignedInt ) ) ),
    11171117                new UntypedExpr( cLoc,
    11181118                    new NameExpr( cLoc, "__get_clause_status" ),
     
    11281128                new CastExpr( cLoc,
    11291129                    new NameExpr( cLoc, clauseData.at(i)->whenName ),
    1130                     new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast
     1130                    new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast
    11311131                ),
    11321132                new CastExpr( cLoc,
    11331133                    statusPtrCheck,
    1134                     new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast
     1134                    new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast
    11351135                ),
    11361136                LogicalFlag::AndExpr
     
    11621162                new CastExpr( loc,
    11631163                    new NameExpr( loc, clauseData.at( whenIndices.at(i) )->whenName ),
    1164                     new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast
     1164                    new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast
    11651165                ),
    11661166                new CastExpr( loc,
    11671167                    lastExpr,
    1168                     new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast
     1168                    new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast
    11691169                ),
    11701170                LogicalFlag::OrExpr
     
    12201220        new ObjectDecl( loc,
    12211221            pCountName,
    1222             new BasicType( BasicType::Kind::SignedInt ),
     1222            new BasicType( BasicKind::SignedInt ),
    12231223            new SingleInit( loc, ConstantExpr::from_int( loc, 0 ) )
    12241224        )
     
    12291229        new ObjectDecl( loc,
    12301230            statusArrName,
    1231             new ArrayType( new BasicType( BasicType::Kind::LongUnsignedInt ), ConstantExpr::from_int( loc, numClauses ), LengthFlag::FixedLen, DimensionFlag::DynamicDim ),
     1231            new ArrayType( new BasicType( BasicKind::LongUnsignedInt ), ConstantExpr::from_int( loc, numClauses ), LengthFlag::FixedLen, DimensionFlag::DynamicDim ),
    12321232            new ListInit( loc,
    12331233                {
     
    13311331            new CastExpr( cLoc,
    13321332                statusExpr,
    1333                 new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast
     1333                new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast
    13341334            ),
    13351335            new CastExpr( cLoc,
    13361336                genSelectTraitCall( stmt->clauses.at(i), clauseData.at(i), "unregister_select" ),
    1337                 new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast
     1337                new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast
    13381338            ),
    13391339            LogicalFlag::AndExpr
     
    13461346                new CastExpr( cLoc,
    13471347                    new NameExpr( cLoc, clauseData.at(i)->whenName ),
    1348                     new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast
     1348                    new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast
    13491349                ),
    13501350                new CastExpr( cLoc,
    13511351                    statusExpr,
    1352                     new BasicType( BasicType::Kind::Bool ), GeneratedFlag::ExplicitCast
     1352                    new BasicType( BasicKind::Bool ), GeneratedFlag::ExplicitCast
    13531353                ),
    13541354                LogicalFlag::AndExpr
Note: See TracChangeset for help on using the changeset viewer.