This CL:
* adds a test that runs the VM with old dills (compilations of dart2js
with old checkouts) with the --compile_all argument (1).
* adds a number of old dills (for binary version 25, 27, 28, 29)
(by mistake binary version 26 sort of didn't really happen)
* adds a PRESUBMIT check in kernel that verifies that we have an
"old dill" for the current binary version, so one don't bump the
version without creating a new dill.
(1): It uses --compile_all to force the VM to "read and understand"
everything in the dill file. The hope being that we try out
all/most language constructs and thus verifies that they can be
read by the VM.
Old "old dill" files should be removed once the VM stops supporting that
version. That is a manual process, but a test should complain that the VM
cannot read the old "old dill"(s) once/if that happens.
This should (help) detect errors such as the one recently where a merge
error caused a single "if >= 28" (that should have been "if >= 29" and
thus stopped the VM from reading dills from version 28) to slip through
and require a lot of debugging a few days later.
Change-Id: Id79e16c7ad896c0ccc4e181465b05b67822ac31a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113698
Commit-Queue: Jens Johansen <jensj@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.