| commit | 87a3de41b10d292d3069b2cca0cae13837669099 | [log] [tgz] |
|---|---|---|
| author | Ömer Sinan Ağacan <omersa@google.com> | Mon Jun 19 10:21:35 2023 +0000 |
| committer | Commit Queue <dart-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Jun 19 10:21:35 2023 +0000 |
| tree | bf27653ef239fe74bfa2d2d4bfd69051c02f55a3 | |
| parent | 6dff4755e6a527b05765dd886f177ef2265cd30a [diff] |
[dart2wasm] Implement micro-task scheduling Use JS `setTimeout` for events and `queueMicrotask` for micro-tasks. dart2js event loop implementation is copied in `run_wasm.js` to be able to use `clearTimeout`, `setInterval`, `clearInterval`, and `scheduleMicrotask`, which are not not available in d8, and `setTimeout` in d8 does not wait before calling a callback. New passing d8 tests: - co19/LibTest/async/Future/Future.delayed_A01_t02 - co19/LibTest/async/Stream/Stream.periodic_A01_t01 - co19/LibTest/async/Stream/Stream.periodic_all_t01 - co19/LibTest/async/Stream/Stream.periodic_all_t02 - co19/LibTest/async/Stream/timeout_A04_t01 - co19/LibTest/async/StreamController/stream_all_A01_t01 - co19/LibTest/async/StreamController/stream_all_A01_t02 - co19/LibTest/async/StreamController/stream_all_A02_t01 - co19/LibTest/async/StreamController/stream_all_A02_t02 - co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A01_t01 - co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A01_t02 - co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A02_t01 - co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A02_t02 - co19/LibTest/async/Timer/Timer.periodic_A01_t01 - co19/LibTest/async/Timer/Timer_A01_t01 - co19/LibTest/core/Stopwatch/elapsedTicks_A01_t01 - language/async/call_test - language/regress/regress21795_test - lib/async/multiple_timer_test - lib/async/periodic_timer2_test - lib/async/periodic_timer3_test - lib/async/periodic_timer4_test - lib/async/schedule_microtask3_test - lib/async/schedule_microtask_test - lib/async/stream_timeout_test - lib/async/timer_isActive_test - lib/async/timer_repeat_test - lib/async/timer_test New passing Chrome tests: - co19/LibTest/async/Stream/timeout_A04_t01 - language/async/call_test - lib/async/schedule_microtask3_test Tests below fail because of async* desugaring issues and will be fixed separately: - language/async_star/no_cancel2_test - language/async_star/no_cancel_test Tests below fail because of an existing issue (#29615): - co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A01_t03 - co19/LibTest/async/StreamController/StreamController.broadcast_Stream_all_A02_t03 - co19/LibTest/async/StreamController/stream_all_A02_t03 Fixes #51599. Change-Id: Ib313e99bf3b3cb3bebeddc9e47dc77425ef94481 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305201 Reviewed-by: Aske Simon Christensen <askesc@google.com> Reviewed-by: Joshua Litt <joshualitt@google.com> Commit-Queue: Ömer Ağacan <omersa@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.