Commit Graph

32947 Commits

Author SHA1 Message Date
Konstantin Shcheglov 088524efa6 Issue 43890. Implement applying resolution to IndexExpression.
Bug: https://github.com/dart-lang/sdk/issues/43890
Change-Id: I537d157ca9ff583b09e7c09ff580202b9dc4ced3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168778
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-22 19:27:10 +00:00
Jacob MacDonald 1a6539a0ee Dont add default enabled experiments to the map of parsed experiment flags,
this breaks the SDK build once NNBD is enabled by default, because it thinks
the experiment is explicitly enabled (effectively making 2.10 the release
version)

Bug: https://github.com/dart-lang/sdk/issues/43872
Change-Id: I65ac4e6499109b04c79dbd33145ede09b6b893c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168774
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-10-22 16:56:40 +00:00
Konstantin Shcheglov 934142766a Remove discarding libraries context on timeout.
Use `linkLibraries` before analysis (after save) instead.

Change-Id: I0b13888398b32cefb6815717c3b0f525492abac0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168767
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-10-22 16:43:00 +00:00
pq 23947aa37a bulk fix tests for excludes / ignores
Regression tests for: https://github.com/dart-lang/sdk/issues/43869

Change-Id: I7909c23b583af93cbabc4d291d31eba04dca104c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168765
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-10-22 15:14:50 +00:00
Paul Berry 7fde117f83 Sort declarations in migration_info.dart
Change-Id: I449c55bd570f60f4190be25a42e36d8c2b22a29e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168781
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-10-22 11:19:00 +00:00
Johnni Winther c8c87f40e5 [cfe] Update test
Unbreaks bots. The CQ missed the needed updates due to simultaneous commits.

Change-Id: I5d36806e5b30796211b4b1971c53bc81e45e3407
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168824
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-22 10:13:40 +00:00
Johnni Winther f371096b58 [cfe] Remove unneeded 2.10 annotation in CFE tests
The files are meant to be opted in and fixing the version 2.10 will
make them break when the current sdk version is changed.

Change-Id: I4124524f4c764bce4ef45e58ce15d806fb35db06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168820
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-22 08:07:49 +00:00
Johnni Winther 89249a1de2 [cfe] Add tests in which a mixin application declares a member
The added tests exhibit forwarding stubs injected into mixin
application classes. These are currently not handled fully or
consistently throughout the CFE and can lead to crashes and errors.

Change-Id: Ib6a14c6adc48daa35f4a3a8e5b705ec3cf7f606d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168652
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-22 08:07:19 +00:00
Johnni Winther ed3b948b88 [cfe] Use origin location for member signatures
This is relanding https://dart-review.googlesource.com/c/sdk/+/168203
after it was reverted due to a problem in
https://dart-review.googlesource.com/c/sdk/+/168200

Change-Id: Id70d3e960b1edf1c5cdf92518b8e476084b1bb49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168645
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-10-22 07:45:29 +00:00
Johnni Winther 1514336465 [cfe] Use CombinedMemberSignature for creating simple legacy member signatures
This is relanding https://dart-review.googlesource.com/c/sdk/+/168202 after
it was reverted due to a problem in
https://dart-review.googlesource.com/c/sdk/+/168200

Change-Id: If84af1edc73ded3aa372efa59355569f56601352
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168644
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-10-22 07:45:29 +00:00
Johnni Winther c41fabbb48 [cfe] Use CombinedMemberSignature to create noSuchMethod forwarders
This is relanding https://dart-review.googlesource.com/c/sdk/+/168201
after it was reverted due to a problem in
https://dart-review.googlesource.com/c/sdk/+/168200

Change-Id: I350ae8af38b48d909716289c99092be2a638f3fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168643
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-10-22 07:45:29 +00:00
Johnni Winther b42f954364 [cfe] Use experiment release version when non-nullable is enabled explicitly
Even when non-nullable is enabled by default, enabling the experiment
explicitly should result in the experiment release version (and not
the experiment enabled version) to be used for opting in.

For this change, the semantics of parseExperimentalFlags was change
to _not_ normalize the flags to a full mapping including default values.
For this reason all uses of such maps are renamed to
'explicitExperimentalFlags'.

Closes #43879

Change-Id: I0d0262e68ec1403549abcfd305ae3a4404fe93e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168654
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-22 06:17:39 +00:00
Brian Wilkerson fd44a07616 Fix handling of excludes from analysis options file in AnalysisContextCollection
Bug: https://github.com/dart-lang/sdk/issues/35519
Change-Id: I76856c0418336ab62ac153f03a6a017088a65847
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168762
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2020-10-21 21:17:04 +00:00
Jaime Wren 70a3627d57 Update dartdev smoke tests for Dart version 2.12
I also took the time to
- add the smoke tests to the dartdev test_all.dart file
- change the order of the asserts to fail fast and with better messages if there are failures


