index to fix VMs coverage issue This CL fixes the VM not always reporting coverage for mixin usages properly. * When asking the VM for coverage you can do it in one of two ways * Ask the VM for coverage for everything; or * Ask the VM for coverage for a specific script * Asking the VM for coverage for everything works perfectly fine. The VM goes through everything and reports coverage correctly. * Asking the VM for coverage for a specific script (which is, at least now, what the flutter tools does) doesn't work in the simple mixin case described at http://dartbug.com/39779: The VM goes through the libraries, asking for the list of scripts they "know about", and checks for matches against what you asked for. In this case, when asking for 'master.dart', the library for 'lib.dart' says no when it shouldn't --- because of the way the mixin transformation works the content is actually in lib.dart. This CL updates the content of the field 'sourceReferences' on Library to fix the issue. Fixes #39779 Change-Id: I0c38a323c81d1784ade704837b67ece549fc95d2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128585 Commit-Queue: Jens Johansen <jensj@google.com> Reviewed-by: Vyacheslav Egorov <vegorov@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
Dart Kernel
Dart Kernel is a small high-level language derived from Dart. It is designed for use as an intermediate format for whole-program analysis and transformations, and to be consumed by codegen and execution backends.
The kernel language has an in-memory representation in Dart and can be serialized as binary or text.
Both the kernel language and its implementations are unstable and are under development.
This package contains the Dart part of the implementation and contains:
- A transformable IR for the kernel language
- Serialization of kernel code
Note: The APIs in this package are in an early state; developers should be careful about depending on this package. In particular, there is no semver contract for release versions of this package. Please depend directly on individual versions.
See ast.dart for the in-memory IR, or binary.md for a description of the binary format. For now, the textual format is very ad-hoc and cannot be parsed back in.