Changeset 93c10de for src/GenPoly


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/GenPoly
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/GenPoly.cc

    r78de1e5 r93c10de  
    783783        const ast::FunctionType * function = getFunctionType( expr->func->result );
    784784        assertf( function, "ApplicationExpr has non-function type: %s", toString( expr->func->result ).c_str() );
    785         TypeVarMap exprTyVars = { ast::TypeDecl::Data() };
     785        TypeVarMap exprTyVars = { ast::TypeData() };
    786786        makeTypeVarMap( function, exprTyVars );
    787787        return needsBoxing( param, arg, exprTyVars, subst );
     
    793793
    794794void addToTypeVarMap( const ast::TypeInstType * type, TypeVarMap & typeVars ) {
    795         typeVars.insert( *type, ast::TypeDecl::Data( type->base ) );
     795        typeVars.insert( *type, ast::TypeData( type->base ) );
    796796}
    797797
  • src/GenPoly/GenPoly.h

    r78de1e5 r93c10de  
    3030
    3131        typedef ErasableScopedMap< std::string, TypeDecl::Data > TyVarMap;
    32         using TypeVarMap = ErasableScopedMap< ast::TypeInstType::TypeEnvKey, ast::TypeDecl::Data >;
     32        using TypeVarMap = ErasableScopedMap< ast::TypeEnvKey, ast::TypeData >;
    3333
    3434        /// Replaces a TypeInstType by its referrent in the environment, if applicable
Note: See TracChangeset for help on using the changeset viewer.