-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dart2wasm] Generate inline code for int ~/ operator
The implementation of `~/` is a bit more complicated than other operators as it needs to handle some special cases, so we currently don't generate inline code for it. This causes generating indirect calls to `~/` in some cases even when the static Dart type of the arguments are `int`s, see [1] for details. Update the intrinsic matcher to specially handle this operator by calling `_BoxedInt._truncDiv`, which is then inlined. This leads to huge performance wins in [2] as typed data `length` getters currently compiled to indirect calls to `~/`. [1]: #53921 [2]: https://dart-review.googlesource.com/c/sdk/+/328920 Change-Id: I92d89db76af38b1f843e25a841074f00ff2ef30a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333381 Reviewed-by: Aske Simon Christensen <askesc@google.com> Commit-Queue: Ömer Ağacan <omersa@google.com>
- Loading branch information
Showing
2 changed files
with
57 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters