2d851eb444
This change improves DDC/DDK source maps: - fix Analyzer backend step locations to pass all of the tests Kernel was passing. Also improves breakpoints and code coverage. - fix Analyzer backend to mark hover spans where possible, such as fields, parameters, locals, `this`, properties, methods, etc. - refactor DDC/DDK backends to emit source locations, rather than pointers to Analyzer/Kernel tree nodes. - unify/simplify source_map_printer between Analyzer/Kernel backends. - source_map_printer understands JS expression nesting, marking the innermost JS expression offset corresponding to a given Dart offset. This preserves hover tooltips, even for expressions with implicit coercions (e.g. `dart.test(x)`) - source_map_printer understands that JS end-of-function markings need to be before the closing brace. - merge _visitAndMarkExpression and _visitExpression to simplify Analyzer & Kernel backends. - fix test expectations where the column location was too specific. - adds a message to the stepping test runner to help future debugging. - removes optional destructuring support from Analyzer backend. This was unused/untested and added complexity. Instead we should decide if/when to fully switch to destructuring, and then do so. Change-Id: Ic47b4e21447fffc8fb1809b7bf8ffceeeb61b43e Reviewed-on: https://dart-review.googlesource.com/42028 Reviewed-by: Vijay Menon <vsm@google.com>
Tools for processing the Dart SDK
patch_sdk.dart
This script combines:
tool/input_sdk/lib/...
tool/input_sdk/patch/...
tool/input_sdk/private/...
and produces the merged SDK sources in:
gen/patched_sdk/...
The result has all "external" keywords replaced with the @patch implementations.
Generally local edits should be to input_sdk/patch and input_sdk/private,
as those two directories are specific to DDC. input_sdk/lib should represent
unmodified SDK sources to the maximum extent possible. Currently there are
slight edits to the type annotations in some cases.
See patch_sdk.dart for more information.
sdk_version_check.dart
Asserts that the Dart VM is at least a particular semantic version. It returns an exit code to make it easy to integrate with shell scripts.