commit | 65f4a733bbb96fc8402416253f12a2d474a7b8fa | [log] [tgz] |
---|---|---|
author | Vyacheslav Egorov <vegorov@google.com> | Thu Feb 16 19:22:45 2023 +0000 |
committer | Commit Queue <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Feb 16 19:22:45 2023 +0000 |
tree | 2092966931acca2b1a936b082a5bac248c0604d1 | |
parent | 6e6f89a2558121e47ffcdbba17397e92c0cd9067 [diff] |
[vm/compiler] Stop pushing arguments in optimized code. After this change we no longer push outgoing arguments for normal Dart calls, but instead simply move them into an area reserved for outgoing arguments at the top of the frame. This allows us to stop mutating SP and avoid explicit Drop(argc) after each call. There are still other places in the generated code where we push something onto the stack either to free a temporary register or spill a value across a slow-path call. This is the first step towards switching to native SP on ARM64. # Code Size Impact I have tested this on a large internal application and got the following size delta ## ARM | | Before | After | Delta | | |--------|----------|----------|---------|-------| | ROData | 6366632 | 6463680 | +97048 | +1.5% | | Code | 22714192 | 22043984 | -670208 | -2.9% | | Total | 33723701 | 33150477 | -573224 | -1.6% | ## ARM64 | | Before | After | Delta | | |--------|----------|----------|---------|-------| | ROData | 7122032 | 7214288 | +92256 | +1.3% | | Code | 21607196 | 20741788 | -865408 | -4.0% | | Total | 33375769 | 32602544 | -773225 | -2.3% | TEST=ci Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-precomp-ffi-qemu-linux-release-riscv64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-simarm64-try Bug: https://github.com/dart-lang/sdk/issues/39083 Change-Id: Icace0c986285b9c16e41786cded44f88277bd25f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282029 Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Slava Egorov <vegorov@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.