Commit graph

37235 commits

Author SHA1 Message Date
Konstantin Shcheglov 0d98f6ab5d Suggest named arguments anywhere when named_arguments_anywhere.
Change-Id: I1aefd0c7f4c4e140e5505a2b91a65a8c3b1e449a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222080
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-12-06 21:41:31 +00:00
Konstantin Shcheglov 76bfec126d Issue 47842. Add a test for extension from other package.
Bug: https://github.com/dart-lang/sdk/issues/47842
Change-Id: Ib6c4d6791f823191ef39998a6e350c48915d52fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222243
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-12-06 21:40:47 +00:00
Konstantin Shcheglov df48d2f744 Rewrite any URIs to canonical, not only file://.
Change-Id: I690154d54818ec576908563ea6f3ed76799be951
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222240
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-12-06 21:39:57 +00:00
Jonas Finnemann Jensen ad9e6d2ec3 Enable lints to understand short-form git-dependencies
This will fix the case where insecure git-dependencies are not caught when using the short-form git-dependencies.
https://github.com/dart-lang/linter/pull/3087/files#diff-b58e5cf5db10a02c5191e3240563bdbb9fc04727327ad709e406ac6ec4366532R25

Change-Id: I83826df588b1df4e29df1fec9d65c9ab7f62b57d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221945
Auto-Submit: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-12-06 21:36:16 +00:00
Konstantin Shcheglov 4a51fffe45 Change MultiCorrectionProducer.producers to Stream.
In order to eventually remove DeclarationsTracker we would need to
switch Import Library fix to AnalysisDriver APIs that are async.

Change-Id: Ief1dea72d63e4b508dce05a66b7cb82893a8a996
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-06 19:59:46 +00:00
Sam Rawlins ed9f6b0015 Remove convertChildToChildren; tidy convertChildToChildren2
convertChildToChildren is unused within the package.

Convert Function type to function types in convertChildToChildren2,
to reduce implicit casts.

Bug: https://github.com/dart-lang/sdk/issues/41651
Change-Id: I60dcec3649a98c39057869f3210b6b44aba0ddd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-12-06 19:54:46 +00:00
Konstantin Shcheglov abd1dc8465 Extend AST for enhanced enums.
Change-Id: Ief64e4ba23311543702e7aa1b855e1a3519172a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222120
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-06 18:57:17 +00:00
Konstantin Shcheglov 24e681927a Implement isEnumConstant in ConstFieldElementImpl_EnumValue.
Change-Id: Icbb2dac7db5299a72294f31e119000bd8f535516
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222100
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-06 18:46:46 +00:00
Sam Rawlins d45fba5527 analyzer: Stop over-reporting 'unused' parameters
Currently analyzer is reporting optional parameters of private
functions, methods, and constructors as unused in some cases where the
function (or enclosing class for a constructor) is generic. In order to
support unused_element as a no-false-positives rule, this CL changes
the behavior to _always_ consider such parameters as used, and never
report them as unused.

The real fix is harder; I think it requires something like
ParameterMembers to be created during inference, but that is a pretty
sweeping change, and requiring TypeProviders to be passed around a lot
where they are not now.

Also move the `_hasPragmaVmEntryPoint` check to much later, as it is an
exceedingly uncommon annotation.

Bug: https://github.com/dart-lang/sdk/issues/47839
Change-Id: Ie2bc0dfbe2e4527676b1cd15045e67fb5f0f1719
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221992
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-12-06 15:25:36 +00:00
Chloe Stefantsova fc9f7e3372 [parser] Add support for typed super-initializer parameters
Part of https://github.com/dart-lang/sdk/issues/47525

Closes https://github.com/dart-lang/sdk/issues/47741

Bug: https://github.com/dart-lang/sdk/issues/47741
Change-Id: I0558b33aa43cc73e67ca0d17bd5c8ec1afdc526f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221634
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-12-06 10:31:57 +00:00
Michael Thomsen 7da2117892 Initial 'dart doc' developer command
Initial 'dart doc' command for the unified 'dart' developer tool,
over time replacing the exiting 'bin/dartdoc' tool.

This is a second attempt after the previous got reverted:
https://dart-review.googlesource.com/c/sdk/+/217980

The first attempt, which was already reviewed, is
in patchset 1.