Bug: https://github.com/dart-lang/sdk/issues/43842
Change-Id: Ic35e52145bf3f9d6871dcec07395966a02ca3d11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168761
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-10-21 20:06:54 +00:00
Sam Rawlins 6103487f9e Remove unused imports with shared prefixes
Bug: https://github.com/dart-lang/sdk/issues/38784
Change-Id: I2c5477bbb36b17ad9ac4cf5e9584dd66f66afe1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-10-21 19:37:34 +00:00
Regis Crelier 0ace625d6d [VM/finalizer] Remove checks from finalizer now performed in CFE.
Also stop passing the class 'being parsed' to finalization methods.

Change-Id: I7c2256c2a8ace468021ba0ba5be10b6bfb839480
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168621
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-10-21 19:36:56 +00:00
Alexander Aprelev 4dd903d730 [frontend-server] Fix uri/path handling in frontend_server_test.
Use of path instead of uri breaks test on Windows.

Change-Id: Ie40d155def0ad17b0963c9af1dfa1f1c5e2a8c0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168744
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-10-21 19:19:19 +00:00
Sam Rawlins afcc072d83 Remove unused imports from analyzer_plugin
Bug: https://github.com/dart-lang/sdk/issues/38784
Change-Id: Ib92f3880224243b800689d48cb3c287656a48981
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-10-21 19:16:44 +00:00
Paul Berry 96d3efcf48 Exclude pkg/_fe_analyzer_shared/test/constants/data_2 from analysis.
This directory contains test data that isn't expected to analyze
cleanly.

Change-Id: I130db36badad76655546de7acf8f4382c54433e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168720
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-10-21 19:03:34 +00:00
Danny Tuppeny 96796b9751 [Analyzer] Add commit characters to LSP completion items
Change-Id: I71b1fa18a0fd9a4051359551803bff975381a835
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168653
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-10-21 18:34:33 +00:00
Jaime Wren 1a5e52b7ba Update dartdev to be ready for the NNBD SDK migration.
This change resolves http://dartbug.com/43842

'--enable-experiment' tests were removed as experiments tend to graduate out of the experiment phase.

Change-Id: If806848a24dca68f18868ee03ad98155aee156c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168403
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-10-21 18:26:14 +00:00
Stephen Adams ba6a17ab29 [dart2js] Make --benchmarking-x imply --csp
This is a temporary assignment of the meaning of `--benchmarking-x`.

Change-Id: I453aca3fa2782498664aad05f0d637af5e91bd34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168402
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-10-21 17:54:13 +00:00
Alexander Aprelev deba2f7e65 [frontend-server] Make frontend-server tests ready for flipping nnbd switch on.
Bug: https://github.com/dart-lang/sdk/issues/43844
Change-Id: I12cdf00b9c8517d1f10fbc6a59c6ad69e138953e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168624
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2020-10-21 14:46:23 +00:00
pq 1d7eb3f7d2 pluralize fix summary
Fixes: https://github.com/dart-lang/sdk/issues/43870

Change-Id: I871f556200323128b4c63368acf61ebec4e97696
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-10-21 14:44:13 +00:00
Jens Johansen 38b70871e4 [CFE] Don't allow generate-messages to write empty files
Previously, if editing messages.yaml and making a mistake one could
end up with empty "codes_generated.dart" and
"fasta_codes_cfe_generated.dart" meaning that nothing could compile
before doing a `git checkout <file>` on it.

Now instead generate-messages will just not do that.

Change-Id: I072d805772201af218609e7e45e5a6a2316de593
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168648
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-10-21 14:24:03 +00:00
Johnni Winther fa6399ff81 [cfe] Add messages in preparation for enabling non-nullable by default
The added messages handle the situation in which null safety is enabled
by default but is turned off either by language version or by explicitly
passing --enable-experiment=no-non-nullable

Change-Id: Iec43daf19a80f555e838635c83542fdb243b8ed4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168647
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-21 13:51:03 +00:00
Johnni Winther 5c51990a80 [cfe] Handle void as return context in sync function expressions
Closes #43174

Change-Id: I6b1cc04cbf2d65d9b877dfabf3e0f535f2491a94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168542
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-21 13:43:03 +00:00
Johnni Winther 81e345ca64 [cfe] Add test that exercises super member override checks for covariant parameters.
The code exercised by the test is located in ClassBuilder.handleSeenCovariant

