Commit graph

79886 commits

Author SHA1 Message Date
Parker Lougheed 666a72f7f2 Switch changelog entry for dart create lints package usage from the core to recommended set
The change was implemented in 2f85591b67

Change-Id: I60f93b307c81e65065e55193111253b6170d04c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201865
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-06-01 21:45:25 +00:00
pq f6f8bf98e0 linter 1.5.0
# 1.5.0

- (internal) migrated to `SecurityLintCode` instead of deprecated
  `SecurityLintCodeWithUniqueName`
- (internal) fixed `avoid_types_as_parameter_names` to skip field formal
  parameters
- fixed false positives in `prefer_interpolation_to_compose_strings` where
  the left operand is not a String
- fixed false positives in `only_throw_errors` for misidentified type
  variables
- new lint: `depend_on_referenced_packages`
- update `avoid_returning_null_for_future` to skip checks for null-safe
  libraries
- new lint: `use_test_throws_matchers`
- relax `sort_child_properties_last` to accept closures after child
- performance improvements for `prefer_contains` and `prefer_is_empty`
- new lint: `noop_primitive_operations`
- mark `avoid_web_libraries_in_flutter` as stable
- new lint: `prefer_final_parameters`
- update `prefer_initializing_formals` to allow assignments where identifier
  names don't match





Change-Id: I447a9e277a037da30e1c7b5c23d3bb5d1037f26c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201163
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-01 21:09:06 +00:00
Jason Simmons b67de429e0 Move the frontend server snapshot into the platform SDK
Change-Id: I15bfa8690fe792a4f0c4ac66a337fdc9c2647626
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201920
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2021-06-01 21:05:35 +00:00
Ben Konyi 4b96d7a09d [ VM / CLI ] Add support for --[no-]serve-devtools
Fixes https://github.com/dart-lang/sdk/issues/45867

TEST=pkg/dartdev/test/commands/run_test.dart

Change-Id: I3e575db8298d47b69eb9e120f9792ed60d25c7d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199960
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-06-01 20:33:15 +00:00
Regis Crelier 7014f03aad [VM/runtime] Fix type test: a closure is T, when T is instantiated to Object.
Fixes https://github.com/dart-lang/sdk/issues/46165

TEST=added regression test

Change-Id: I3016f60560b00f077d5ef55a0b23ccfb7dbf0836
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201863
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2021-06-01 20:25:55 +00:00
Joshua Litt 7af28d8274 [dart2js] Only emit holders into a part file if they are used.
Change-Id: Ie1eb4dcf71e30002e3030603f201e2b6a97d4182
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200483
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-01 19:59:14 +00:00
Jake Macdonald e2cd8be814 Revert "Move most of the code from u/b/kernel_worker.dart to p/frontend_server"
This reverts commit 659fdae898.

Reason for revert: Broke the HHH bots.

The fix according to zra@ should be:

"The new dependencies should be added as dependency overrides to flutter_frontend_server's pubspec.yaml: https://github.com/flutter/engine/blob/master/flutter_frontend_server/pubspec.yaml"

Original change's description:
> Move most of the code from u/b/kernel_worker.dart to p/frontend_server
>
> This should allow us to import the code in cases when we want to
> implement the Bazel worker loop ourselves. This opens some possibilities
> of extra optimizations for internal use cases.
>
> I'm leaving some of the code (e.g., `main`) in the old location, so that
> we do not break anything that depends on it.
>
> The only thing that I've done is to pass the input-digest map to
> `computeKernel` instead of using `Input` objects directly, this way
> we can avoid the dependency on `package:bazel_worker` from
> `frontend_server`. So now, if we're using the worker loop, the map will
> be computed by `kernel_worker.dart` (in non-worker mode, we rely on
> the default empty map).
>
> Bug: http://b/187910394
> Change-Id: I408407ebdebc17c7898552c053a8e1c269cf2df5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201187
> Commit-Queue: Michal Terepeta <michalt@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: http://b/187910394
Change-Id: Ieb44d61b668a7d4629a27eef5a6ef61d0db9deaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201880
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-06-01 19:29:54 +00:00
Keerti Parthasarathy 8580370162 Start of rename support for Cider
Change-Id: I50a47dafc9e41518a0d15f5c279a57db966afbb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201620
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-01 18:40:04 +00:00
Konstantin Shcheglov db42489977 Synthetic fields are not final.
They don't have the `final` modifier (or `const`).
They might be not writable because they don't have a setter.

