@@ -1198,6 +1198,11 @@ class Solution {
1198
1198
// / A map from argument expressions to their applied property wrapper expressions.
1199
1199
llvm::MapVector<ASTNode, SmallVector<AppliedPropertyWrapper, 2 >> appliedPropertyWrappers;
1200
1200
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
+
1201
1206
// / Record a new argument matching choice for given locator that maps a
1202
1207
// / single argument to a single parameter.
1203
1208
void recordSingleArgMatchingChoice (ConstraintLocator *locator);
@@ -1332,6 +1337,10 @@ class Solution {
1332
1337
// / expression type map.
1333
1338
bool isStaticallyDerivedMetatype (Expr *E) const ;
1334
1339
1340
+ // / Retrieve the argument list that is associated with a call at the given
1341
+ // / locator.
1342
+ ArgumentList *getArgumentList (ConstraintLocator *locator) const ;
1343
+
1335
1344
SWIFT_DEBUG_DUMP;
1336
1345
1337
1346
// / Dump this solution.
@@ -2406,6 +2415,11 @@ class ConstraintSystem {
2406
2415
// / Cache of the effects any closures visited.
2407
2416
llvm::SmallDenseMap<ClosureExpr *, FunctionType::ExtInfo, 4 > closureEffectsCache;
2408
2417
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
+
2409
2423
public:
2410
2424
// / A map from argument expressions to their applied property wrapper expressions.
2411
2425
llvm::SmallMapVector<ASTNode, SmallVector<AppliedPropertyWrapper, 2 >, 4 > appliedPropertyWrappers;
@@ -2784,20 +2798,18 @@ class ConstraintSystem {
2784
2798
// / we're exploring.
2785
2799
SolverState *solverState = nullptr ;
2786
2800
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
-
2792
2801
// / Form a locator that can be used to retrieve argument information cached in
2793
2802
// / the constraint system for the callee described by the anchor of the
2794
2803
// / passed locator.
2795
2804
ConstraintLocator *getArgumentInfoLocator (ConstraintLocator *locator);
2796
2805
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.
2799
2808
ArgumentList *getArgumentList (ConstraintLocator *locator);
2800
2809
2810
+ // / Associate an argument list with a call at a given locator.
2811
+ void associateArgumentList (ConstraintLocator *locator, ArgumentList *args);
2812
+
2801
2813
Optional<SelectedOverload>
2802
2814
findSelectedOverloadFor (ConstraintLocator *locator) const {
2803
2815
auto result = ResolvedOverloads.find (locator);
@@ -2896,6 +2908,9 @@ class ConstraintSystem {
2896
2908
// / The length of \c ImplicitValueConversions.
2897
2909
unsigned numImplicitValueConversions;
2898
2910
2911
+ // / The length of \c ArgumentLists.
2912
+ unsigned numArgumentLists;
2913
+
2899
2914
// / The previous score.
2900
2915
Score PreviousScore;
2901
2916
0 commit comments