Change-Id: Id9e0e572944ba032c32f3cebec579ab23d0df036
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220744
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-12-06 10:26:09 +00:00
Sam Rawlins e774227a81 analysis_server: Remove implicit casts from test and tool
Bug: https://github.com/dart-lang/sdk/issues/41651
Change-Id: I0a165aef2b5d5cd2f97e5728bb6011a8eb70d9a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222041
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-12-06 03:30:26 +00:00
Sam Rawlins 2206b6999b analysis_server: Remove implicit casts in lib/
Bug: https://github.com/dart-lang/sdk/issues/41651
Change-Id: I1a804bbf0c0b2d26fcd12111ec68f673f4a41a04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222042
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-12-06 00:54:35 +00:00
Joshua Litt 3bfb2db3d0 [dart2js] Add a flag to dump unused dill libraries.
Change-Id: I27c3fd8121c2744212afab70a827d515e45666ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220062
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-12-04 20:34:15 +00:00
Sam Rawlins 0b73860956 analysis_server: more strict-casts improvements
Mostly this CL involves adding types to parameters which were implicitly
dynamic, and casting a few JSON results. It should be a no-op,
behaviorally.

Bug: https://github.com/dart-lang/sdk/issues/41651
Change-Id: I230ae4f9eef3a6c9e4dbfe60b95907402aefda05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222027
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-12-04 01:38:59 +00:00
Paul Berry bce700e369 Migration: add tests for some implicit coercion corner cases
Bug: https://github.com/dart-lang/sdk/issues/47848
Change-Id: I5d04be8f379e35b70b86437940dd9b04c26e8174
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222028
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-12-03 20:11:48 +00:00
Chloe Stefantsova 312eb812c8 [parser][analyzer][cfe] Add parsing support for enhanced enums
Part of https://github.com/dart-lang/sdk/issues/47453.

Change-Id: I3a722cbcca6323b751eb3b2429bb9ffb642972b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217011
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2021-12-03 17:05:39 +00:00
Johnni Winther b878f6e275 [cfe] Replace use of IncrementalCompiler._userCode with local variables
This splits the usage of [_userCode] into `lastGoodKernelTarget` and
[currentKernelTarget], and renames the field to [_lastGoodKernelTarget].
This is done to make it clearer in what capacity the field is accessed.

Change-Id: Ie9344410ee62b649016a80e88bba731fa0a2344f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221942
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2021-12-03 10:45:18 +00:00
Konstantin Shcheglov 2dbb4d4536 Remove unused findChildElement()
Change-Id: Ie8a863c268cd3d2e606f0178b90bb4f358040cf0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221990
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-12-03 00:05:57 +00:00
Konstantin Shcheglov 387fc2e8db Use testPackageLibPath in analysis_server/ tests.
Change-Id: I0500183fe14288447735c85e6d8e070fc913e8a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221993
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-12-03 00:05:26 +00:00
Nicholas Shahan 73f4377011 [ddc] Fix named args in redirecting constructors
Change-Id: Iaed36c3cab43672338a5b1750aad25951428052c
Fixes: https://github.com/dart-lang/sdk/issues/47831
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221887
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-12-03 00:02:57 +00:00
Sam Rawlins 51508627c4 analyzer: Simplify FunctionTypeImpl.instantiate
The _transformOrShare function is only useful when elements might be
identical(), but copyWith always returns a new instance, so the 'share'
option is never the case.

Change-Id: I4fd573538a4447da70c051c5e9a4a6449d49f4c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221989
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-12-02 23:07:08 +00:00
Sam Rawlins 973f2b17e0 Remove some implicit casts in analysis_server
There are a lot of implicit casts, so this CL includes:
benchmark/, many in test/, and tool/.

Most changes are quite mechanical, using `Object?`.

I also changed some functions to use types other than `dynamic`.

Bug: https://github.com/dart-lang/sdk/issues/41651
Change-Id: Id77037aae71d41e2bdca52958fdc01c43d3d51a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221885
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-12-02 22:21:47 +00:00
Joshua Litt 001441ec42 [dart2js] Fix modular analysis test.
Change-Id: I066149a6ae052acf7ec2db90cdeec378f73dcfb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221142
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-12-02 22:13:47 +00:00
Nicholas Shahan ae7304fc1b [ddc] Fix missing super getter and setter helpers
Previously only a super helper would be created as needed when there was
a super getter or setter call a constructor. If both a get and set exist
only the first encountered would trigger a helper to be generated. The
second helper would be missing and the call to it would trigger an
exception.

Now the helpers are tracked with unique names to avoid collisions.

