Ignore:
Timestamp:
Oct 25, 2017, 5:28:34 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
598f50e
Parents:
4573e3c
Message:

Carry forward environment from function to function call

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Specialize.cc

    r4573e3c rb226721  
    6666                                if ( ! boundType ) continue;
    6767                                if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( boundType ) ) {
     68                                        // bound to another type variable
    6869                                        if ( closedVars.find( typeInst->get_name() ) == closedVars.end() ) {
     70                                                // bound to a closed variable => must specialize
    6971                                                return true;
    7072                                        } // if
    7173                                } else {
     74                                        // variable is bound to a concrete type => must specialize
    7275                                        return true;
    7376                                } // if
    7477                        } // for
     78                        // none of the type variables are bound
    7579                        return false;
    7680                } else {
     81                        // no env
    7782                        return false;
    7883                } // if
Note: See TracChangeset for help on using the changeset viewer.