@@ -1198,6 +1198,11 @@ class Solution {
11981198 // / A map from argument expressions to their applied property wrapper expressions.
11991199 llvm::MapVector<ASTNode, SmallVector<AppliedPropertyWrapper, 2 >> appliedPropertyWrappers;
12001200
1201+ // / A mapping from the constraint locators for references to various
1202+ // / names (e.g., member references, normal name references, possible
1203+ // / constructions) to the argument lists for the call to that locator.
1204+ llvm::MapVector<ConstraintLocator *, ArgumentList *> argumentLists;
1205+
12011206 // / Record a new argument matching choice for given locator that maps a
12021207 // / single argument to a single parameter.
12031208 void recordSingleArgMatchingChoice (ConstraintLocator *locator);
@@ -1332,6 +1337,10 @@ class Solution {
13321337 // / expression type map.
13331338 bool isStaticallyDerivedMetatype (Expr *E) const ;
13341339
1340+ // / Retrieve the argument list that is associated with a call at the given
1341+ // / locator.
1342+ ArgumentList *getArgumentList (ConstraintLocator *locator) const ;
1343+
13351344 SWIFT_DEBUG_DUMP;
13361345
13371346 // / Dump this solution.
@@ -2406,6 +2415,11 @@ class ConstraintSystem {
24062415 // / Cache of the effects any closures visited.
24072416 llvm::SmallDenseMap<ClosureExpr *, FunctionType::ExtInfo, 4 > closureEffectsCache;
24082417
2418+ // / A mapping from the constraint locators for references to various
2419+ // / names (e.g., member references, normal name references, possible
2420+ // / constructions) to the argument lists for the call to that locator.
2421+ llvm::MapVector<ConstraintLocator *, ArgumentList *> ArgumentLists;
2422+
24092423public:
24102424 // / A map from argument expressions to their applied property wrapper expressions.
24112425 llvm::SmallMapVector<ASTNode, SmallVector<AppliedPropertyWrapper, 2 >, 4 > appliedPropertyWrappers;
@@ -2784,20 +2798,18 @@ class ConstraintSystem {
27842798 // / we're exploring.
27852799 SolverState *solverState = nullptr ;
27862800
2787- // / A mapping from the constraint locators for references to various
2788- // / names (e.g., member references, normal name references, possible
2789- // / constructions) to the argument lists for the call to that locator.
2790- llvm::DenseMap<ConstraintLocator *, ArgumentList *> ArgumentLists;
2791-
27922801 // / Form a locator that can be used to retrieve argument information cached in
27932802 // / the constraint system for the callee described by the anchor of the
27942803 // / passed locator.
27952804 ConstraintLocator *getArgumentInfoLocator (ConstraintLocator *locator);
27962805
2797- // / Retrieve the argument list that is associated with a member
2798- // / reference at the given locator.
2806+ // / Retrieve the argument list that is associated with a call at the given
2807+ // / locator.
27992808 ArgumentList *getArgumentList (ConstraintLocator *locator);
28002809
2810+ // / Associate an argument list with a call at a given locator.
2811+ void associateArgumentList (ConstraintLocator *locator, ArgumentList *args);
2812+
28012813 Optional<SelectedOverload>
28022814 findSelectedOverloadFor (ConstraintLocator *locator) const {
28032815 auto result = ResolvedOverloads.find (locator);
@@ -2896,6 +2908,9 @@ class ConstraintSystem {
28962908 // / The length of \c ImplicitValueConversions.
28972909 unsigned numImplicitValueConversions;
28982910
2911+ // / The length of \c ArgumentLists.
2912+ unsigned numArgumentLists;
2913+
28992914 // / The previous score.
29002915 Score PreviousScore;
29012916
0 commit comments