Fixes: https://github.com/dart-lang/sdk/issues/47698
Change-Id: I561adc0ce8f97e81a9e12d749d4d80e1f5e73f38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221743
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2021-12-02 22:12:57 +00:00
Konstantin Shcheglov 3e826ca64b Enable experiments for DAS tests, test rename and quick fixes for named arguments anywhere.
Change-Id: Ibc062c2a9e42e67673f9843bcae608befc8f93ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221986
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-02 21:49:47 +00:00
Konstantin Shcheglov bc8133c3fb Restore the most nested URI in BazelPackageUriResolver.
Change-Id: Ic5c50dd499d77149cecc19c932cfc8b60af7b3c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221984
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-02 21:02:47 +00:00
Konstantin Shcheglov 4ee00409f8 Pass FeatureSet for computeConstants().
Change-Id: I923212b56dc2c3386ff154e46855603c02bf5812
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221982
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-02 18:56:27 +00:00
Konstantin Shcheglov c41c6590cd Test index / search for named parameters anywhere.
Change-Id: I471191085a19a63f9def45062b173a473d50c29a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-02 18:31:57 +00:00
Konstantin Shcheglov 7f01b5fbc7 Feature constant_update_2018 is always enabled, remove checks in tests.
Change-Id: Ic66363fea7d4f550799bd2b509dd618c072196e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221981
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-02 18:31:47 +00:00
Brian Wilkerson 7cee0b97c5 Add support for a replacedBy change in data-driven fixes
The change is somewhat limited (for example, it doesn't allow the
replacement to be in a different library than the original), but I
believe that it's sufficient for the known use cases and can be extended
in future CLs.

Change-Id: Ic9b2ae42244134f63c36c88f3dc790e3655a7037
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221900
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-12-02 18:21:37 +00:00
Danny Tuppeny ebe06b7ccd [dds] Add support for additional VM args in DAP
Change-Id: Ib5c17e4f1881b3ca2c0fec72cc93178aaada3f60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221800
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-12-02 17:16:07 +00:00
Danny Tuppeny 167f83a46b [dds] Add support for passing environment variables to DAP launches
Change-Id: Ie8f9e00d14cb04719b39238a669d86e9540d8189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221941
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-12-02 17:14:07 +00:00
Konstantin Shcheglov 493afd5c92 Implement Search.declarations() using elements, switch workspace symbols to it.
So, stop using DeclarationsTracker for it.

Change-Id: Ia53c0729e71ddbc4c9bc19902b21b9d621b2235c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221864
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-02 16:44:28 +00:00
Johnni Winther 27068ba96b [cfe] Extract _ComponentProblems and InitializationStrategy from IncrementalCompiler
This CL extracts part of the IncrementalCompiler into subcomponents.
This is part of an effort to make the state and state changes of the
incremental compiler more explicit.

Change-Id: I59cbb30558082f4db392d925bb704d03c31ccb90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221940
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-12-02 15:58:47 +00:00
Johnni Winther 6b4b1a0fef [cfe] Reimplement topological sort
This replaces the previous implementation (and the topological sort of
classes, on which it was based) which was O(|vertices|*|edges|). The new
implementation is O(|vertices|+|edges|).

Change-Id: I4f5f1e63b4c7dd67d6f17c087724c20d4d33bf83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221820
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-12-02 15:31:37 +00:00
Daco Harkes c3b50826dd [analyzer/ffi] ABI-specific type support in analyzer
TEST=pkg/analyzer/test/src/diagnostics/abi_specific_integer_mapping_test.dart

Bug: https://github.com/dart-lang/sdk/issues/42816

Change-Id: I7ae6e05073e6f28a42b5f8f7d06c9b5b91c510a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221821
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-12-02 12:10:27 +00:00
Daco Harkes 734eb8e891 [cfe/ffi] Support missing Abis in NativeTypeCfe
When ABI-specific integers are introduced, their mappings can be
partial. We need to account for this in the transformation and the code
we generate.

In the transformation, all sizes and offsets become nullable.
In the generated code we add `null` constants and a call to check
whether the value is not-null at runtime.

Note that with only this CL we can not generate nulls yet, because all
size and offset mappings are still complete.

TEST=pkg/front_end/testcases/nnbd/ffi*
TEST=tests/ffi*

Bug: https://github.com/dart-lang/sdk/issues/42563

