Commit graph

76618 commits

Author SHA1 Message Date
Aske Simon Christensen b11d057572 [vm] Look for the recognized pragma in the unboxer and signature shaker.
This removes the conservative exclusion of everything below num in the
unboxer, and it allows some methods marked as entry points to not be
entry points, as they are not actually referred explicitly in VM code.

TEST=Existing test suite.
Change-Id: If465b9081ac278a105ba99c23a49f5516b7bfbc0
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169401
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-11-16 13:49:50 +00:00
Aske Simon Christensen 1ab705f60c [vm] Require all recognized methods to be marked with pragma.
Adds a @pragma("vm:recognized", <kind>) to all recognized methods, where
<kind> is one of "intrinsic", "graph" or "other", corresponding to the
kind of recognized method.

When running in debug mode, it is checked that all recognized methods
are marked with the correct kind of pragma, and that all methods marked
with the pragma are in fact recognized.

This enables kernel-level analyses and optimizations to query whether
a method is recognized by the VM.

TEST=Asserts that check the correspondence both ways, covered by test
suite, in particular the various CompileAll tests that compile all code.
Change-Id: I12f3305c72a93ecb1aefae2d66e3d9a7dae23b44
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168951
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-16 13:49:50 +00:00
Tess Strickland 844a5176ff [vm] Fix ArgumentsDescriptor uses in DoArgumentTypesMatch.
Use of PositionalCount() and PositionAt() as indices in the arguments
array must account for the type arguments if present. Otherwise, we'll
either skip checking the last positional argument (in the former case)
or check against the wrong arguments (in the latter case).

In nosuchmethod_forwarding_arguments_test.dart, add cases that check for
the above mistakes.

In require_named_args_strong_test.dart, use the more specific
throwsTypeError or throwsNoSuchMethod checks instead of the generic
throwsError to ensure the correct error is thrown.

TEST=Changed tests to add extra cases for failures that can happen.

Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try
Change-Id: If5e6c310d36d244bb0650ded54e32e583732584e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171947
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2020-11-16 11:53:39 +00:00
Daco Harkes 2f27573c41 [vm/ffi] Refactor Native* Zone usage
This CL refactors all dart::Zone usage in Native* classes in
vm/compiler/ffi to be explicit, so that they are never looked up from
Thread::Current().

Also, this CL changes the ToCString printing to take a Zone as argument,
and uses the ZoneTextBuffer.

Finally, it clears up imports.

TEST=Covered by existing tests in `tests/ffi` and `tests/ffi_2`.

Change-Id: I8655cfc98a3fcc783e6ea8fc954ca50070fa2b53
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-win-release-ia32-try,vm-kernel-win-debug-ia32-try,vm-kernel-linux-debug-ia32-try,vm-kernel-mac-debug-x64-try,vm-kernel-precomp-android-release-arm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171724
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-16 11:04:00 +00:00
Martin Kustermann 1ca55a1fba [vm/concurrency] Call _startIsolate (which has entrypoint annotation) instead of _delayEntrypointInvocation (which does not)
The former calls the latter with the same arguments, so we could call
the latter directly, though we prefer to use `_startIsolate()` as the
entrypoint.

This fixes test failures in obfuscated mode, where the runtime cannot
find the `_delayEntrypointInvocation` function.

TEST=Fixes -n dartkp-obfuscate-linux-release-x64 ffi_2/dylib_isolates_test

Change-Id: I062fc16658f90750439f304849daa3911d3a1b89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171946
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-11-16 09:49:49 +00:00
Martin Kustermann 89c213ca1f [vm/concurrency] Re-enable test dart/isolates/dart_api_create_lightweight_isolate_test
The test should be skipped on android as well as windows.

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

TEST=Status file update.

Change-Id: I9c3cb07f4b494a8a57b4496623aec57f1d4910ae
Fixed: 24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171944
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-11-16 09:29:29 +00:00
Jens Johansen 4a9a0fa949 [kernel] Test for reading all platforms
This test would have cought the need for
https://dart-review.googlesource.com/c/sdk/+/171727
sooner (or, rather it wouldn't have been needed at all because we would
have found out before landing the original :)).

