Changeset 5a4b403


Ignore:
Timestamp:
Nov 30, 2022, 11:50:22 AM (2 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
be1d00c
Parents:
9f70a67b
Message:

Cleaning old box pass for easier translation. I believe I have an explination for why the confusing loop works.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    r9f70a67b r5a4b403  
    563563                        // NOTE: This is iterating over a map. This means the sorting
    564564                        // order of the keys changes behaviour, as the iteration order
    565                         // is visible outside the loop.
    566                         // TODO: I cannot figure out how this gets matched in the later
    567                         // passes the modify the function.
     565                        // is visible outside the loop. - The order matches the orignal
     566                        // order because the vars have been renamed with numbers that,
     567                        // even when converted to strings, sort in the original order.
     568                        // (At least, that is the best explination I have.)
    568569                        for ( std::pair<std::string, TypeDecl::Data> const & tyParam : exprTyVars ) {
    569570                                if ( !tyParam.second.isComplete ) continue;
     
    13281329                        ObjectDecl newPtr( "", Type::StorageClasses(), LinkageSpec::C, 0,
    13291330                                           new PointerType( Type::Qualifiers(), new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ) ), 0 );
    1330                         // NOTE: This loop somehow consistently matching one in
    1331                         // `passTypeVars` even though it does loop in the same way.
    13321331                        for ( TypeDecl * const tyParam : funcType->get_forall() ) {
    13331332                                ObjectDecl *sizeParm, *alignParm;
Note: See TracChangeset for help on using the changeset viewer.