Changeset aac5dfd for src/AST/Type.cpp


Ignore:
Timestamp:
Dec 12, 2020, 7:30:31 PM (3 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:
5d1aa2f
Parents:
6ce9a4f2 (diff), 4803a901 (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/AST/Type.cpp

    r6ce9a4f2 raac5dfd  
    9494// --- ParameterizedType
    9595
    96 void ParameterizedType::initWithSub(
    97         const ParameterizedType & o, Pass< ForallSubstitutor > & sub
     96void FunctionType::initWithSub(
     97        const FunctionType & o, Pass< ForallSubstitutor > & sub
    9898) {
    9999        forall = sub.core( o.forall );
     
    104104
    105105FunctionType::FunctionType( const FunctionType & o )
    106 : ParameterizedType( o.qualifiers, copy( o.attributes ) ), returns(), params(),
     106: Type( o.qualifiers, copy( o.attributes ) ), returns(), params(),
    107107  isVarArgs( o.isVarArgs ) {
    108108        Pass< ForallSubstitutor > sub;
     
    125125}
    126126
    127 // --- BaseInstType
    128 
    129 void BaseInstType::initWithSub( const BaseInstType & o, Pass< ForallSubstitutor > & sub ) {
    130         ParameterizedType::initWithSub( o, sub ); // initialize substitution
    131         params = sub.core( o.params );            // apply to parameters
    132 }
    133 
    134 BaseInstType::BaseInstType( const BaseInstType & o )
    135 : ParameterizedType( o.qualifiers, copy( o.attributes ) ), params(), name( o.name ),
    136   hoistType( o.hoistType ) {
    137         Pass< ForallSubstitutor > sub;
    138         initWithSub( o, sub );
    139 }
    140 
    141127std::vector<readonly<Decl>> BaseInstType::lookup( const std::string& name ) const {
    142128        assertf( aggr(), "Must have aggregate to perform lookup" );
     
    176162        const TraitDecl * b, CV::Qualifiers q, std::vector<ptr<Attribute>>&& as )
    177163: BaseInstType( b->name, q, move(as) ), base( b ) {}
    178 
    179 // --- TypeInstType
    180 
    181 TypeInstType::TypeInstType( const TypeInstType & o )
    182 : BaseInstType( o.name, o.qualifiers, copy( o.attributes ) ), base(), kind( o.kind ) {
    183         Pass< ForallSubstitutor > sub;
    184         initWithSub( o, sub );      // initialize substitution
    185         base = sub.core( o.base );  // apply to base type
    186 }
    187164
    188165void TypeInstType::set_base( const TypeDecl * b ) {
Note: See TracChangeset for help on using the changeset viewer.