mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:28:02 +00:00
51c4e03928
Changes the representation of closures to include a vtable with entry points for the various ways in which the function can be called. For each combination of type parameter count and positional parameter count, the names of named parameters occurring together with that combination are partitioned into clusters such that any combination of names that occurs together is contained within a single cluster. Each combination of type parameter count and positional parameter count gets a vtable layout for signatures without named parameters, plus one for each cluster of parameter names belonging to the combination. Each vtable layout will have an entry for each number of positional arguments from 0 up to the maximum number for the signature, followed by an entry for each (non-empty) combination of argument names from its cluster that occurs in a function call in the program. This layout scheme is consistent with function subtyping in the sense that if signature B is a subtype of signature A, then the Wasm struct for the vtable layout corresponding to B is a subtype of the Wasm struct for the vtable layout corresponding to A, i.e. the fields in the layout for A is a prefix of the fields in the layout for B. Change-Id: I36569be5251cc0cca4373b08c48d37c214478c3c Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256822 Commit-Queue: Aske Simon Christensen <askesc@google.com> Reviewed-by: Joshua Litt <joshualitt@google.com> |
||
---|---|---|
.. | ||
bin | ||
lib | ||
analysis_options.yaml | ||
dart2wasm.md | ||
OWNERS | ||
pubspec.yaml |