File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -351,7 +351,26 @@ class InteropSpecializerFactory {
351
351
/// should be called with `numberOfArgs` arguments.
352
352
final Map <Procedure , Map <int , Procedure >> _overloadedProcedures = {};
353
353
354
+ /// Maps an interop procedure for a JS object literal to trampolines based on
355
+ /// named arguments that are passed at invocation sites. For example:
356
+ ///
357
+ /// ```
358
+ /// extension type Literal._(JSObject _) implements JSObject {
359
+ /// external factory Literal.fact({double a, String b, bool c});
360
+ /// }
361
+ ///
362
+ /// Literal.fact(a: 1.2);
363
+ /// Literal.fact(a: 3.4, b: 'a');
364
+ /// Literal.fact(a: 5.6, b: 'b');
365
+ /// ```
366
+ ///
367
+ /// Here we map the procedure for `Literal.fact` to interop procedures, based
368
+ /// on the named arguments passed.
369
+ ///
370
+ /// The `String` keys are named arguments passed in the call sites, joined by
371
+ /// `|` . E.g. `"a|b"` in the second and third calls above.
354
372
final Map <Procedure , Map <String , Procedure >> _jsObjectLiteralMethods = {};
373
+
355
374
late final ExtensionIndex _extensionIndex;
356
375
357
376
InteropSpecializerFactory (this ._staticTypeContext, this ._util,
You can’t perform that action at this time.
0 commit comments