Changeset d73e667


Ignore:
Timestamp:
Mar 25, 2025, 12:24:20 PM (6 days ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
446dde5, 8ef0bf7
Parents:
399074a (diff), b5978ca (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

Location:
src/AST
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/AST/Type.cpp

    r399074a rd73e667  
    167167bool TypeInstType::isComplete() const { return base->sized; }
    168168
     169static std::string toTypeString( int usage, int id, std::string const & name ) {
     170        return "_" + std::to_string( usage ) + "_" + std::to_string( id ) + "_" + name;
     171}
     172
     173std::string TypeInstType::typeString() const {
     174        return ( 0 < formal_usage ) ? toTypeString( formal_usage, expr_id, name ) : name;
     175}
     176
    169177std::string TypeEnvKey::typeString() const {
    170         return std::string("_") + std::to_string(formal_usage)
    171                 + "_" + std::to_string(expr_id) + "_" + base->name;
     178        return toTypeString( formal_usage, expr_id, base->name );
    172179}
    173180
  • TabularUnified src/AST/Type.hpp

    r399074a rd73e667  
    383383        const Type * accept( Visitor & v ) const override { return v.visit( this ); }
    384384
    385         std::string typeString() const {
    386                 if (formal_usage > 0) return std::string("_") + std::to_string(formal_usage) + "_" + std::to_string(expr_id) + "_" + name;
    387                 else return name;
    388         }
     385        std::string typeString() const;
    389386private:
    390387        TypeInstType * clone() const override { return new TypeInstType{ *this }; }
Note: See TracChangeset for help on using the changeset viewer.