Changeset 30dcc47 for src/ResolvExpr


Ignore:
Timestamp:
May 2, 2018, 2:59:29 PM (7 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
44bca7f
Parents:
7f0001c (diff), 6f326b1 (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/ResolvExpr
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/AlternativeFinder.cc

    r7f0001c r30dcc47  
    459459        /// Adds type variables to the open variable set and marks their assertions
    460460        void makeUnifiableVars( Type *type, OpenVarSet &unifiableVars, AssertionSet &needAssertions ) {
    461                 for ( Type::ForallList::const_iterator tyvar = type->get_forall().begin(); tyvar != type->get_forall().end(); ++tyvar ) {
     461                for ( Type::ForallList::const_iterator tyvar = type->forall.begin(); tyvar != type->forall.end(); ++tyvar ) {
    462462                        unifiableVars[ (*tyvar)->get_name() ] = TypeDecl::Data{ *tyvar };
    463                         for ( std::list< DeclarationWithType* >::iterator assert = (*tyvar)->get_assertions().begin(); assert != (*tyvar)->get_assertions().end(); ++assert ) {
     463                        for ( std::list< DeclarationWithType* >::iterator assert = (*tyvar)->assertions.begin(); assert != (*tyvar)->assertions.end(); ++assert ) {
    464464                                needAssertions[ *assert ].isUsed = true;
    465465                        }
  • src/ResolvExpr/AlternativeFinder.h

    r7f0001c r30dcc47  
    126126        void printAlts( const AltList &list, std::ostream &os, unsigned int indentAmt = 0 );
    127127
     128        /// Adds type variables to the open variable set and marks their assertions
     129        void makeUnifiableVars( Type *type, OpenVarSet &unifiableVars, AssertionSet &needAssertions );
     130
    128131        template< typename InputIterator >
    129132        void simpleCombineEnvironments( InputIterator begin, InputIterator end, TypeEnvironment &result ) {
  • src/ResolvExpr/Resolver.cc

    r7f0001c r30dcc47  
    544544                                                        OpenVarSet openVars;
    545545                                                        AssertionSet resultNeed, resultHave;
    546                                                         TypeEnvironment resultEnv;
     546                                                        TypeEnvironment resultEnv( func.env );
     547                                                        makeUnifiableVars( function, openVars, resultNeed );
     548                                                        // add all type variables as open variables now so that those not used in the parameter
     549                                                        // list are still considered open.
     550                                                        resultEnv.add( function->forall );
    547551
    548552                                                        // Load type variables from arguemnts into one shared space
Note: See TracChangeset for help on using the changeset viewer.