Change-Id: I1d344e187bc63bac8167ff6cf708b1d2a8fb418a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201780
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-01 17:46:23 +00:00
Zach Anderson 8beec1d9cc Fix abstract unix socket test
There was a race between the subprocess listening on the socket and
the test trying to connect.

Also the Android bits of the test harness needed to be taught about
the abstract_socket_test program, similar to how process_test is
handled.

TEST=Fixes tests
Change-Id: I5e1c5d2e23e4bff2a01cd5c491a45e1c58d2578e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201861
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2021-06-01 17:30:54 +00:00
Ryan Macnak ab91ef643c [vm] Remove code dead since the type 'int' stopped supporting integers.
Change-Id: I72e1760a8172d8486b634abddbfc1ca8759a375c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197441
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-06-01 17:18:33 +00:00
Konstantin Shcheglov 5e995e5185 Skip not accessible constructors during mixin application inference.
Change-Id: I0c64528d96a184bbebfe9ea015a1b4603d77d537
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-01 16:17:23 +00:00
Konstantin Shcheglov 2f7fc0bd03 Use already built metadata as library metadata.
Change-Id: I3c01e2271aabbe5883f76a313fd2015c368b84d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-01 16:14:34 +00:00
Erik Ernst e4647026a1 Correct symbol_reserved_word_test.dart, splitting it into two tests.
Also add one new test symbol_arbitrary_string_test.dart.

Change-Id: I12b07218a098a37b83d99525d2be3ec356ef1fd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195503
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-06-01 15:55:03 +00:00
Simon Binder 8eba520115 [analyzer] Fix resolving target kinds
As the analyzer is shipped with the SDK, it may have to analyze sources
using a newer version of package:meta than the one it was compiled
with. If that new version adds a new TargetKind, attempting to resolve
that constant with `TargetKind.values[index]` may cause a range error.

Further, if a new TargetKind is not added at the end of that enum, the
analyzer will misinterpret the constant values.

This CL fixes both issues by comparing target kinds by their name.
Unknown target kinds from a newer meta version are ignored since the
analyzer would not be capable of analyzing them either way.

Bug: 46183
Change-Id: Ibbb7063ae9939e95f846076d7fe462e222a8a5bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-01 15:27:23 +00:00
Danny Tuppeny 10b83a4882 [analyzer] Tag constructor names as methods instead of classes in LSP semantic tokens
Fixes https://github.com/Dart-Code/Dart-Code/issues/3374.

Change-Id: Icb6e6b01e3abd77aa9da02ac9d9c9d62b77e2c21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201831
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-01 15:22:23 +00:00
Michael Thomsen af957d9578 Roll pub
Replaces previous attempt from https://dart-review.googlesource.com/c/sdk/+/201825

Change-Id: I2226d48b21f1bdd69fa5bb73af8816975409d475
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201826
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2021-06-01 14:08:53 +00:00
Martin Kustermann a44d1eefe6 [vm/compiler] Allow lazy deopts to continue in unoptimized code at beginning of IR instruction
If an IR instruction lazy-deopts it usually continues in unoptimized
code in the same IR instruction after-call.

Though in certain situations we want to continue before-call in
unoptimized code.

Two cases relevant in this CL:

  * An instruction gets LICMed: If it lazy-deopts it will continue
    at the Goto instruction outside the loop.

  * A recognized method which got it's InstanceCall replaced by several
    IR instructions. If any of them (except the last one) lazy-deopts
    it should re-try the call in unoptimized code (e.g. []=)

In order to faciliate this we add a bit to the [Environment] which
encodes whether the continuation point in unoptimized code is
before-call - if so, we issue corresponding metadata.

