This is the first part of using the new encodings of MethodInvocation, PropertyGet and PropertySet in dart2js. In this CL the new visitors are implemented in static_type.dart. This change is done by refactoring the existing implementation into helpers and new registration methods that can be used by both the old and the new encoding but lends itself to take advance of the new encoding. The new encoding is not enabled until all of dart2js has been migrated to the new encoding. The refactoring is intentionally not changing the outcome of the static_type.dart to make it easier to detect accidental regressions introduced by the migration. Change-Id: I93d2033969c33d4c7a5957ad7a6c0b1cdf47fe6f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184220 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Mayank Patke <fishythefish@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.