Change-Id: I80d45f3f52001670bc0679a033f7daa22198d55e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221631
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-12-02 12:10:27 +00:00
Daco Harkes eea0e48f6b [cfe/ffi] Move NativeTypeCfe to its own file
We're going to extend this logic in subsequent CLs, so lets give this
abstraction its own place to live.

TEST=just moving file contents

Change-Id: Ie6b267e77dd3a772bb3bbf0b79b33946ee767b0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221630
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-12-02 12:10:27 +00:00
Marc Plano-Lesay 9d68fe751d Fix a typo
Closes https://github.com/dart-lang/sdk/pull/47817
https://github.com/dart-lang/sdk/pull/47817

GitOrigin-RevId: a7bbf4d895136b4c304cc11dd2e83aa4f208be51
Change-Id: Ib60bfc53d77532ff782ba732a282f4c2a61d293a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221746
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2021-12-02 11:37:31 +00:00
Paul Berry e729bdab37 Migration: add support for implicit .call tearoffs.
Fixes #47733.

Bug: https://github.com/dart-lang/sdk/issues/47733
Change-Id: I8f972c01c315166c64f9fa0d5f9ec3d6e263c37f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221680
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-12-02 04:09:36 +00:00
Sam Rawlins ed086ad778 dart fix: report when --compare-to-golden has unchanged files
I was pretty confused about what was being compared until this change
was able to highlight that no edits were made.

Bug: https://github.com/dart-lang/sdk/issues/47678
Change-Id: I1d37070437658063d4b84f2fb5f4a33923bf5d92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-12-01 20:44:06 +00:00
Stephen Adams fd4fd54c9d [dart2js] Replace recursion with loop
This does not fix #42641, but removes a recursion that can make #42641
look different.

Change-Id: Id070cea0eb10501f1750b2719ed710a938170038
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221480
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-12-01 20:04:36 +00:00
Daco Harkes 663357209c [vm/ffi] Introduce Abi
This introduces the application binary interface (ABI) concept to
`dart:ffi` as a class with opaque instances.

We will use this for providing mappings for ABI-specific types.
Bug: https://github.com/dart-lang/sdk/issues/42563
Bug: https://github.com/dart-lang/sdk/issues/42816
Closes: https://github.com/dart-lang/sdk/issues/45254

Later, we might open up the contents of `Abi` if need be.

Some API design discussion notes:
https://github.com/dart-lang/sdk/issues/42563#issuecomment-981774001

TEST=tests/ffi/abi_test.dart

Change-Id: Iebf290fc12f37d6f4236432ddf27ab3e12bde06d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221627
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-12-01 19:19:37 +00:00
Danny Tuppeny 66d2bbab07 [dds] Add a "customTool" option to DAP to allow overriding the dart tool
Change-Id: I5842b85d34af288ad48f4c019bd3cd5cef498487
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221625
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-12-01 17:27:16 +00:00
Sam Rawlins 3f65029f09 Switch nnbd_migration package to use strict-casts
Note that changes to code are required because strict-casts also ensures
that Iterables are used in for-each loops.

Bug: https://github.com/dart-lang/sdk/issues/41651
Change-Id: I05a403d2ecb282fce44f8c8d24247182725c24c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221545
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2021-12-01 16:49:16 +00:00
Johnni Winther 28e8f04f8e [cfe] Export tear-off lowering predicates in api_prototype
Change-Id: Iba3d68af13f866500015bf755dfca27add8c59cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221628
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2021-12-01 14:21:38 +00:00
Johnni Winther 6e52e4817a [cfe] Store firstUri instead of first in SourceLoader
Change-Id: Ibd129897b16dffc39a5090c4d02f07e70ace7ced
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221623
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2021-12-01 13:49:06 +00:00
Joshua Litt bebc692e93 [dart2js] Add 'shipped' state to feature options.
Change-Id: I2be91636f0e32d00c9dbc92cf7b514454040754f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221020
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2021-11-30 18:03:39 +00:00
Danny Tuppeny 08db718290 [dds] Resolve dart: URIs to SDK file paths and back again in DAP
This fixes two issues:

1. When a user navigates into SDK sources using the analyzer (Go-to-Definition) and sets a breakpoint, we map it to a URI that the VM understands
2. When the VM breaks inside an SDK source, we map it back to a local file path (so that the user doesn't end up with two versions of the same file - one downloaded, and one the analyzer sent them to)

Change-Id: Ic1bdbed29196f98e612d81c383ad31ce241446b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221082
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-11-30 16:46:55 +00:00