Issue https://github.com/dart-lang/sdk/issues/45213
Issue https://github.com/dart-lang/sdk/issues/46070

TEST=runtime/tests/vm/dart{,_2}/regress_46070_test.dart

Change-Id: Ib824081768a2fd6293751a8fe09753e0d8155c87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200644
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-06-01 12:59:23 +00:00
Michael Thomsen 7fb2e50d74 Revert "Roll pub"
This reverts commit 372f2d49e7.

Reason for revert: Contains unintended change to package_config.json

Original change's description:
> Roll pub
>
> Change-Id: Id197e006099ee4ee8ccb644a398b944f4500cce8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201824
> Reviewed-by: Jonas Jensen <jonasfj@google.com>
> Commit-Queue: Michael Thomsen <mit@google.com>

TBR=mit@google.com,jonasfj@google.com

Change-Id: Ibbae0f5f5b0cf0e7396988790933bd1bcb5fd3f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201825
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2021-05-31 14:36:24 +00:00
Michael Thomsen 372f2d49e7 Roll pub
Change-Id: Id197e006099ee4ee8ccb644a398b944f4500cce8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201824
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2021-05-31 14:17:32 +00:00
Michal Terepeta 659fdae898 Move most of the code from u/b/kernel_worker.dart to p/frontend_server
This should allow us to import the code in cases when we want to
implement the Bazel worker loop ourselves. This opens some possibilities
of extra optimizations for internal use cases.

I'm leaving some of the code (e.g., `main`) in the old location, so that
we do not break anything that depends on it.

The only thing that I've done is to pass the input-digest map to
`computeKernel` instead of using `Input` objects directly, this way
we can avoid the dependency on `package:bazel_worker` from
`frontend_server`. So now, if we're using the worker loop, the map will
be computed by `kernel_worker.dart` (in non-worker mode, we rely on
the default empty map).

Bug: http://b/187910394
Change-Id: I408407ebdebc17c7898552c053a8e1c269cf2df5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201187
Commit-Queue: Michal Terepeta <michalt@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-05-31 13:47:14 +00:00
Jens Johansen b3de23ef14 [flutter-frontend] Fix potential flutter-frontend bot failures caused by mismatch in NnbdMode
Previously there *could be* lots of failures caused by the compiler
auto-detecting nnbdmode (and as a consequence setting a specific nnbd
mode based on the first file compiled).

That means that the ordering of the files - which seems to be different
on the bot and on my local machine for instance - decides the nnbd mode
and as a consequence if there are errors because of it.

This CL splits compiles up into weak and strong and compiles those in
chunks, thus avoiding the errors.

Change-Id: If796458782fdbf4f7da4ebc98f6110f0279a12cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201565
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-05-31 12:27:22 +00:00
Daco Harkes 2a130ff363 [vm] Remove dead code LinkedHashMap RTEs
These natives are implemented in kernel_to_il.cc. Now that the bytecode
interpreter has been removed, the RTEs are dead code.

TEST=test/language includes many tests with Map.

Change-Id: I42bb49434f4be0b0a881353f2f24816bfda7a3ed
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-simarm64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201820
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-05-31 10:25:22 +00:00
asiva 0742ed66a7 [VM/Tests] - Fix new abstract_socket_test.
- Skip in configurations that do not build the abstract_socket_test
executable
- Fix MemorySanitizer: use-of-uninitialized-value error

TEST=existing test - unix-socket-test