Change-Id: If9e3216b1b8733d0463006fb253e1dbb484291eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171883
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-11-16 08:36:21 +00:00
Johnni Winther c4622003a2 [kernel] Remove dynamic access from text_serializer
Change-Id: Ic1012992472f8798c384af8795db8b1f42f8ccb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171945
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-16 08:16:39 +00:00
Devon Carew f5e26456bf Remove the --completion-model flag from the analysis server.
Change-Id: I6bedbb0b5c4b8bedba18d2e3b788db0a9686f6df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172026
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-16 03:31:18 +00:00
Brian Wilkerson 9f6ea5b6f6 Remove an unused import
Change-Id: Ib5c9997a309353baa2b11c8e36c4b1bfafd59c98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172025
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-15 17:57:47 +00:00
Martin Kustermann d9561e5a1d [vm/concurrency] Move Isolate.spawn()-related logic out of runtime/vm/ into runtime/lib
The Isolate.spawn() is part of our dart:isolate library implementation,
it should therefore preferrably live under runtime/lib folder.

This CL does that as well as removing some special message handling
logic by using the new `Dart_RunLoopAsync()` C API, which results in
net removal of code.

As a nice side-effect it also makes isolate spawning slightly faster due
to avoiding extra safepoint/vm<->native transitions.

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

TEST=Changes existing implementation, have existing test coverage for it.

Change-Id: I00607a1436946552bbe12e8e23062e8f743d4f11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171731
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-11-15 13:31:47 +00:00
Johnni Winther a39ea25627 [cfe] Add test for dynamic access in CFE/kernel code
Change-Id: I9cd5aec2bd9b455a099503ca3c55f61659145869
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171726
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-11-15 12:04:47 +00:00
Brian Wilkerson c3f96e863f Remove uses of useNewRelevance and clean up associated code
Change-Id: I04dd3b33d229348042609c5a656d1ad68a95913d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172120
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-15 00:18:07 +00:00
Martin Kustermann 22f1b7b88e [gardening] Add two more needed resources for standalone/io/test_extension_fail_test.dart
Also fix another test that was missing // OtherResources= annotations

When reproducing the failures, one has to remember to `rm -rf out/Release/generated_*`

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

Change-Id: If838a5fcdf56bcb094ba2ca211163c3b5007a3c3
Fixed: 24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171943
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2020-11-14 10:30:27 +00:00
Devon Carew 94fa3c89c7 [analysis_server] remove the analysis server's --use-new-relevance flag
Change-Id: Ia7a182e11fbe62ba2814e56c59804b14b70f88cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172083
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-11-14 03:00:16 +00:00
Anna Gringauze 9c54996510 Fix issues in expression evaluation in google3
- Define private symbols load without reloading the module
  and knowing module format
- Remove libraryName->moduleName map from ExpressionCompiler's
  compileExpressionToJs API as a result of above
- Make ddc tolerate null locations on kernel loaded from dill
  during assert insertions for nullability
- Disable asserts in expression compilation worker
  due to ddc reading source for assert statement compilation
- Remove unused test configuration for expression compiler worker
- Add and update expression compiler tests

Part of: https://github.com/dart-lang/webdev/issues/1174

Change-Id: Idf8f508308915a5487fa0e9810b5674140393fed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170028
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-11-14 01:34:16 +00:00
Sam Rawlins 6f77ac032b Remove use of deprecated package_config libraries.
Fixes https://github.com/dart-lang/sdk/issues/44116

Change-Id: I6d429fd31955aecefda01dab55dace922e4e46af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171880
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-14 01:11:16 +00:00
Konstantin Shcheglov d1cc9b6f27 Prepare to publish analyzer 0.41.0 and _fe_analyzer_shared 13.0.0.
Change-Id: I26118cd7bac02e649e64df7cd0b93c2203e2f954
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-11-14 00:26:54 +00:00
Devon Carew 5a649b22e9 [analysis_server] re-order the server's command line flags
Change-Id: I9a8295f302683c77cdbecd587ae9c546111838a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-11-14 00:25:34 +00:00
Sam Rawlins 8b587b2bd6 Analyzer: prepare summary/ tests will null checks and late hints
Change-Id: Iaed59b5283a4b74a77429aef6381f364981161ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171963
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-11-13 23:57:14 +00:00
Ryan Macnak b9c86f07dc [vm] Produce clearer error messages for malloc/realloc failures.
TEST=bots
Bug: https://github.com/dart-lang/sdk/issues/43642
Change-Id: I7bc2b3b5231413967f9b1f608c957326ff6c6aaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171680
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-13 22:10:54 +00:00
Daco Harkes 00fe513296 [vm] Globals cleanup TARGET_ARCH_IS_*
There were two sets of defines of `TARGET_ARCH_IS_*` in `globals.h`.

