Ignore:
Timestamp:
Feb 14, 2017, 3:58:01 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:
cf97ccb, efd60d67
Parents:
9bb90a86 (diff), e58dfb9 (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/GenPoly/InstantiateGeneric.cc

    r9bb90a86 r35cd219  
    122122                /// Adds a value for a (key, typeList) pair to the current scope
    123123                void insert( Key *key, const std::list< TypeExpr* > &params, Value *value ) {
    124                         instantiations[ key ].push_back( Instantiation( TypeList( params ), value ) );
     124                        auto it = instantiations.findAt( instantiations.currentScope(), key );
     125                        if ( it == instantiations.end() ) {
     126                                instantiations.insert( key, ValueList{ Instantiation{ TypeList( params ), value } } );
     127                        } else {
     128                                it->second.push_back( Instantiation{ TypeList( params ), value } );
     129                        }
    125130                }
    126131        };
Note: See TracChangeset for help on using the changeset viewer.