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