Ignore:
Timestamp:
Oct 4, 2017, 3:31:43 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
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, resolv-new, with_gc
Children:
3364962
Parents:
3628765 (diff), bb9d8e8 (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/ResolvExpr/Unify.cc

    r3628765 rb7778c1  
    2222#include <utility>                // for pair
    2323
     24#include "Common/PassVisitor.h"   // for PassVisitor
    2425#include "FindOpenVars.h"         // for findOpenVars
    2526#include "Parser/LinkageSpec.h"   // for C
     
    537538        /// If this isn't done then argument lists can have wildly different
    538539        /// size and structure, when they should be compatible.
    539         struct TtypeExpander : public Mutator {
    540                 TypeEnvironment & env;
    541                 TtypeExpander( TypeEnvironment & env ) : env( env ) {}
    542                 Type * mutate( TypeInstType * typeInst ) {
     540        struct TtypeExpander : public WithShortCircuiting {
     541                TypeEnvironment & tenv;
     542                TtypeExpander( TypeEnvironment & tenv ) : tenv( tenv ) {}
     543                void premutate( TypeInstType * ) { visit_children = false; }
     544                Type * postmutate( TypeInstType * typeInst ) {
    543545                        EqvClass eqvClass;
    544                         if ( env.lookup( typeInst->get_name(), eqvClass ) ) {
     546                        if ( tenv.lookup( typeInst->get_name(), eqvClass ) ) {
    545547                                if ( eqvClass.data.kind == TypeDecl::Ttype ) {
    546548                                        // expand ttype parameter into its actual type
     
    560562                dst.clear();
    561563                for ( DeclarationWithType * dcl : src ) {
    562                         TtypeExpander expander( env );
     564                        PassVisitor<TtypeExpander> expander( env );
    563565                        dcl->acceptMutator( expander );
    564566                        std::list< Type * > types;
     
    750752                        std::list<Type *> types1, types2;
    751753
    752                         TtypeExpander expander( env );
     754                        PassVisitor<TtypeExpander> expander( env );
    753755                        flat1->acceptMutator( expander );
    754756                        flat2->acceptMutator( expander );
Note: See TracChangeset for help on using the changeset viewer.