Changes in src/ResolvExpr/Resolver.cc [251ce80:46da46b]
- File:
-
- 1 edited
-
src/ResolvExpr/Resolver.cc (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/Resolver.cc
r251ce80 r46da46b 38 38 #include "AST/SymbolTable.hpp" 39 39 #include "AST/Type.hpp" 40 #include "Common/Eval.h" // for eval41 #include "Common/Iterate.hpp" // for group_iterate42 40 #include "Common/PassVisitor.h" // for PassVisitor 43 41 #include "Common/SemanticError.h" // for SemanticError 44 42 #include "Common/Stats/ResolveTime.h" // for ResolveTime::start(), ResolveTime::stop() 45 #include "Common/ ToString.hpp" // for toCString43 #include "Common/utility.h" // for ValueGuard, group_iterate 46 44 #include "InitTweak/GenInit.h" 47 45 #include "InitTweak/InitTweak.h" // for isIntrinsicSingleArgCallStmt … … 1011 1009 ast::TypeEnvironment env; 1012 1010 CandidateFinder finder( context, env ); 1011 finder.allowVoid = true; 1013 1012 finder.find( untyped, recursion_level == 1 ? mode.atTopLevel() : mode ); 1014 1013 --recursion_level; … … 1054 1053 1055 1054 // promote candidate.cvtCost to .cost 1056 promoteCvtCost( winners );1055 // promoteCvtCost( winners ); 1057 1056 1058 1057 // produce ambiguous errors, if applicable … … 1108 1107 void removeExtraneousCast( ast::ptr<ast::Expr> & expr, const ast::SymbolTable & symtab ) { 1109 1108 if ( const ast::CastExpr * castExpr = expr.as< ast::CastExpr >() ) { 1110 if ( typesCompatible( castExpr->arg->result, castExpr->result ) ) {1109 if ( typesCompatible( castExpr->arg->result, castExpr->result, symtab ) ) { 1111 1110 // cast is to the same type as its argument, remove it 1112 1111 swap_and_save_env( expr, castExpr->arg ); … … 1730 1729 1731 1730 // Find all candidates for a function in canonical form 1732 funcFinder.find( clause.target , ResolvMode::withAdjustment() );1731 funcFinder.find( clause.target_func, ResolvMode::withAdjustment() ); 1733 1732 1734 1733 if ( funcFinder.candidates.empty() ) { 1735 1734 stringstream ss; 1736 1735 ss << "Use of undeclared indentifier '"; 1737 ss << clause.target .strict_as< ast::NameExpr >()->name;1736 ss << clause.target_func.strict_as< ast::NameExpr >()->name; 1738 1737 ss << "' in call to waitfor"; 1739 1738 SemanticError( stmt->location, ss.str() ); … … 1834 1833 if ( 1835 1834 ! unify( 1836 arg->expr->result, *param, resultEnv, need, have, open ) 1835 arg->expr->result, *param, resultEnv, need, have, open, 1836 symtab ) 1837 1837 ) { 1838 1838 // Type doesn't match … … 1921 1921 auto clause2 = new ast::WaitForClause( clause.location ); 1922 1922 1923 clause2->target = funcCandidates.front()->expr;1923 clause2->target_func = funcCandidates.front()->expr; 1924 1924 1925 1925 clause2->target_args.reserve( clause.target_args.size() ); … … 1944 1944 1945 1945 // Resolve the conditions as if it were an IfStmt, statements normally 1946 clause2-> when_cond = findSingleExpression( clause.when_cond, context );1946 clause2->cond = findSingleExpression( clause.cond, context ); 1947 1947 clause2->stmt = clause.stmt->accept( *visitor ); 1948 1948
Note:
See TracChangeset
for help on using the changeset viewer.