Changeset aaeacf4 for src/AST


Ignore:
Timestamp:
Jun 12, 2019, 4:06:32 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
21300d7
Parents:
6e3e0717
Message:

Removed global look-up table from UniqueId to Decl

Location:
src/AST
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    r6e3e0717 raaeacf4  
    579579                                tgtInferParams[srcParam.first] = ParamEntry(
    580580                                        srcParam.second.decl,
     581                                        get<Declaration>().accept1(srcParam.second.declptr),
    581582                                        get<Type>().accept1(srcParam.second.actualType),
    582583                                        get<Type>().accept1(srcParam.second.formalType),
     
    20042005                                tgt[old.first] = ast::ParamEntry(
    20052006                                        old.second.decl,
     2007                                        getAccept1<ast::Decl>(old.second.declptr),
    20062008                                        getAccept1<ast::Type>(old.second.actualType),
    20072009                                        getAccept1<ast::Type>(old.second.formalType),
  • src/AST/Expr.hpp

    r6e3e0717 raaeacf4  
    3939struct ParamEntry {
    4040        UniqueId decl;
     41        ptr<Decl> declptr;
    4142        ptr<Type> actualType;
    4243        ptr<Type> formalType;
    4344        ptr<Expr> expr;
    4445
    45         ParamEntry() : decl( 0 ), actualType( nullptr ), formalType( nullptr ), expr( nullptr ) {}
    46         ParamEntry( UniqueId id, Type* actual, Type* formal, Expr* e )
    47         : decl( id ), actualType( actual ), formalType( formal ), expr( e ) {}
     46        ParamEntry() : decl( 0 ), declptr( nullptr ), actualType( nullptr ), formalType( nullptr ), expr( nullptr ) {}
     47        ParamEntry( UniqueId id, Decl * declptr, Type* actual, Type* formal, Expr* e )
     48        : decl( id ), declptr( declptr ), actualType( actual ), formalType( formal ), expr( e ) {}
    4849};
    4950
     
    137138                }
    138139
    139                 /// splices other InferUnion into this one. Will fail if one union is in `Slots` mode 
     140                /// splices other InferUnion into this one. Will fail if one union is in `Slots` mode
    140141                /// and the other is in `Params`.
    141142                void splice( InferUnion && o ) {
     
    145146
    146147                        if ( mode == Slots ){
    147                                 data.resnSlots.insert( 
     148                                data.resnSlots.insert(
    148149                                        data.resnSlots.end(), o.data.resnSlots.begin(), o.data.resnSlots.end() );
    149150                        } else if ( mode == Params ) {
Note: See TracChangeset for help on using the changeset viewer.