Ignore:
Timestamp:
Oct 7, 2022, 4:09:36 PM (2 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
d8c96a9
Parents:
8c91088
Message:

Rewrite in GenPoly? to avoid mixing new AST and TyVarMap? (which internally has old AST code). Some nearby functions got writen out even though they are not used, and hence not tested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/ScrubTyVars.cc

    r8c91088 rc8837e5  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Aug 19 16:10:00 2022
    13 // Update Count     : 4
     12// Last Modified On : Fri Oct  7 15:42:00 2022
     13// Update Count     : 5
    1414//
    1515
     
    128128        public ast::WithVisitorRef<ScrubTypeVars> {
    129129
    130         ScrubTypeVars( ScrubMode m, TyVarMap const * tv ) :
     130        ScrubTypeVars( ScrubMode m, TypeVarMap const * tv ) :
    131131                        mode ( m ), typeVars( tv ) {}
    132132
     
    148148        ScrubMode const mode;
    149149        /// Type varriables to scrub.
    150         TyVarMap const * const typeVars;
     150        TypeVarMap const * const typeVars;
    151151        /// Value cached by primeBaseScrub.
    152152        ast::Type const * dynType = nullptr;
     
    255255const ast::Node * scrubTypeVarsBase(
    256256                const ast::Node * target,
    257                 ScrubMode mode, const TyVarMap * typeVars ) {
     257                ScrubMode mode, const TypeVarMap * typeVars ) {
    258258        if ( ScrubMode::All == mode ) {
    259259                assert( nullptr == typeVars );
     
    266266
    267267} // namespace
     268
     269template<>
     270ast::Node const * scrubTypeVars<ast::Node>(
     271        const ast::Node * target, const TypeVarMap & typeVars ) {
     272        return scrubTypeVarsBase( target, ScrubMode::FromMap, &typeVars );
     273}
     274
     275template<>
     276ast::Node const * scrubTypeVarsDynamic<ast::Node>(
     277        ast::Node const * target, const TypeVarMap & typeVars ) {
     278        return scrubTypeVarsBase( target, ScrubMode::DynamicFromMap, &typeVars );
     279}
    268280
    269281template<>
Note: See TracChangeset for help on using the changeset viewer.