Changeset 5fb17f1


Ignore:
Timestamp:
Apr 29, 2019, 2:34:05 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
986e260
Parents:
b7b573c (diff), 9795142 (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' into jenkins-sandbox

Location:
src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/ConversionCost.cc

    rb7b573c r5fb17f1  
    1010// Created On       : Sun May 17 07:06:19 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb 14 17:04:31 2019
    13 // Update Count     : 23
     12// Last Modified On : Fri Apr 26 16:33:04 2019
     13// Update Count     : 24
    1414//
    1515
     
    2828
    2929namespace ResolvExpr {
     30#if 0
    3031        const Cost Cost::zero =      Cost{  0,  0,  0,  0,  0,  0,  0 };
    3132        const Cost Cost::infinity =  Cost{ -1, -1, -1, -1, -1,  1, -1 };
     
    3738        const Cost Cost::spec =      Cost{  0,  0,  0,  0,  0, -1,  0 };
    3839        const Cost Cost::reference = Cost{  0,  0,  0,  0,  0,  0,  1 };
     40#endif
    3941
    4042#if 0
  • src/ResolvExpr/Cost.h

    rb7b573c r5fb17f1  
    77// Cost.h --
    88//
    9 // Author           : Richard C. Bilson
     9// Author           : Peter Buhr and Aaron Moss
    1010// Created On       : Sun May 17 09:39:50 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Feb  7 20:54:29 2019
    13 // Update Count     : 8
     12// Last Modified On : Sun Apr 28 18:26:36 2019
     13// Update Count     : 29
    1414//
    1515
     
    1717
    1818#include <iostream>
     19#include <cassert>
    1920
    2021namespace ResolvExpr {
     22#if 0
     23
     24        //*************************** OLD ***************************
     25
    2126        class Cost {
    2227          private:
    2328                Cost( int unsafeCost, int polyCost, int safeCost, int signCost,
    24                         int varCost, int specCost, int referenceCost );
     29                          int varCost, int specCost, int referenceCost );
    2530          public:
    2631                Cost & incUnsafe( int inc = 1 );
     
    7176
    7277        inline Cost::Cost( int unsafeCost, int polyCost, int safeCost, int signCost,
    73                         int varCost, int specCost, int referenceCost )
     78                                           int varCost, int specCost, int referenceCost )
    7479                : unsafeCost( unsafeCost ), polyCost( polyCost ), safeCost( safeCost ), signCost( signCost ),
    7580                  varCost( varCost ), specCost( specCost ), referenceCost( referenceCost ) {}
     
    121126                return Cost{
    122127                        unsafeCost + other.unsafeCost, polyCost + other.polyCost, safeCost + other.safeCost,
    123                         signCost + other.signCost, varCost + other.varCost, specCost + other.specCost,
    124                         referenceCost + other.referenceCost };
     128                                signCost + other.signCost, varCost + other.varCost, specCost + other.specCost,
     129                                referenceCost + other.referenceCost };
    125130        }
    126131
     
    211216                          << cost.referenceCost << " )";
    212217        }
     218#endif // 0
     219
     220        //*************************** NEW ***************************
     221
     222        class Cost {
     223                union {
     224                        struct {
     225                        #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
     226                                // Little-endian => first value is low priority and last is high priority.
     227                                unsigned char padding;                                  ///< unused
     228                                unsigned char referenceCost;                    ///< reference conversions
     229                                unsigned char specCost;                                 ///< Polymorphic type specializations (type assertions), negative cost
     230                                unsigned char varCost;                                  ///< Count of polymorphic type variables
     231                                unsigned char signCost;                                 ///< Count of safe sign conversions
     232                                unsigned char safeCost;                                 ///< Safe (widening) conversions
     233                                unsigned char polyCost;                                 ///< Count of parameters and return values bound to some poly type
     234                                unsigned char unsafeCost;                               ///< Unsafe (narrowing) conversions
     235                        #else
     236                                #error BIG_ENDIAN unsupported
     237                        #endif
     238                        } v;
     239                        uint64_t all;
     240                };
     241          public:
     242                // Compiler adjusts constants for correct endian.
     243                enum : uint64_t {
     244                        zero       = 0x00'00'00'00'00'ff'00'00,
     245                        infinity   = 0xff'ff'ff'ff'ff'00'ff'ff,
     246                        correction = 0x00'00'00'00'00'ff'00'00,         // correct for negative spec cost
     247                        unsafe     = 0x01'00'00'00'00'ff'00'00,
     248                        poly       = 0x00'01'00'00'00'ff'00'00,
     249                        safe       = 0x00'00'01'00'00'ff'00'00,
     250                        sign       = 0x00'00'00'01'00'ff'00'00,
     251                        var        = 0x00'00'00'00'01'ff'00'00,
     252                        spec       = 0x00'00'00'00'00'fe'00'00,
     253                        reference  = 0x00'00'00'00'00'ff'01'00,
     254                }; //
     255
     256                Cost( uint64_t all ) { Cost::all = all; }
     257                Cost( int unsafeCost, int polyCost, int safeCost, int signCost, int varCost, int specCost, int referenceCost ) {
     258                        // Assume little-endian => first value is low priority and last is high priority.
     259                        v = {
     260                                (unsigned char)0,                                               // padding
     261                                (unsigned char)referenceCost,
     262                                (unsigned char)(specCost + 0xff ),              // correct for signedness
     263                                (unsigned char)varCost,
     264                                (unsigned char)signCost,
     265                                (unsigned char)safeCost,
     266                                (unsigned char)polyCost,
     267                                (unsigned char)unsafeCost,
     268                        };
     269                }
     270
     271                int get_unsafeCost() const { return v.unsafeCost; }
     272                int get_polyCost() const { return v.polyCost; }
     273                int get_safeCost() const { return v.safeCost; }
     274                int get_signCost() const { return v.signCost; }
     275                int get_varCost() const { return v.varCost; }
     276                int get_specCost() const { return -(0xff - v.specCost); }
     277                int get_referenceCost() const { return v.referenceCost; }
     278
     279                friend bool operator==( const Cost, const Cost );
     280                friend bool operator!=( const Cost lhs, const Cost rhs );
     281                // returns negative for *this < rhs, 0 for *this == rhs, positive for *this > rhs
     282                int compare( const Cost rhs ) const {
     283                        if ( all == infinity ) return 1;
     284                        if ( rhs.all == infinity ) return -1;
     285                        return all > rhs.all ? 1 : all == rhs.all ? 0 : -1;
     286                }
     287                friend bool operator<( const Cost lhs, const Cost rhs );
     288
     289                friend Cost operator+( const Cost lhs, const Cost rhs );
     290 
     291                Cost operator+=( const Cost rhs ) {
     292                        if ( all == infinity ) return *this;
     293                        if ( rhs.all == infinity ) {
     294                                all = infinity;
     295                                return *this;
     296                        }
     297                        all += rhs.all - correction;                            // correct for negative spec cost
     298                        return *this;
     299                }
     300
     301                Cost incUnsafe( int inc = 1 ) {
     302                        if ( all != infinity ) { assert( v.unsafeCost + inc < 256 ); v.unsafeCost += inc; }
     303                        return *this;
     304                }
     305
     306                Cost incPoly( int inc = 1 ) {
     307                        if ( all != infinity ) { assert( v.polyCost + inc < 256 ); v.polyCost += inc; }
     308                        return *this;
     309                }
     310
     311                Cost incSafe( int inc = 1 ) {
     312                        if ( all != infinity ) { assert( v.safeCost + inc < 256 ); v.safeCost += inc; }
     313                        return *this;
     314                }
     315
     316                Cost incSign( int inc = 1 ) {
     317                        if ( all != infinity ) { assert( v.signCost + inc < 256 ); v.signCost += inc; }
     318                        return *this;
     319                }
     320
     321                Cost incVar( int inc = 1 ) {
     322                        if ( all != infinity ) { assert( v.varCost + inc < 256 ); v.varCost += inc; }
     323                        return *this;
     324                }
     325
     326                Cost decSpec( int dec = 1 ) {
     327                        if ( all != infinity ) { v.specCost -= dec; }
     328                        return *this;
     329                }
     330
     331                Cost incReference( int inc = 1 ) {
     332                        if ( all != infinity ) { assert( v.referenceCost + inc < 256 ); v.referenceCost += inc; }
     333                        return *this;
     334                }
     335
     336                friend std::ostream & operator<<( std::ostream & os, const Cost cost );
     337        };
     338
     339        inline bool operator==( const Cost lhs, const Cost rhs ) {
     340                return lhs.all == rhs.all;
     341        }
     342
     343        inline bool operator!=( const Cost lhs, const Cost rhs ) {
     344                return !( lhs.all == rhs.all );
     345        }
     346
     347        inline bool operator<( const Cost lhs, const Cost rhs ) {
     348                if ( lhs.all == Cost::infinity ) return false;
     349                if ( rhs.all == Cost::infinity ) return true;
     350                return lhs.all < rhs.all;
     351        }
     352
     353        inline Cost operator+( const Cost lhs, const Cost rhs ) {
     354                if ( lhs.all == Cost::infinity || rhs.all == Cost::infinity ) return Cost{ Cost::infinity };
     355                return Cost{ lhs.all + rhs.all - Cost::correction }; // correct for negative spec cost
     356        }
     357
     358        inline std::ostream & operator<<( std::ostream & os, const Cost cost ) {
     359                return os << "( " << cost.get_unsafeCost() << ", " << cost.get_polyCost() << ", " << cost.get_safeCost()
     360                                  << ", " << cost.get_signCost() << ", " << cost.get_varCost() << ", " << cost.get_specCost()
     361                                  << ", " << cost.get_referenceCost() << " )";
     362        }
    213363} // namespace ResolvExpr
    214364
  • src/ResolvExpr/ResolveAssertions.cc

    rb7b573c r5fb17f1  
    3535#include "SynTree/Expression.h"     // for InferredParams
    3636#include "TypeEnvironment.h"        // for TypeEnvironment, etc.
    37 #include "typeops.h"                // for adjustExprType
     37#include "typeops.h"                // for adjustExprType, specCost
    3838#include "Unify.h"                  // for unify
    3939
     
    5858        using CandidateList = std::vector<AssnCandidate>;
    5959
    60         /// Unique identifier for a yet-to-be-resolved assertion
    61         struct AssnId {
    62                 DeclarationWithType* decl;  ///< Declaration of assertion
    63                 AssertionSetValue info;     ///< Information about assertion
    64 
    65                 AssnId(DeclarationWithType* decl, const AssertionSetValue& info) : decl(decl), info(info) {}
    66         };
    67 
    68         /// Cached assertion items
    69         struct AssnCacheItem {
    70                 CandidateList matches;         ///< Possible matches for this assertion
    71                 std::vector<AssnId> deferIds;  ///< Deferred assertions which resolve to this item
    72 
    73                 AssnCacheItem( CandidateList&& m ) : matches(std::move(m)), deferIds() {}
    74         };
    75 
    76         /// Cache of resolved assertions
    77         using AssnCache = std::unordered_map<std::string, AssnCacheItem>;
    78 
    7960        /// Reference to single deferred item
    8061        struct DeferRef {
    81                 const AssnCacheItem& item;
     62                const DeclarationWithType* decl;
     63                const AssertionSetValue& info;
    8264                const AssnCandidate& match;
    8365        };
     
    8668        /// Acts like indexed list of DeferRef
    8769        struct DeferItem {
    88                 const AssnCache* cache;     ///< Cache storing assertion item
    89                 std::string key;            ///< Key into cache
    90                
    91                 DeferItem( const AssnCache& cache, const std::string& key ) : cache(&cache), key(key) {}
    92 
    93                 bool empty() const { return cache->at(key).matches.empty(); }
    94 
    95                 CandidateList::size_type size() const { return cache->at(key).matches.size(); }
    96 
    97                 DeferRef operator[] ( unsigned i ) const {
    98                         const AssnCacheItem& item = cache->at(key);
    99                         return { item, item.matches[i] };
    100                 }
    101 
    102                 const DeclarationWithType* get_decl() const { return cache->at(key).deferIds[0].decl; }
    103 
    104                 // sortable by key
    105                 // TODO look into optimizing combination process with other sort orders (e.g. by number
    106                 // of matches in candidate)
    107                 bool operator< ( const DeferItem& o ) const { return key < o.key; }
    108                 bool operator== ( const DeferItem& o ) const { return key == o.key; }
     70                const DeclarationWithType* decl;
     71                const AssertionSetValue& info;
     72                CandidateList matches;
     73
     74                DeferItem( DeclarationWithType* decl, const AssertionSetValue& info, CandidateList&& matches )
     75                : decl(decl), info(info), matches(std::move(matches)) {}
     76
     77                bool empty() const { return matches.empty(); }
     78
     79                CandidateList::size_type size() const { return matches.size(); }
     80
     81                DeferRef operator[] ( unsigned i ) const { return { decl, info, matches[i] }; }
    10982        };
    11083
     
    181154                                for ( const auto& assn : x.assns ) {
    182155                                        k += computeConversionCost(
    183                                                 assn.match.adjType, assn.item.deferIds[0].decl->get_type(), indexer,
    184                                                 x.env );
     156                                                assn.match.adjType, assn.decl->get_type(), indexer, x.env );
    185157                                }
    186158                                it = cache.emplace_hint( it, &x, k );
     
    253225
    254226        /// Resolve a single assertion, in context
    255         bool resolveAssertion( AssertionItem& assn, ResnState& resn, AssnCache& cache ) {
     227        bool resolveAssertion( AssertionItem& assn, ResnState& resn ) {
    256228                // skip unused assertions
    257229                if ( ! assn.info.isUsed ) return true;
    258230
    259                 // check cache for this assertion
    260                 std::string assnKey = SymTab::Mangler::mangleAssnKey( assn.decl, resn.alt.env );
    261                 auto it = cache.find( assnKey );
    262 
    263                 // attempt to resolve assertion if this is the first time seen
    264                 if ( it == cache.end() ) {
    265                         // lookup candidates for this assertion
    266                         std::list< SymTab::Indexer::IdData > candidates;
    267                         resn.indexer.lookupId( assn.decl->name, candidates );
    268 
    269                         // find the candidates that unify with the desired type
    270                         CandidateList matches;
    271                         for ( const auto& cdata : candidates ) {
    272                                 DeclarationWithType* candidate = cdata.id;
    273 
    274                                 // build independent unification context for candidate
    275                                 AssertionSet have, newNeed;
    276                                 TypeEnvironment newEnv{ resn.alt.env };
    277                                 OpenVarSet newOpenVars{ resn.alt.openVars };
    278                                 Type* adjType = candidate->get_type()->clone();
    279                                 adjustExprType( adjType, newEnv, resn.indexer );
    280                                 renameTyVars( adjType );
    281 
    282                                 // keep unifying candidates
    283                                 if ( unify( assn.decl->get_type(), adjType, newEnv, newNeed, have, newOpenVars,
    284                                                 resn.indexer ) ) {
    285                                         // set up binding slot for recursive assertions
    286                                         UniqueId crntResnSlot = 0;
    287                                         if ( ! newNeed.empty() ) {
    288                                                 crntResnSlot = ++globalResnSlot;
    289                                                 for ( auto& a : newNeed ) {
    290                                                         a.second.resnSlot = crntResnSlot;
    291                                                 }
     231                // lookup candidates for this assertion
     232                std::list< SymTab::Indexer::IdData > candidates;
     233                resn.indexer.lookupId( assn.decl->name, candidates );
     234
     235                // find the candidates that unify with the desired type
     236                CandidateList matches;
     237                for ( const auto& cdata : candidates ) {
     238                        DeclarationWithType* candidate = cdata.id;
     239
     240                        // build independent unification context for candidate
     241                        AssertionSet have, newNeed;
     242                        TypeEnvironment newEnv{ resn.alt.env };
     243                        OpenVarSet newOpenVars{ resn.alt.openVars };
     244                        Type* adjType = candidate->get_type()->clone();
     245                        adjustExprType( adjType, newEnv, resn.indexer );
     246                        renameTyVars( adjType );
     247
     248                        // keep unifying candidates
     249                        if ( unify( assn.decl->get_type(), adjType, newEnv, newNeed, have, newOpenVars,
     250                                        resn.indexer ) ) {
     251                                // set up binding slot for recursive assertions
     252                                UniqueId crntResnSlot = 0;
     253                                if ( ! newNeed.empty() ) {
     254                                        crntResnSlot = ++globalResnSlot;
     255                                        for ( auto& a : newNeed ) {
     256                                                a.second.resnSlot = crntResnSlot;
    292257                                        }
    293 
    294                                         matches.emplace_back( cdata, adjType, std::move(newEnv), std::move(have),
    295                                                 std::move(newNeed), std::move(newOpenVars), crntResnSlot );
    296                                 } else {
    297                                         delete adjType;
    298                                 }
     258                                }
     259
     260                                matches.emplace_back( cdata, adjType, std::move(newEnv), std::move(have),
     261                                        std::move(newNeed), std::move(newOpenVars), crntResnSlot );
     262                        } else {
     263                                delete adjType;
    299264                        }
    300 
    301                         it = cache.emplace_hint( it, assnKey, AssnCacheItem{ std::move(matches) } );
    302                 }
    303 
    304                 CandidateList& matches = it->second.matches;
     265                }
    305266
    306267                // break if no suitable assertion
     
    309270                // defer if too many suitable assertions
    310271                if ( matches.size() > 1 ) {
    311                         it->second.deferIds.emplace_back( assn.decl, assn.info );
    312                         resn.deferred.emplace_back( cache, assnKey );
     272                        resn.deferred.emplace_back( assn.decl, assn.info, std::move(matches) );
    313273                        return true;
    314274                }
     
    318278                addToIndexer( match.have, resn.indexer );
    319279                resn.newNeed.insert( match.need.begin(), match.need.end() );
    320                 resn.alt.env = match.env;
    321                 resn.alt.openVars = match.openVars;
     280                resn.alt.env = std::move(match.env);
     281                resn.alt.openVars = std::move(match.openVars);
    322282
    323283                bindAssertion( assn.decl, assn.info, resn.alt, match, resn.inferred );
     
    380340                ResnList resns{ ResnState{ alt, root_indexer } };
    381341                ResnList new_resns{};
    382                 AssnCache assnCache;
    383342
    384343                // resolve assertions in breadth-first-order up to a limited number of levels deep
     
    389348                                for ( auto& assn : resn.need ) {
    390349                                        // fail early if any assertion is not resolvable
    391                                         if ( ! resolveAssertion( assn, resn, assnCache ) ) {
     350                                        if ( ! resolveAssertion( assn, resn ) ) {
    392351                                                Indenter tabs{ Indenter::tabsize, 3 };
    393352                                                std::ostringstream ss;
     
    410369                                        }
    411370                                } else {
    412                                         // only resolve each deferred assertion once
    413                                         std::sort( resn.deferred.begin(), resn.deferred.end() );
    414                                         auto last = std::unique( resn.deferred.begin(), resn.deferred.end() );
    415                                         resn.deferred.erase( last, resn.deferred.end() );
    416371                                        // resolve deferred assertions by mutual compatibility
    417372                                        std::vector<CandidateEnvMerger::OutType> compatible = filterCombos(
     
    427382                                                ++tabs;
    428383                                                for ( const auto& d : resn.deferred ) {
    429                                                         d.get_decl()->print( ss, tabs );
     384                                                        d.decl->print( ss, tabs );
    430385                                                }
    431386
     
    458413                                                        new_resn.newNeed.insert( match.need.begin(), match.need.end() );
    459414
    460                                                         // for each deferred assertion with the same form
    461                                                         for ( AssnId id : r.item.deferIds ) {
    462                                                                 bindAssertion(
    463                                                                         id.decl, id.info, new_resn.alt, match, new_resn.inferred );
    464                                                         }
     415                                                        bindAssertion( r.decl, r.info, new_resn.alt, match, new_resn.inferred );
    465416                                                }
    466417
  • src/SymTab/Mangler.cc

    rb7b573c r5fb17f1  
    3838                        struct Mangler : public WithShortCircuiting, public WithVisitorRef<Mangler>, public WithGuards {
    3939                                Mangler( bool mangleOverridable, bool typeMode, bool mangleGenericParams );
    40                                 Mangler( const ResolvExpr::TypeEnvironment& env );
    4140                                Mangler( const Mangler & ) = delete;
    4241
     
    6766                          private:
    6867                                std::ostringstream mangleName;  ///< Mangled name being constructed
    69                                 typedef std::map< std::string, std::pair< std::string, int > > VarMapType;
     68                                typedef std::map< std::string, std::pair< int, int > > VarMapType;
    7069                                VarMapType varNums;             ///< Map of type variables to indices
    7170                                int nextVarNum;                 ///< Next type variable index
    72                                 const ResolvExpr::TypeEnvironment* env;  ///< optional environment for substitutions
    7371                                bool isTopLevel;                ///< Is the Mangler at the top level
    7472                                bool mangleOverridable;         ///< Specially mangle overridable built-in methods
     
    8078                          public:
    8179                                Mangler( bool mangleOverridable, bool typeMode, bool mangleGenericParams,
    82                                         int nextVarNum, const ResolvExpr::TypeEnvironment* env,
    83                                         const VarMapType& varNums );
     80                                        int nextVarNum, const VarMapType& varNums );
    8481
    8582                          private:
     
    109106                }
    110107
    111                 std::string mangleAssnKey( DeclarationWithType* decl,
    112                                 const ResolvExpr::TypeEnvironment& env ) {
    113                         PassVisitor<Mangler> mangler( env );
    114                         maybeAccept( decl, mangler );
    115                         return mangler.pass.get_mangleName();
    116                 }
    117 
    118108                namespace {
    119109                        Mangler::Mangler( bool mangleOverridable, bool typeMode, bool mangleGenericParams )
    120                                 : nextVarNum( 0 ), env(nullptr), isTopLevel( true ),
     110                                : nextVarNum( 0 ), isTopLevel( true ),
    121111                                mangleOverridable( mangleOverridable ), typeMode( typeMode ),
    122112                                mangleGenericParams( mangleGenericParams ) {}
    123113                       
    124                         Mangler::Mangler( const ResolvExpr::TypeEnvironment& env )
    125                                 : nextVarNum( 0 ), env( &env ), isTopLevel( true ), mangleOverridable( false ),
    126                                 typeMode( false ), mangleGenericParams( true ) {}
    127                        
    128114                        Mangler::Mangler( bool mangleOverridable, bool typeMode, bool mangleGenericParams,
    129                                 int nextVarNum, const ResolvExpr::TypeEnvironment* env,
    130                                 const VarMapType& varNums )
    131                                 : varNums( varNums ), nextVarNum( nextVarNum ), env( env ), isTopLevel( false ),
     115                                int nextVarNum, const VarMapType& varNums )
     116                                : varNums( varNums ), nextVarNum( nextVarNum ), isTopLevel( false ),
    132117                                mangleOverridable( mangleOverridable ), typeMode( typeMode ),
    133118                                mangleGenericParams( mangleGenericParams ) {}
     
    358343                                                        assert( false );
    359344                                                } // switch
    360                                                 std::string varName;
    361                                                 // replace type with substitution name if environment is available and bound
    362                                                 if ( env ) {
    363                                                         const ResolvExpr::EqvClass* varClass = env->lookup( (*i)->name );
    364                                                         if ( varClass && varClass->type ) {
    365                                                                 PassVisitor<Mangler> sub_mangler(
    366                                                                         mangleOverridable, typeMode, mangleGenericParams, nextVarNum,
    367                                                                         env, varNums );
    368                                                                 varClass->type->accept( sub_mangler );
    369                                                                 varName = std::string{"%"} + sub_mangler.pass.get_mangleName();
    370                                                         }
    371                                                 }
    372                                                 // otherwise just give type numeric name
    373                                                 if ( varName.empty() ) {
    374                                                         varName = std::to_string( nextVarNum++ );
    375                                                 }
    376                                                 varNums[ (*i)->name ] = std::make_pair( varName, (int)(*i)->get_kind() );
     345                                                varNums[ (*i)->name ] = std::make_pair( nextVarNum, (int)(*i)->get_kind() );
    377346                                                for ( std::list< DeclarationWithType* >::iterator assert = (*i)->assertions.begin(); assert != (*i)->assertions.end(); ++assert ) {
    378347                                                        PassVisitor<Mangler> sub_mangler(
    379                                                                 mangleOverridable, typeMode, mangleGenericParams, nextVarNum, env,
    380                                                                 varNums );
     348                                                                mangleOverridable, typeMode, mangleGenericParams, nextVarNum, varNums );
    381349                                                        (*assert)->accept( sub_mangler );
    382350                                                        assertionNames.push_back( sub_mangler.pass.get_mangleName() );
  • src/SymTab/Mangler.h

    rb7b573c r5fb17f1  
    4444                /// Mangle ignoring generic type parameters
    4545                std::string mangleConcrete( Type* ty );
    46                 /// Mangle for assertion key
    47                 std::string mangleAssnKey( DeclarationWithType* decl,
    48                         const ResolvExpr::TypeEnvironment& env );
    4946
    5047                namespace Encoding {
Note: See TracChangeset for help on using the changeset viewer.