Changeset 81da70a5 for src


Ignore:
Timestamp:
Jun 25, 2020, 5:00:18 PM (4 years ago)
Author:
Fangren Yu <f37yu@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
276f105
Parents:
8ff586c
Message:

actually fill inferred params and disable a check

Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    r8ff586c r81da70a5  
    593593                                auto res = tgtInferParams.emplace(srcParam.first, ParamEntry(
    594594                                        srcParam.second.decl,
    595                                         get<Declaration>().accept1(srcParam.second.declptr),
     595                                        get<Declaration>().accept1(srcParam.second.declptr)->clone(),
    596596                                        get<Type>().accept1(srcParam.second.actualType),
    597597                                        get<Type>().accept1(srcParam.second.formalType),
  • src/ResolvExpr/SatisfyAssertions.cpp

    r8ff586c r81da70a5  
    229229                InferMatcher( InferCache & inferred ) : inferred( inferred ) {}
    230230
    231                 const ast::Expr * postmutate( const ast::Expr * expr ) {
     231                const ast::Expr * postvisit( const ast::Expr * expr ) {
    232232                        // Skip if no slots to find
    233233                        if ( expr->inferred.mode != ast::Expr::InferUnion::Slots ) return expr;
     
    239239                                auto it = inferred.find( slot );
    240240                                if ( it == inferred.end() ) {
    241                                         assert(!"missing assertion");
     241                                        std::cerr << "missing assertion " << slot << std::endl;
     242                                        continue;
    242243                                }
    243244
     
    245246                                for ( auto & entry : it->second ) {
    246247                                        // recurse on inferParams of resolved expressions
    247                                         entry.second.expr = postmutate( entry.second.expr );
     248                                        entry.second.expr = postvisit( entry.second.expr );
    248249                                        auto res = newInferred.emplace( entry );
    249250                                        assert( res.second && "all assertions newly placed" );
Note: See TracChangeset for help on using the changeset viewer.