Changeset cd6a6ff for src/AST/Type.cpp


Ignore:
Timestamp:
Dec 3, 2020, 10:44:40 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
1db306a
Parents:
b37515b
Message:

Improved coverage of deterministic_output to be much finer grain.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Type.cpp

    rb37515b rcd6a6ff  
    133133
    134134BaseInstType::BaseInstType( const BaseInstType & o )
    135 : ParameterizedType( o.qualifiers, copy( o.attributes ) ), params(), name( o.name ), 
     135: ParameterizedType( o.qualifiers, copy( o.attributes ) ), params(), name( o.name ),
    136136  hoistType( o.hoistType ) {
    137137        Pass< ForallSubstitutor > sub;
     
    222222                // TODO: once TypeInstType representation is updated, it should properly check
    223223                // if the context id is filled. this is a temporary hack for now
    224                 if (std::count(typeInst->name.begin(), typeInst->name.end(), '_') >= 3) {
    225                         return true;
    226                 }
     224                return isUnboundType(typeInst->name);
     225        }
     226        return false;
     227}
     228
     229bool isUnboundType(const std::string & tname) {
     230        // xxx - look for a type name produced by renameTyVars.
     231
     232        // TODO: once TypeInstType representation is updated, it should properly check
     233        // if the context id is filled. this is a temporary hack for now
     234        if (std::count(tname.begin(), tname.end(), '_') >= 3) {
     235                return true;
    227236        }
    228237        return false;
Note: See TracChangeset for help on using the changeset viewer.