ed3824a220
It's a badly designed class, but this change makes it slightly better. (We should consider moving it to package:collection and removing it from the platform libraries. Eventually.) The changes decouples the public `DoubleLinkedQueueEntry` class from the actual queue implementation classes, avoiding the latter having to share a generic `_Link<DoubleLinkedQueueEntry>` interface which would force them to do otherwise unnecessary casts. The public class should have been abstract, but isn't. It's mainly used as the API of the entries exposed by DoubleLinkedQueue, but it can also be used by itself to build double-linked lists that are not part of a Queue, and the class can be extended. If anyone does either, it should keep working, so it needs to be a concrete, self-contained class with a generative constructor. That class is moved to dart:_internal to avoid its private implementation fields from interfering with the queue implementation classes, which have similar fields, but can now have them at different types. That's a hack, but it works. The internal implementation of the DoubleLinkedQueue and its entries are updated to better follow current programming idioms, and avoids having fields on classes which don't need them. Also fixes #27920 (`clear`ing a list now detaches each entry from the list so later `.contains` won't give the wrong answer). And moves queue tests from tests/corelib to tests/lib/collection, since Queue isn't exposed by `dart:core`. BUG= https://github.com/dart-lang/sdk/issues/27920 Change-Id: Ia3bb340a75886de160cc0e449947e8e7ee587061 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211265 Commit-Queue: Lasse R.H. Nielsen <lrn@google.com> Reviewed-by: Nate Bosch <nbosch@google.com> |
||
---|---|---|
.dart_tool | ||
.github | ||
benchmarks | ||
build | ||
client | ||
docs | ||
pkg | ||
runtime | ||
samples | ||
samples-dev/swarm | ||
samples_2 | ||
sdk | ||
tests | ||
third_party | ||
tools | ||
utils | ||
.clang-format | ||
.gitattributes | ||
.gitconfig | ||
.gitignore | ||
.gn | ||
.mailmap | ||
.packages | ||
.style.yapf | ||
.vpython | ||
AUTHORS | ||
BUILD.gn | ||
CHANGELOG.md | ||
codereview.settings | ||
CONTRIBUTING.md | ||
DEPS | ||
LICENSE | ||
PATENT_GRANT | ||
PRESUBMIT.py | ||
README.dart-sdk | ||
README.md | ||
sdk_args.gni | ||
WATCHLISTS |
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.