This removes the optimization that would reuse the Wasm struct of the superclass if no new fields were added in a class. Such reuse interferes with debugging. Binaryen performs a similar optimization in its TypeMerging pass. It seems to be doing a better job with the more precise type information provided after this change. Benchmarks show a positive trend. The change uncovered a number of latent bugs in the compiler, which are also fixed in this CL: - References to `StackTrace` objects must be typed with the representation type of `StackTrace`, rather than its struct type. - The dynamic call vtable entry and dynamic invocation forwarder functions must use `_ListBase` rather than `_List` for their parameters, since we sometimes pass growable lists to these functions. - Most covariant parameters must use the top type, since any object can be passed into such parameters via class type parameter covariance or tear-offs. The change makes us fail a number of tests with very deep class hierarchies due to the Wasm subtyping depth limit of 63. The optimization did not absolve us from this limitation. It just made us only count classes with newly added fields. The limitation is not expected to cause any problems for real code. The maximum subclassing depth that occurs in the Flute benchmark is 11. FWIW, Java has a limit of 60. The limitation is mentioned along with other limitations in https://github.com/dart-lang/sdk/issues/53703 Change-Id: Ifaa23d8278989e2549c41696d8913e55ed1e80aa Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324460 Commit-Queue: Aske Simon Christensen <askesc@google.com> Reviewed-by: Ömer Ağacan <omersa@google.com>
Dart
A client-optimized language for fast apps on any platform
Dart is:
-
Optimized for UI: Develop with a programming language specialized around the needs of user interface creation.
-
Productive: Make changes iteratively: use hot reload to see the result instantly in your running app.
-
Fast on all platforms: Compile to ARM & x64 machine code for mobile, desktop, and backend. Or compile to JavaScript for the web.
Dart's flexible compiler technology lets you run Dart code in different ways, depending on your target platform and goals:
-
Dart Native: For programs targeting devices (mobile, desktop, server, and more), Dart Native includes both a Dart VM with JIT (just-in-time) compilation and an AOT (ahead-of-time) compiler for producing machine code.
-
Dart Web: For programs targeting the web, Dart Web includes both a development time compiler (dartdevc) and a production time compiler (dart2js).
License & patents
Dart is free and open source.
See LICENSE and PATENT_GRANT.
Using Dart
Visit dart.dev to learn more about the language, tools, and to find codelabs.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
Our API reference documentation is published at api.dart.dev, based on the stable release. (We also publish docs from our beta and dev channels, as well as from the primary development branch).
Building Dart
If you want to build Dart yourself, here is a guide to getting the source, preparing your machine to build the SDK, and building.
There are more documents on our wiki.
Contributing to Dart
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.