Change-Id: I140e60fff01f60461ebaa6edfe193dbb7858c641
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168642
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-21 12:55:13 +00:00
Clement Skau 7f0bd5e811 [VM] Removes _Future's and _StreamImpl's _awaiter.
Changes debugger.cc to use the 'lazy async stack' mechanism for
unwinding async stacks, which means we no longer have to manually
keep track of the caller.

This also allows us to get rid of _asyncStarListenHelper.

Bug: https://github.com/dart-lang/sdk/issues/42457
Change-Id: I536e9da4af275998140ae5f05e3a43e07c77cfc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167561
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-10-21 12:38:23 +00:00
Jens Johansen 29fa4e8148 [CFE et al] Compile flutter platform as agnostic for test; set component mode more
Bug: dartbug.com/43844 dartbug.com/43807
Change-Id: Iba662f0955897244aaac86ceace73b213fa06319
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168482
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-10-21 10:04:41 +00:00
Johnni Winther 10c03da2c2 [cfe] Add regression test for issue 43864
Change-Id: Id0f6c18c5d47a1fbf234cc7c0a43abb6035a0c4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168540
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-10-21 07:58:32 +00:00
pq 0b14abc2a5 basic fix tests
Change-Id: I11e35c2585745ea60f19c27a9e9fa3ae757e99dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168660
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-10-21 04:49:32 +00:00
pq 382dbb6861 handle hashCode fields when creating ==
Fixes: https://github.com/dart-lang/sdk/issues/43867

Change-Id: I6ee0ee4feebce13e576a351bbe9578b705076422
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168582
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-10-20 22:38:01 +00:00
pq a880c3b180 provide context on producer exceptions
Change-Id: Iea3028af5de2bdd4712319ea2609d1b14888c1a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168584
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-10-20 22:34:21 +00:00
Nicholas Shahan f990e70930 [ddc] Opt code in nullable inference test
Avoids breaks that appear when enabling the `nnbd` experiment
by default as seen in:
https://dart-review.googlesource.com/c/sdk/+/166790

Change-Id: Idaf69b40c27336c8601cb143741f79604d2647e7
Fixes: https://github.com/dart-lang/sdk/issues/43843
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168583
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-10-20 21:38:51 +00:00
Liam Appelbe e2840ed07a [wasm] Basic WASI support.
Enabling WASI when building an instance sets up the default WASI
imports, and can optionally capture stdout/stderr. I'd like to set up
something similar for stdin, but Wasmer doesn't support that yet.

I also improved error handling in WasmRuntime by adding Wasmer's last
error to the thrown exceptions where appropriate.

Bug: https://github.com/dart-lang/sdk/issues/37882
Change-Id: I2d8546e878bcb43c7093490eac085aa62d318e96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167904
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-10-20 19:24:05 +00:00
Joshua Litt 043bebcd02 [dart2js] Fixes to dart2js unit tests to support nnbd by default.
Change-Id: I440dddd34a62bfe8c0f3fd563888acb680c2b031
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168141
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-10-20 18:40:44 +00:00
Paul Berry f1843b0abe Add special case migration logic for iterator methods.
This logic allows us to migrate code like this:

    int firstEven(Iterable<int> values)
        => values.firstWhere((i) => i.isEven, orElse: () => null);

Into:

    import 'package:collection/collection.dart' show IterableExtension;

    int? firstEven(Iterable<int> values)
        => values.firstWhereOrNull((i) => i.isEven);

Rather than the default behavior, which would migrate it to:

    int? firsteven(Iterable<int?> values)
        => values.firstWhere((i) => i!.isEven, orElse: () => null);

(The new migration is far superior because it doesn't require the
input iterable to accept null).

This functionality is disabled at the moment, because:
- The changes it makes don't show up properly in the web preview.
- The pubspec is not yet properly updated.

I will address these issues in follow-up CLs and then enable the
feature.

Change-Id: I96f3b12d682c586631920b38406bad6aa3f4789e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168500
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-10-20 17:45:04 +00:00
Paul Berry 265ecc7488 Make test tolerant of changes to mock sdk
Change-Id: I5c2e6c964b666157977c66d8ad8a19ea41b09e58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168520
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-10-20 17:45:04 +00:00
Paul Berry 5898fefb92 Add missing invocation to test_all.dart
Change-Id: Ibcbe7f50555a66360b563ae3915d2567567dd025
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168462
Reviewed-by: Janice Collins <jcollins@google.com>
2020-10-20 17:45:04 +00:00
Paul Berry 43166018a9 Nomenclature fix: migration diff output is not a summary.
The output the migration tool generates when the web preview is
disabled shows a complete diff of all changes the tool will make, so
it's really a misnomer to call it a "summary".