`IS_SIMARM_X64` implies `TARGET_ARCH_ARM` implies
`TARGET_ARCH_IS_32_BIT`, so the second set of defines can be removed.

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

TEST=The build on all configurations.

Change-Id: I9f8d5ce9ebc7186c4fb36a7d8acbc6c0165c80d1
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-linux-debug-ia32-try,vm-ffi-android-debug-arm64-try,vm-ffi-android-debug-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171884
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-11-13 21:59:24 +00:00
Brian Wilkerson 9c334a8f3c Support conditional change lists for data-driven fixes
Change-Id: I2e2c383fc2e8c1b101dec90f81486c4e63038911
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172061
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-13 21:50:05 +00:00
Konstantin Shcheglov 861879fad4 Issue 44196. Change ExtensionElement.displayString to the empty string for unnamed extensions.
Bug: https://github.com/dart-lang/sdk/issues/44196
Change-Id: Idcd6b2caa6efa37350a518d229768e9ab3e24599
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-11-13 21:44:24 +00:00
Stephen Adams 887b094bb5 [js_runtime] typed array constructors don't have effects
Change-Id: I31238331cd878b953c623de077b05d47b2d1be5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171809
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-11-13 21:40:04 +00:00
Janice Collins 4bf621d512 Add triage instructions to the root of pkg/analyzer.
This synthesizes our triage discussion and the priorities I wrote in
a separate document into a markdown file in pkg/analyzer, as discussed.

Change-Id: I11d17d8b6a7b1cb281ce4649673039869ae8fb9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172062
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2020-11-13 21:16:04 +00:00
Liam Appelbe 504e9a32f9 Reland "[wasm] Remove dart:wasm"
This is a reland of ade333dd54

Original change's description:
> [wasm] Remove dart:wasm
>
> I'm not entirely sure why I had to modify a random set of fingerprints
> in runtime/vm/compiler/recognized_methods_list.h, but when I did a debug
> build it had some fingerprint errors.
>
> Change-Id: Ib0a0cccb37f2efba509e2b37b6eabe790fa933c4
> TEST= Deleting stuff, so not really necessary
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170620
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Liam Appelbe <liama@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

Change-Id: I0d1388f6312358cc62bb32f5ac7b88a3187223c9
TEST= Deleting stuff, so not really necessary
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171940
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2020-11-13 20:40:24 +00:00
Ryan Macnak 9814efb19c [standalone] Update tcmalloc to 2.8.
Change-Id: I3563de74fe908ea0165a830a38d34818ecb4f9f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171803
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-11-13 19:17:40 +00:00
Ryan Macnak 1d05591fbb [vm] Produce clearer error messages when operator new fails.
TEST=bots
Bug: https://github.com/dart-lang/sdk/issues/43642
Bug: https://github.com/dart-lang/sdk/issues/43862
Change-Id: I598a26a56762c141a1aef972f7d32f2c9594b244
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171802
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-13 19:07:20 +00:00
Stephen Adams 82637793bf [dart2js] List.generate tweaks
- Use 'isBoundsSafe' property of `[]=` to avoid a bounds check.
- Accept closures with a block containing a single return statement.

Change-Id: I97db02dae14d926345487e863fdb4a1513ab773b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171804
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-11-13 19:04:00 +00:00
Paul Berry 3103e1e0f6 Migration: don't overcount "whereOrNull" fixes.
Fixes #44174.

Bug: https://github.com/dart-lang/sdk/issues/44174
Change-Id: Ida53a11afc2e265cd510b0ac63c50f6b5ac93fdd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171962
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-11-13 18:51:30 +00:00
Paul Berry 8abc99d07a Migration: encourage user to include SDK version when filing bugs
Change-Id: Ib8056827595470d8c3c8b2cb8371ab08dcc3e651
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172040
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2020-11-13 18:18:10 +00:00
Regis Crelier b92f6a6622 [VM/runtime] Fix generic signature instantiation and type parameter canonicalization check.
This fixes 2 issues:
1) The index of type parameters in an instantiated generic signature may require to be adjusted according to the number of parent type parameters.
2) The heap may contain canonical type parameters that are still unfinalized.

Closes https://github.com/dart-lang/sdk/issues/43537
Partially fixes https://github.com/dart-lang/sdk/issues/44141 (language and language_2 tests, but not vm/cc tests)

TEST=see above.

