Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Tuples/Explode.h

    r7870799 r417117e  
    5151        template<typename OutputIterator>
    5252        void append( OutputIterator out, Expression* expr, const ResolvExpr::TypeEnvironment& env,
    53                         const ResolvExpr::OpenVarSet& openVars, const ResolvExpr::AssertionList& need,
     53                        const ResolvExpr::OpenVarSet& openVars, const ResolvExpr::AssertionList& need, 
    5454                        const ResolvExpr::Cost& cost, const ResolvExpr::Cost& cvtCost ) {
    5555                *out++ = ResolvExpr::Alternative{ expr, env, openVars, need, cost, cvtCost };
     
    5858        /// Append alternative to an ExplodedActual
    5959        static inline void append( ResolvExpr::ExplodedActual& ea, Expression* expr,
    60                         const ResolvExpr::TypeEnvironment&, const ResolvExpr::OpenVarSet&,
     60                        const ResolvExpr::TypeEnvironment&, const ResolvExpr::OpenVarSet&, 
    6161                        const ResolvExpr::AssertionList&, const ResolvExpr::Cost&, const ResolvExpr::Cost& ) {
    6262                ea.exprs.emplace_back( expr );
     
    111111                } else {
    112112                        // atomic (non-tuple) type - output a clone of the expression in a new alternative
    113                         append( std::forward<Output>(out), expr->clone(), alt.env, alt.openVars, alt.need,
     113                        append( std::forward<Output>(out), expr->clone(), alt.env, alt.openVars, alt.need, 
    114114                                alt.cost, alt.cvtCost );
    115115                }
     
    174174template< typename Output >
    175175void explodeRecursive(
    176         const ast::CastExpr *, const ResolvExpr::Candidate &,
    177         const ast::SymbolTable &, Output &&
     176        const ast::CastExpr * expr, const ResolvExpr::Candidate & arg,
     177        const ast::SymbolTable & symtab, Output && out
    178178) {
    179179}
     
    210210                        }
    211211                        // Cast a reference away to a value-type to allow further explosion.
    212                         if ( dynamic_cast< const ast::ReferenceType *>( local->result.get() ) ) {
     212                        if ( local->result.as< ast::ReferenceType >() ) {
    213213                                local = new ast::CastExpr{ local, tupleType };
    214214                        }
     
    220220                                // delete idx;
    221221                        }
    222                         // delete local;
    223222                }
    224223        } else {
     
    240239/// explode list of candidates into flattened list of candidates
    241240template< typename Output >
    242 void explode(
    243         const ResolvExpr::CandidateList & cands, const ast::SymbolTable & symtab, Output && out,
     241void explode( 
     242        const ResolvExpr::CandidateList & cands, const ast::SymbolTable & symtab, Output && out, 
    244243        bool isTupleAssign = false
    245244) {
Note: See TracChangeset for help on using the changeset viewer.