Change-Id: I8c7d9f9870bf8beffb62f1d10d36a65b66c32657
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168381
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-10-20 16:16:03 +00:00
Lasse Reichstein Holst Nielsen 48c73d82bf Clean up annotations and update @override documentation.
Fixes #43622

Bug: http://dartbug.com/43622
Change-Id: I4adea2995146ecd317d5c90a514cb564afa4f846
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165800
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-10-20 15:56:13 +00:00
Johnni Winther 137c7b6c84 [cfe] Explicitly run front_end unittest without non-nullable
This prepares front_end unittests for turning on non-nullable by default.

Change-Id: I9588a2d026ab9f5b1dcf08a140d25bd5dca3d5bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168346
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-20 13:13:33 +00:00
Lasse Reichstein Holst Nielsen 92e52a1874 Remove direct dependencies on package:charcode from SDK.
Change-Id: I9ef36e8a6890a70baac6c18f0be2252dcf5453df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163941
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-10-20 13:07:53 +00:00
Aske Simon Christensen 059b5cefbc [kernel] Fix some typos in Nullability comments
Change-Id: I9eb939210e34b771cb7dfa0b2c3f8fe367cf96ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168488
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-10-20 12:50:13 +00:00
Michal Terepeta 5f18d498a0 Revert "[cfe] Avoid transforming members in other classes to no-such-method forwarders"
This reverts commit 87d3e03bf8.

Reason for revert: Breaks internal builds (http://b/171258924)


Revert "[cfe] Use CombinedMemberSignature to create noSuchMethod forwarders"

This reverts commit 13b7a83d57.

Reason for revert: Depends on a commit that breaks internal builds
(http://b/171258924)


Revert "[cfe] Use CombinedMemberSignature for creating simple legacy member signatures"

This reverts commit 170f05f91b.

Reason for revert: Depends on a commit that breaks internal builds
(http://b/171258924)


Revert "[cfe] Use origin location for member signatures"

This reverts commit 354dcf4386.

Reason for revert: Depends on a commit that breaks internal builds
(http://b/171258924)

Change-Id: I51f524949f259351336a77f43847bf1d0d11f104
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168487
Reviewed-by: David Morgan <davidmorgan@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Michal Terepeta <michalt@google.com>
2020-10-20 12:23:53 +00:00
Jens Johansen a7137f4e59 [CFE] Fix weird artifacts when evaluating lists/sets/maps with unevaluated constants in them
Change-Id: Id391521d2e4549cbf2b8658c2d1b07ecf77f4ab3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167340
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-10-20 10:21:12 +00:00
Johnni Winther 1d96c40dc4 [cfe] Fix static extension field lookup
Lookup of the setter of an assignable static extension field loaded
from dill failed because the DillExtensionFieldBuilder didn't identify
itself as a field.

Change-Id: I379e0002ec8180b0ac1c5b1440bf9725a87e889e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168480
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-20 07:22:02 +00:00
Anna Gringauze f04bc85e4f Refined scope calculation in expression compiler
- make sure nested blocks scopes are visited
- make sure variable definitions do not leak beyond block scopes
- properly collect scopes for loops, if statements, constructors
- add calculation of fileEndOffsets for blocks
- save block file offsets to dill
  - update binary format version
  - change kernel readers and writers to read and write block offsets
  - change vm readers to read and block offsets for new version
- add missing fileOffsets and fileEndOffsets on functions for
  late fields
- add missing fileOffsets and fileEndOffsets on functions for
  extensions
- add errors on failures to find scope
- find libraries for private fields correctly
- add more expression compilation tests
- add test to verify fileOffsets and fileEndOffsets are set for
  SDK summary (will add full dill tests later)

Closes: https://github.com/dart-lang/sdk/issues/40278
Related: https://github.com/dart-lang/sdk/issues/34942

Change-Id: I5bc1bb645543045b689d8d61069ee77dc4ee9025
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167541
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-10-20 01:44:52 +00:00
Nicholas Shahan f3962367a5 [ddc] Add language version to test files
Avoids breaks that appear when enabling the `nnbd` experiment
by default as seen in:
https://dart-review.googlesource.com/c/sdk/+/166790

Some of these synthetic files are created as packages but the
expression compiler wasn't designed to handle that information.
In the future we should support language versioning better in the
expression compiler or setup similar tests for opted in code since
in reality the language versioning might be handled by the dev
build system.

Fixes: https://github.com/dart-lang/sdk/issues/43843

Change-Id: Icfac40d1c9b47e75fb92d7672700e066ac372267
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168441
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-10-20 00:48:08 +00:00