Change-Id: I17a87d0ffd4be302f25e3b269b94286a5b817400
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171807
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-11-13 17:57:50 +00:00
Paul Berry 7d3bc4862d Rename pkg/analysis_tool to pkg/analyzer_utilities.
It's no longer just for the tools in the `tool` directory; it also
contains test utilities for use by the analyzer and related packages.

Change-Id: I0f8cf57f24ea7aad8e2177e43ee2bcb2ab3030da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171704
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-11-13 17:46:30 +00:00
Paul Berry b3120a6170 Sort declarations in messages.dart.
Change-Id: I07840b0818f36d6db9e099c69e02083ed3a8845d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171980
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-11-13 17:38:10 +00:00
Paul Berry cf4d300c0b Migration: handle "already migrated" case more gracefully.
If all the user's code has already been migrated and there are no
errors, instead of crashing, produce a friendly message indicating
that there's nothing to do, and exit cleanly.

Fixes #44193.

Bug: https://github.com/dart-lang/sdk/issues/44193
Change-Id: I9da9ab0221d4e13a61985eaa3fec0e74b86e9072
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171960
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-13 17:38:10 +00:00
Paul Berry 0258778e3b Migration: explain that user may make edits in their IDE
Change-Id: I8289aa274a7882a41a5411739999f1db77fc196f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172000
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2020-11-13 15:44:10 +00:00
Martin Kustermann 35d98d5395 [vm] Fix a number of vm/cc tests that started crashing after a previous CL
This CL makes the following tests pass in debug mode:

  - vm/cc/CleanupBequestNeverReceived
  - vm/cc/CustomIsolates
  - vm/cc/ManySimpleTasksWithZones
  - vm/cc/ReceivesSendAndExitMessage

TEST=CL only modifies (and fixes) vm/cc tests

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

Change-Id: Ie09f93e35a0a4001f8a0364fbeddd5b5446445da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171886
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-11-13 15:27:20 +00:00
Alexander Thomas b1b5f82c52 [infra] Use buildbucket.v2 API in find_base_commit
* Migrate find_base_commit to null-safety.
* Replace incorrect use of the term "bot" with "builder".

See also https://crbug.com/1112975.

Change-Id: Iee07e46a19a6304184e66f36560fba88d9b18971
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171730
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-11-13 14:52:24 +00:00
Sigurd Meldgaard 5cbb25f753 Revert "Improve handling of disable-dartdev-analytics"
This reverts commit cda994ffc8.

Reason for revert: This stopped all sending of analytics from dartdev.

The added flag in dartdev had an implicit default value of 'false' -> no analytics would be sent.

Also the main_options.cc change was broken and did not pass the argument on to dartdev.

This failed to be caught by tests because all test are run with analytics off, and that happened implicitly.

