commit | 1f828c7cb2b005fe3a278a49433738946f3550fe | [log] [tgz] |
---|---|---|
author | Vyacheslav Egorov <vegorov@google.com> | Mon Mar 01 09:55:09 2021 +0000 |
committer | commit-bot@chromium.org <commit-bot@chromium.org> | Mon Mar 01 09:55:09 2021 +0000 |
tree | 745121906a86893003bb64411550bfdbc2f84fc4 | |
parent | 3268bd04296343747a27af9e9cd0169be91aed37 [diff] |
[vm/compiler] Fix IntConverter canonicalization When going from Int64 through another representation back into Int64 you can discard a conversion if and only if it does not lose some bits on the way. Previously we were checking for truncation flag, but this is incorrect because it does not actually tell us anything about about whether or not bits are going to be lost. Instead, we should be checking the range of the source value. In addition to fixing potential correctness issues, this CL actually improves quality of code generated for Uint8 loads because it removes a redundant chain of Int64->Uint32->Int64 conversions that follows the load (which compiled 2 two redundant moves). Issue https://github.com/dart-lang/sdk/issues/40308 TEST=vm/cc/IL_IntConverterCanonicalization Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try Change-Id: Ifef0943a50d414bde41b2194e30b58ad3a8c106c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187921 Reviewed-by: Daco Harkes <dacoharkes@google.com> Commit-Queue: Vyacheslav 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.