[vm] Remove overlap between Function and FunctionType. Previously there were several pieces of information shared between both FunctionType and Function, mostly in the packed fields, but named argument names were also kept in both places. Now the FunctionType is the primary source for this information, with the Function only keeping the names of positional arguments, which are discarded in AOT snapshots. This does mean extra work to access this information via the function object, but for the most part, this information is only accessed in the compiler or during dynamic lookups or checks in the runtime. After adding the count of type parameters to the packed information in FunctionType, the packed information has been split into two pieces: one for parameter counts, another for type parameter counts. This split does not increase the size of UntaggedFunctionType, as there were 2 bytes available in the existing padding. Changes on flutter gallery in release mode: * ARM7 code size: total -0.91%, readonly -0.22%, isolate -4.32% * ARM7 heap size: total -2.00% * ARM8 code size: total -0.93%, readonly -0.22%, isolate -4.32% * ARM8 heap size: total -2.12% Changes on flutter gallery in release-sizeopt mode: * ARM7 code size: total -0.24%, readonly -0.08%, isolate -1.49% * ARM7 heap size: total -0.88% * ARM8 code size: total -0.26%, readonly -0.11%, isolate -1.49% * ARM8 heap size: total -1.01% TEST=Refactoring, so existing tests. Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try Change-Id: Ic4d59a7b4acca039a5647f9163e716f6019163f5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203241 Commit-Queue: Tess Strickland <sstrickl@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Reviewed-by: Régis Crelier <regis@google.com>
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).
Dart is free and open source.
See LICENSE and PATENT_GRANT.
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).
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.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.