- File:
-
- 1 edited
-
src/ResolvExpr/CandidateFinder.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
ra55ebcc r14755e5 891 891 } else if ( auto unionInst = aggrExpr->result.as< ast::UnionInstType >() ) { 892 892 addAggMembers( unionInst, aggrExpr, *cand, Cost::unsafe, "" ); 893 } 894 else if ( auto enumInst = aggrExpr->result.as< ast::EnumInstType >() ) { 893 } else if ( auto enumInst = aggrExpr->result.as< ast::EnumInstType >() ) { 895 894 // The Attribute Arrays are not yet generated, need to proxy them 896 895 // as attribute function call … … 898 897 if ( enumInst->base && enumInst->base->base ) { 899 898 auto valueName = new ast::NameExpr(location, "valueE"); 900 auto untypedValueCall = new ast::UntypedExpr( 899 auto untypedValueCall = new ast::UntypedExpr( 901 900 location, valueName, { aggrExpr } ); 902 901 auto result = ResolvExpr::findVoidExpression( untypedValueCall, context ); … … 975 974 } 976 975 977 if (argType.as<ast::PointerType>()) funcFinder.otypeKeys.insert(Mangle::Encoding::pointer); 976 if (argType.as<ast::PointerType>()) funcFinder.otypeKeys.insert(Mangle::Encoding::pointer); 978 977 else funcFinder.otypeKeys.insert(Mangle::mangle(argType, Mangle::NoGenericParams | Mangle::Type)); 979 978 } … … 1240 1239 restructureCast( cand->expr, toType, castExpr->isGenerated ), 1241 1240 copy( cand->env ), std::move( open ), std::move( need ), cand->cost + thisCost); 1242 // currently assertions are always resolved immediately so this should have no effect. 1241 // currently assertions are always resolved immediately so this should have no effect. 1243 1242 // if this somehow changes in the future (e.g. delayed by indeterminate return type) 1244 1243 // we may need to revisit the logic. … … 1403 1402 void Finder::postvisit( const ast::VariableExpr * variableExpr ) { 1404 1403 // not sufficient to just pass `variableExpr` here, type might have changed since 1405 addCandidate( variableExpr, tenv ); 1404 addCandidate( variableExpr, tenv ); 1406 1405 } 1407 1406 … … 1792 1791 CandidateRef newCand = 1793 1792 std::make_shared<Candidate>( 1794 newExpr, copy( tenv ), ast::OpenVarSet{}, 1793 newExpr, copy( tenv ), ast::OpenVarSet{}, 1795 1794 ast::AssertionSet{}, Cost::zero, cost 1796 1795 ); 1797 1796 1798 1797 if (newCand->expr->env) { 1799 1798 newCand->env.add(*newCand->expr->env);
Note:
See TracChangeset
for help on using the changeset viewer.