This ensures that the helpers are seen as being part of the main unit for deferred-load compiles. Prior to this change, debug dart2js would assert: $ sdk/bin/dart2js_developer --test-mode --packages=.packages benchmarks/OmnibusDeferred/dart/OmnibusDeferred.dart --out=om1c/o.js org-dartlang-sdk:///lib/_internal/js_runtime/lib/late_helper.dart@343+1: Internal Error: The compiler crashed when compiling this element. The compiler is broken. When compiling the above element, the compiler crashed. It is not possible to tell if this is caused by a problem in your program or not. Regardless, the compiler should not crash. The Dart team would greatly appreciate if you would take a moment to report this problem at http://dartbug.com/new. Please include the following information: * the name and version of your operating system, * the Dart SDK build number (build number could not be determined), and * the entire message you see here (including the full stack trace below as well as the source location above). The compiler crashed: 'package:compiler/src/deferred_load/output_unit.dart': Failed assertion: line 272 pos 12: 'unit != null': No output unit for member j:method(throwLateFieldNI) #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61) #1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5) #2 OutputUnitData.outputUnitForMember (package:compiler/src/deferred_load/output_unit.dart:272:12) #3 OutputUnitData.hasOnlyNonDeferredImportPaths (package:compiler/src/deferred_load/output_unit.dart:306:33) #4 KernelSsaGraphBuilder._tryInlineMethod.heuristicSayGoodToGo (package:compiler/src/ssa/builder_kernel.dart:5922:12) Change-Id: Ic31c4894105a9a22eb0821a489c8dd2a4e3d0110 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241686 Reviewed-by: Mayank Patke <fishythefish@google.com> Commit-Queue: Stephen Adams <sra@google.com>
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.