commit | 09d22a0509b9bccdcf7dc1e00d1c577ec7eaa79f | [log] [tgz] |
---|---|---|
author | Liam Appelbe <liama@google.com> | Thu Nov 21 20:39:36 2019 +0000 |
committer | commit-bot@chromium.org <commit-bot@chromium.org> | Thu Nov 21 20:39:36 2019 +0000 |
tree | fc33c6d3eb68cefbad8f99df48b3e7859cf98f7c | |
parent | f6cefb35c04c6139e4138257c84f188073c3d28f [diff] |
[vm] Wrap late local var initializers in a closure. This fixes the case where a late local var initializer allocates variables or temporaries. It's not clear where they should be allocated, since the initializer could be called anywhere the late variable is accessed. So we wrap the initializer in a closure, since calling a closure only requires a single temporary. So then we just need to allocate that temp everywhere the late var is accessed. Since temporaries are associated with specific AST nodes, we also need to add the ability to swap out the temporaries associated with a node, so that we can use the getter's temp when the getter visits the initializer. This will also reduce code bloat for large initializers. Bug: https://github.com/dart-lang/sdk/issues/38841 Change-Id: Ice8c16babc0e56368657088edf1b51b422ee0241 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125762 Commit-Queue: Liam Appelbe <liama@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com> Reviewed-by: Régis Crelier <regis@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 has 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 the dart.dev to learn more about the language, tools, getting started, and more.
Browse pub.dev for more packages and libraries contributed by the community and the Dart team.
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.