Change-Id: Ie9bf6dc1cd6bea98cd7859584473154f6ac49eee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201722
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2021-05-29 00:16:34 +00:00
Konstantin Shcheglov d05093e5f9 Deprecate ImportElement.prefixOffset
Change-Id: I74441b4c060c326b68c446b2483d6509dd2b2970
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201663
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-28 23:08:34 +00:00
Konstantin Shcheglov 2242843b97 Convert FunctionTypeBuilder type into synthetic.
We don't want types to track from where there were created.
This becomes an issue when we keep linking elements.
We already make synthetic FunctionType(s) during writing into bytes.
(and maybe we would don't need now, need to check)

This is a preparation for:
https://dart-review.googlesource.com/c/sdk/+/201661

Change-Id: I96e7d032409c47862fe6cb0344d7009f3afb28f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-28 16:11:08 +00:00
Alexander Aprelev ed82bb6f4c [io/file_watcher] Ensure start/stop file watching requests are run on dart thread.
At present start/stop requests are scheduled on RunLoop thread.
This results in deadlocks since same RunLoop thread might be busy
with blocking writes of file watching events, not giving a chance
for Dart to read previously-written events. Reading would unblock
writer.
So this CL moves start/stop requests to run on Dart thread instead.

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

TEST=run analysis_server against flutter_gallery github-backed folder, switch between branches and ensure analyze_server remains responsive

Change-Id: I0464eeecf8e46ba3027fa0ed21cc323495d965c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201442
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-05-28 03:39:18 +00:00
Stephen Adams bac8e8b0c0 [language] Add test for super-tearoff default arguments
Change-Id: Iec5d525b1f7f60f3245b6dca65eda90279b5eead
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201540
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-05-28 02:48:08 +00:00
Robert Nystrom 0e5417a48f Rename mis-named NNBD language tests.
Without "_test" in the name, the test runner ignores them.

Change-Id: I7dc2da51b980b1b5512fc2c2087238129bf1bd78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200930
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2021-05-28 01:12:07 +00:00
Konstantin Shcheglov 4be3201936 Infer the base constructor before inferring a mixin application constructor.
Change-Id: I79bdbb5dce8bd7dc7a5f705bce706b98be706c72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201640
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-05-27 23:56:15 +00:00
Ryan Macnak ab00dcff12 [vm, compiler] Once an UnboxIntegerInstr is discovered to not deopt, remember this by switching to kNotSpeculative.
An UnboxIntegerInstr may have a Redefinition as its input when environments are removed from instructions that !ComputeCanDeoptimize, but the Redefintions may be removed during graph finalization, changing the type attached to the unbox's input from Int to non-Int, and so changing ComputeCanDeoptimize back to true.

TEST=vm/cc/IL_UnboxIntegerCanonicalization
Bug: https://github.com/dart-lang/sdk/issues/46018
Change-Id: I9e89055f07d0f40a374b1e8fd81122763a7a6bd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200906
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-05-27 23:49:34 +00:00
Zach Anderson 5dc1f8db8c Trim abstract unix socket path length
Fixes https://github.com/dart-lang/sdk/issues/46149

TEST=unix_socket_test
Change-Id: Icc5273941f880f581cc2621431b5cecb7782c71e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201441
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-05-27 21:50:24 +00:00
Alexander Aprelev f827c53315 [vm/transferable] Adjust the test so it throws OOM on bionic.
Bug: https://github.com/dart-lang/sdk/issues/46167
Change-Id: I99d4d4584605414ef1438a5b2cd1d9666b654a8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201641
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-05-27 21:35:24 +00:00
Joshua Litt 6a4bd42396 [dart2js] Create set of uppercase reserved symbols.
Change-Id: I07958be1832041a80db9c9dc6281270460d530a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201360
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-05-27 19:29:14 +00:00
Sam Rawlins 9f85dc07a7 Improve quality of @protected doc comment
Fixes https://github.com/dart-lang/sdk/issues/29804

Start doc comment with a single-sentence summary.
https://dart.dev/guides/language/effective-dart/documentation#do-start-doc-comments-with-a-single-sentence-summary

Separate the first sentence of a doc comment into its own paragraph.
https://dart.dev/guides/language/effective-dart/documentation#do-separate-the-first-sentence-of-a-doc-comment-into-its-own-paragraph

Replace text which refers to "using" an "invocation" of a member with text which refers to "referencing" a member.

Explicitly call out mixins and superclass constraints.

Improve language around using "this" as a receiver.

Attempt to use more straightfoward sentences.

Change-Id: Ib465b640c217d3759455611116aef0545b5665fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201445
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-05-27 18:41:24 +00:00
Ben Konyi 71238faee8 [ benchmark ] Use '.' instead of '_' to represent sub-benchmarks in SDKArtifactSizes
Change-Id: Ia47f9565025b79440aa179a215db2d7a95b744e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201582
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-05-27 18:14:14 +00:00
Brian Wilkerson f09b484cca Fix a couple of bugs in DocumentationCache
Change-Id: I66a890a1aebc39d9cf11acd82d285b2328574102
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-27 17:55:54 +00:00
Alexander Aprelev 39dead4394 [io] Ensure bcrypt.lib is declared as a lib dependency for downnstream users.
Follow-up to 1731050b29

TEST=ci

Change-Id: Ic9119069bc58af71787e225b0efbc1d79155f0c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201580
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-05-27 17:26:54 +00:00
Konstantin Shcheglov e021d0c171 Prepare for keeping elements created during linking.
Mostly set informative data that was previously omited because we
were setting it during loading from bytes.

Change-Id: I68a527a21628ee57ad0e574b34b7415d866159a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201500
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-05-27 17:12:54 +00:00
Ryan Macnak 266ad2a568 [vm, service] Include mapped files in GetProcessMemoryUsage.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/46166
Change-Id: I66322c70e066bb89c1d568848e17f2ec4f8552d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201444
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-05-27 17:10:05 +00:00
Jens Johansen 33aac34b02 [CFE] Reproduce crash Class.superclassConstraints RangeError
```
Crash when compiling null,
at character offset null:
RangeError (index): Invalid value: Valid value range is empty: 1
#0      List.[] (dart:core-patch/growable_array.dart:254:60)
#1      Class.superclassConstraints (package:kernel/ast.dart:1090:73)
#2      ClassBuilderImpl.checkMixinApplication (package:front_end/src/fasta/builder/class_builder.dart:801:51)
#3      SourceLoader.checkMixins (package:front_end/src/fasta/source/source_loader.dart:1165:19)
#4      KernelTarget.buildOutlines.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:339:14)
<asynchronous suspension>
#5      withCrashReporting (package:front_end/src/fasta/crash.dart:121:12)
<asynchronous suspension>
#6      Outline.run.<anonymous closure> (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1850:21)
<asynchronous suspension>
#7      Outline.run (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1837:12)
<asynchronous suspension>
#8      ChainContext.run.doStep.<anonymous closure> (package:testing/src/chain.dart:188:22)
<asynchronous suspension>
```

or with assertions enabled:

```
'package:kernel/ast.dart': Failed assertion: line 1087 pos 14: 'currentClass.implementedTypes.length == 2': is not true.
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
#2      Class.superclassConstraints (package:kernel/ast.dart:1087:14)
#3      ClassBuilderImpl.checkMixinApplication (package:front_end/src/fasta/builder/class_builder.dart:801:51)
#4      SourceLoader.checkMixins (package:front_end/src/fasta/source/source_loader.dart:1165:19)
#5      KernelTarget.buildOutlines.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:339:14)
<asynchronous suspension>
#6      withCrashReporting (package:front_end/src/fasta/crash.dart:121:12)
<asynchronous suspension>
#7      Outline.run.<anonymous closure> (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1850:21)
<asynchronous suspension>
#8      Outline.run (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1837:12)
<asynchronous suspension>
#9      ChainContext.run.doStep.<anonymous closure> (package:testing/src/chain.dart:188:22)
<asynchronous suspension>
```

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

Change-Id: I452729ae4b3d0a14528ea2dda51de14185bb965b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201562
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-05-27 13:23:24 +00:00
Jens Johansen db6f72212b [CFE] Crash on recompile: TypeBuilderComputer.visitInvalidType 'Not implemented'
```
Crash when compiling null,
at character offset null:
Not implemented
#0      TypeBuilderComputer.visitInvalidType (package:front_end/src/fasta/kernel/type_builder_computer.dart:42:5)
#1      InvalidType.accept (package:kernel/ast.dart:10619:42)
#2      TypeBuilderComputer.visitInterfaceType (package:front_end/src/fasta/kernel/type_builder_computer.dart:102:43)
#3      InterfaceType.accept (package:kernel/ast.dart:10896:42)
#4      DillLoader.computeTypeBuilder (package:front_end/src/fasta/dill/dill_loader.dart:117:17)
#5      computeTypeBuilder (package:front_end/src/fasta/dill/dill_class_builder.dart:188:24)
#6      DillClassBuilder.interfaceBuilders (package:front_end/src/fasta/dill/dill_class_builder.dart:156:21)
#7      ClassHierarchyNodeBuilder.build (package:front_end/src/fasta/kernel/class_hierarchy_builder.dart:1490:39)
#8      ClassHierarchyBuilder.getNodeFromClassBuilder (package:front_end/src/fasta/kernel/class_hierarchy_builder.dart:603:10)
#9      ClassHierarchyBuilder.getNodeFromTypeBuilder (package:front_end/src/fasta/kernel/class_hierarchy_builder.dart:608:33)
#10     ClassHierarchyNodeBuilder.build (package:front_end/src/fasta/kernel/class_hierarchy_builder.dart:1524:25)
#11     ClassHierarchyBuilder.build (package:front_end/src/fasta/kernel/class_hierarchy_builder.dart:742:14)
#12     SourceLoader.buildClassHierarchy (package:front_end/src/fasta/source/source_loader.dart:1213:46)
#13     KernelTarget.buildOutlines.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:332:14)
```

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

Change-Id: Ic9198da47dde1a9c1653bcfa98c55e738ca93e64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201561
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-05-27 08:39:34 +00:00
Jens Johansen 4f26789bf2 [CFE] Reproduction of type change on recompile
Bug: https://github.com/dart-lang/sdk/issues/46159

Change-Id: I2d628eb803e6b29c40ddb666e496f8fc98727960
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201560
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-05-27 08:16:24 +00:00
Sergey G. Grekhov a7273673a4 [co19] co19_2 status file cleanup
Change-Id: I69c7d0daf01dca4b84dfc84286d1bb2fa067a4a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201480
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-05-27 08:15:04 +00:00
Johnni Winther 8453731dfd [cfe] Migrate wave 8+9
Change-Id: I6d95247fa088dba2f887e799c1cac6acd8456402
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201403
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-05-27 07:59:54 +00:00
Daco Harkes b0bfee6627 [benchmarks/vm] Add benchmarks for #45908
The implementation of const map literals is based on linear lookups in
an array containing key/value pairs instead of a hash table.

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

Golem CL:
https://chrome-internal-review.googlesource.com/c/golem/+/3852562

Change-Id: If0a980339ee1342c41f9388e0bd7b3615a4ef4e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200188
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-05-27 07:54:14 +00:00
pq f00dc3d056 @useResult verification
See: https://github.com/dart-lang/linter/issues/1888

Change-Id: I3d5ed31f3a1dd0d69da5f47ae38496a4fe6051c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-05-27 00:26:54 +00:00
Sam Rawlins fd8607c8f4 Implement inference_failure_on_function_invocation checks
The "inference failure" checks implemented here are long overdue. They
are part of the strict-inference spec [1]. I think I caught most function
invocation cases. All of the work done to determine which error to report
and whether @optionalTypeArgs is annotated is done _after_ the check
for whether strict-inference is enabled, so this should have no effect
on code which does not opt in to that mode.

[1] https://github.com/dart-lang/language/blob/master/resources/type-system/strict-inference.md#function-call

Bug: https://github.com/dart-lang/sdk/issues/33749 and
Change-Id: Ic1d4321fb289acb118e0dbddd48ff917ad39d69a
https://github.com/dart-lang/sdk/issues/45371
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201321
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-05-26 21:02:42 +00:00
Brian Wilkerson 6de639b71f Move TargetKind.displayString from analyzer to meta
Change-Id: Ifa24fb96c97c6b7a2f27794e671672796c56331e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-26 19:37:40 +00:00
Dmitry Stefantsov f81de15da7 [cfe] Add first portion of tests for constructor tearoffs feature
Change-Id: I868849ce96d2bfcbc05e7afc131a9fe43a83949c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201261
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-05-26 18:12:00 +00:00