Original change's description:
> Improve handling of disable-dartdev-analytics
>
> Some other refactorings are piggy-backed along.
>
> TestProject.runSync no longer takes a 'command' argument. It was anyway
> often not an argument.
>
> Also stop the messy handling of pub arguments. It is no longer needed.
>
> BUG: https://github.com/dart-lang/sdk/issues/44135
> TEST=The VM change is tested via all the pkg/dartdev/test/command/* tests that invoke dart with the --no-analytics flag.
>
> Change-Id: Ib5a1a29841a5fdb28663b7f60c5d6fc31ba252d0
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171284
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Jonas Jensen <jonasfj@google.com>

TBR=kustermann@google.com,bkonyi@google.com,sigurdm@google.com,jonasfj@google.com

Change-Id: I92ef65b16cdb75fb2475faf9f522fda62e181bab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171941
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2020-11-13 14:30:46 +00:00
William Hesse ef07751c43 [infra] Fix build.py and gn.py to exit on SIGINT
It is very tricky to make scripts using the python multiprocessing
package terminate cleanly on SIGINT (ctrl-c).
Use subprocesses run in parallel instead for the simple uses
in these scripts.

This is necessary when running build.py from within another script,
so that it terminates cleanly when the process group receives
a broadcast SIGINT.

Change-Id: Ifc858225a49f369c4bd9cee62639ac6fc8ff737e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171120
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-11-13 12:35:09 +00:00
Martin Kustermann 838fe41428 [gardening] Add missing helper files to make test pass in appjit mode
In app-jit mode the Platform.script is in a different place. The test
needs files next to it in order to run.

Change-Id: Icc05287c6cba37fcdc9f8cd54edefb3657a0084c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171887
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-11-13 12:04:29 +00:00
Sigurd Meldgaard 692b0070eb Fix test expectation on windows.
Change-Id: I33d86243ba57fedef1318983f4b467a1184bf62a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171882
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2020-11-13 09:42:06 +00:00
Sigurd Meldgaard 00b7040dc8 Remove obsolete dartfix build target and scripts
The package was deleted in 224a997a23

Bug: https://github.com/dart-lang/sdk/issues/43863
Change-Id: I599ea7b594365ef244550c90f50bab15d116c937
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170696
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2020-11-13 09:18:36 +00:00
Sigurd Meldgaard cda994ffc8 Improve handling of disable-dartdev-analytics
Some other refactorings are piggy-backed along.

TestProject.runSync no longer takes a 'command' argument. It was anyway
often not an argument.

Also stop the messy handling of pub arguments. It is no longer needed.

BUG: https://github.com/dart-lang/sdk/issues/44135
TEST=The VM change is tested via all the pkg/dartdev/test/command/* tests that invoke dart with the --no-analytics flag.

Change-Id: Ib5a1a29841a5fdb28663b7f60c5d6fc31ba252d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171284
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2020-11-13 08:40:06 +00:00
Erik Ernst f3ffe6dac6 [analyzer] Adjust several visitors
This CL adjusts several visitors to visit `type` rather than
`functionType` of `GenericTypeAlias`. This is needed because
`functionType` is now a view on `type`, and the former will be null
in some cases such that the underlying `type` is incorrectly ignored.

Here are the locations not yet modified in this manner:

Visitors:
  ResolvedAstPrinter
  AstBinaryWriter
  BestPracticesVerifier

Non-visitors:
  TypeAliasSelfReferenceFinder._sanitizeGenericTypeAlias, _Finder.genericTypeAlias
  VarianceBuilder._genericTypeAlias
  NamedTypeBuilder._getRawFunctionType,
  LinkedUnitContext.getGeneticTypeAliasFunction
  _File._buildFileDeclarations
  _LibraryBuilder._addGenericTypeAlias

analysis_server, visitors:
  _LocalBestTypeVisitor

analysis_server, non-visitors:
  InlineTypedef.compute
  DartUnitOutlineComputer._newGenericTypeAliasOutline
  Files: completion_metrics (about 3 locations in here).

It would be great if I could get some feedback on these: Which ones
are most urgent? Will we keep any of them unchanged?

Change-Id: Ifd55c19571d84bb7ec004b65c5f1f22f3b22cb5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171586
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-11-13 08:21:15 +00:00
Riley Porter 4c0ddfbc1e [package:js] Clean up boolean logic for isJSInteropMember
Change-Id: I364d8029f134e549e6649439e9038a34e486137c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171630
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2020-11-13 07:44:06 +00:00
Martin Kustermann 55bb15a8cb [vm/concurrency] Remove duplicate shutdown logic for service/kernel isolates
This is a follow up to [0] which already did this for main isolate vs
helper isolates.

[0] https://dart-review.googlesource.com/c/sdk/+/170984

TEST=Changes existing implementation which is already exercised/tested.

Change-Id: I5f1260da642fb191e5db3316a104dd0336aab414
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171589
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-11-13 07:25:36 +00:00
Siva Annamalai 54a91f26c4 Revert "[wasm] Remove dart:wasm"
This reverts commit ade333dd54.

Reason for revert: This broke both the Flutter HHH and Google3 bots. It looks like some co-ordination is required between the Google3 and Flutter engine build changes for this CL to land.

Original change's description:
> [wasm] Remove dart:wasm
>
> I'm not entirely sure why I had to modify a random set of fingerprints
> in runtime/vm/compiler/recognized_methods_list.h, but when I did a debug
> build it had some fingerprint errors.
>
> Change-Id: Ib0a0cccb37f2efba509e2b37b6eabe790fa933c4
> TEST= Deleting stuff, so not really necessary
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170620
> Commit-Queue: Liam Appelbe <liama@google.com>
> Reviewed-by: Liam Appelbe <liama@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,liama@google.com

Change-Id: I244d7b3549845dd71719176a62b6ec3a4c4b5f86
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171860
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-11-13 01:54:10 +00:00
Brian Wilkerson 236399ee5e Fix a typo that caused part of the documentation to be dropped
Change-Id: Ie685e019d6df60ba7d336b550e5c1cc1efbd6f68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171810
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-11-13 00:53:55 +00:00