Changeset 93c10de for src/ResolvExpr


Ignore:
Timestamp:
Nov 24, 2022, 11:01:37 AM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
82a90d4
Parents:
78de1e5
Message:

Minimal changes to pull out nested types, TypeInstType::TypeEnvKey and TypeDecl::Data (now TypeData) from there parent types. Although they do connect to the parent types they were nested in they are used on their own most of the time.

Location:
src/ResolvExpr
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CandidateFinder.cpp

    r78de1e5 r93c10de  
    221221        ) {
    222222                for ( auto & tyvar : type->forall ) {
    223                         unifiableVars[ *tyvar ] = ast::TypeDecl::Data{ tyvar->base };
     223                        unifiableVars[ *tyvar ] = ast::TypeData{ tyvar->base };
    224224                }
    225225                for ( auto & assn : type->assertions ) {
  • src/ResolvExpr/FindOpenVars.cc

    r78de1e5 r93c10de  
    113113                                if ( nextIsOpen ) {
    114114                                        for ( auto & decl : type->forall ) {
    115                                                 open[ *decl ] = ast::TypeDecl::Data{ decl->base };
     115                                                open[ *decl ] = ast::TypeData{ decl->base };
    116116                                        }
    117117                                        for ( auto & assert : type->assertions ) {
     
    120120                                } else {
    121121                                        for ( auto & decl : type->forall ) {
    122                                                 closed[ *decl ] = ast::TypeDecl::Data{ decl->base };   
     122                                                closed[ *decl ] = ast::TypeData{ decl->base };
    123123                                        }
    124124                                        for ( auto & assert : type->assertions ) {
  • src/ResolvExpr/RenameVars.cc

    r78de1e5 r93c10de  
    4242                int next_usage_id = 1;
    4343                ScopedMap< std::string, std::string > nameMap;
    44                 ScopedMap< std::string, ast::TypeInstType::TypeEnvKey > idMap;
     44                ScopedMap< std::string, ast::TypeEnvKey > idMap;
    4545        public:
    4646                void reset() {
     
    121121                                        assert(false);
    122122                                }
    123                                 idMap[ td->name ] = ast::TypeInstType::TypeEnvKey(*mut);
    124                                
     123                                idMap[ td->name ] = ast::TypeEnvKey( *mut );
     124
    125125                                td = mut;
    126126                        }
  • src/ResolvExpr/Unify.cc

    r78de1e5 r93c10de  
    11661166                        if ( entry1->second.kind != entry2->second.kind ) return false;
    11671167                        return env.bindVarToVar(
    1168                                 var1, var2, ast::TypeDecl::Data{ entry1->second, entry2->second }, need, have,
     1168                                var1, var2, ast::TypeData{ entry1->second, entry2->second }, need, have,
    11691169                                open, widen, symtab );
    11701170                } else if ( isopen1 ) {
Note: See TracChangeset for help on using the changeset viewer.