Ignore:
Timestamp:
May 13, 2024, 7:07:06 AM (17 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
ca4f2b2
Parents:
ec20ab9 (diff), 5f225f5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

fix merge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CandidateFinder.cpp

    rec20ab9 rbf4fe05  
    1717
    1818#include <deque>
    19 #include <iterator>               // for back_inserter
     19#include <iterator>                 // for back_inserter
    2020#include <sstream>
    2121#include <string>
     
    2525#include "AdjustExprType.hpp"
    2626#include "Candidate.hpp"
    27 #include "CastCost.hpp"           // for castCost
     27#include "CastCost.hpp"             // for castCost
    2828#include "CompilationState.hpp"
    29 #include "ConversionCost.h"       // for conversionCast
    30 #include "Cost.h"
     29#include "ConversionCost.hpp"       // for conversionCast
     30#include "Cost.hpp"
    3131#include "ExplodedArg.hpp"
    3232#include "PolyCost.hpp"
    33 #include "RenameVars.h"           // for renameTyVars
    34 #include "Resolver.h"
    35 #include "ResolveTypeof.h"
     33#include "RenameVars.hpp"           // for renameTyVars
     34#include "Resolver.hpp"
     35#include "ResolveTypeof.hpp"
    3636#include "SatisfyAssertions.hpp"
    3737#include "SpecCost.hpp"
    38 #include "typeops.h"              // for combos
    39 #include "Unify.h"
    40 #include "WidenMode.h"
     38#include "Typeops.hpp"              // for combos
     39#include "Unify.hpp"
     40#include "WidenMode.hpp"
    4141#include "AST/Expr.hpp"
    4242#include "AST/Node.hpp"
     
    4545#include "AST/SymbolTable.hpp"
    4646#include "AST/Type.hpp"
    47 #include "Common/utility.h"       // for move, copy
    48 #include "SymTab/Mangler.h"
    49 #include "Tuples/Tuples.h"        // for handleTupleAssignment
    50 #include "InitTweak/InitTweak.h"  // for getPointerBase
    51 
    52 #include "Common/Stats/Counter.h"
     47#include "Common/Utility.hpp"       // for move, copy
     48#include "SymTab/Mangler.hpp"
     49#include "Tuples/Tuples.hpp"        // for handleTupleAssignment
     50#include "InitTweak/InitTweak.hpp"  // for getPointerBase
     51
     52#include "Common/Stats/Counter.hpp"
    5353
    5454#include "AST/Inspect.hpp"             // for getFunctionName
     
    21382138}
    21392139
    2140 // get the valueE(...) ApplicationExpr that returns the enum value
    2141 const ast::Expr * getValueEnumCall(
    2142         const ast::Expr * expr,
    2143         const ResolvExpr::ResolveContext & context, const ast::TypeEnvironment & env ) {
    2144                 auto callExpr = new ast::UntypedExpr(
    2145                         expr->location, new ast::NameExpr( expr->location, "valueE"), {expr} );
    2146                 CandidateFinder finder( context, env );
    2147                 finder.find( callExpr );
    2148                 CandidateList winners = findMinCost( finder.candidates );
    2149                 if (winners.size() != 1) {
    2150                         SemanticError( callExpr, "Ambiguous expression in valueE..." );
    2151                 }
    2152                 CandidateRef & choice = winners.front();
    2153                 return choice->expr;
    2154 }
    2155 
    21562140const ast::Expr * createCondExpr( const ast::Expr * expr ) {
    21572141        assert( expr );
Note: See TracChangeset for help on using the changeset viewer.