Ignore:
Timestamp:
Jun 29, 2018, 4:14:15 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
new-env
Children:
184557e
Parents:
97397a26 (diff), 28f3a19 (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 remote-tracking branch 'origin/with_gc' into new-env

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/TypeEnvironment.h

    r97397a26 rb21c77a  
    1010// Created On       : Sun May 17 12:24:58 2015
    1111// Last Modified By : Aaron B. Moss
    12 // Last Modified On : Wed Jun 13 16:31:00 2018
    13 // Update Count     : 4
     12// Last Modified On : Fri Jun 29 16:00:00 2018
     13// Update Count     : 5
    1414//
    1515
     
    2424#include <utility>                         // for pair
    2525#include <vector>                          // for vector
     26
     27#include "WidenMode.h"                 // for WidenMode
    2628
    2729#include "Common/InternedString.h"         // for interned_string
     
    9597
    9698                void initialize( const EqvClass &src, EqvClass &dest );
     99                void initialize( const EqvClass &src, EqvClass &dest, const Type *ty );
    97100                EqvClass();
    98                 EqvClass( std::vector<interned_string>&& vars, BoundType&& bound );
    99101                EqvClass( const EqvClass &other );
     102                EqvClass( const EqvClass &other, const Type *ty );
     103                EqvClass( EqvClass &&other );
    100104                EqvClass &operator=( const EqvClass &other );
     105                EqvClass &operator=( EqvClass &&other );
    101106                void print( std::ostream &os, Indenter indent = {} ) const;
    102         };
    103 #endif
    104 
     107
     108                /// Takes ownership of `ty`, freeing old `type`
     109                void set_type(Type* ty);
     110        };
     111#endif
     112       
    105113        class TypeEnvironment;
    106114
     
    206214                        WidenMode widenMode, const SymTab::Indexer& indexer );
    207215#if !1
    208                 void add( const EqvClass &eqvClass );
    209                 void add( EqvClass &&eqvClass  );
     216        private:
     217                void add( EqvClass &&eqvClass );
     218        public:
    210219                void add( const Type::ForallList &tyDecls );
    211220                void add( const TypeSubstitution & sub );
     
    226235                /// and extracts open variables.
    227236                void addActual( const TypeEnvironment& actualEnv, OpenVarSet& openVars );
     237
     238                /// Disallows widening for all bindings in the environment
     239                void forbidWidening();
    228240#endif
    229241
    230242                iterator begin() { return { this, bindings->begin() }; }
    231243                iterator end() { return { this, bindings->end() }; }
    232 #if 0
    233                 typedef std::list< EqvClass >::const_iterator const_iterator;
    234                 const_iterator begin() const { return env.begin(); }
    235                 const_iterator end() const { return env.end(); }
    236 #endif
    237244        };
    238245
Note: See TracChangeset for help on using the changeset viewer.