Commit graph

81731 commits

Author SHA1 Message Date
Srujan Gaddam 07aa93a532 [dart:html] Add js_util import to dart:html
Part of https://dart-review.googlesource.com/c/sdk/+/210100

As classes get migrated to js_util, this import is needed.

Change-Id: Ib455257883257af2e145c222ab903488b22f13f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211540
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-09-03 21:53:27 +00:00
Konstantin Shcheglov 9b3a91a515 Add constructor references to ConstructorElement indexing tests.
Change-Id: I0d62d43eb0663e6c65adb08e7c5f8bda49790b9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212486
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-03 21:27:18 +00:00
Konstantin Shcheglov d0935c2c85 Tests for FunctionReference in navigation.
Change-Id: I677197f6a27c3d20589fe612c4f5c84c5c5e2637
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212485
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-03 20:14:49 +00:00
Konstantin Shcheglov 21cbe332fd Issue 47097. Handle the case when a folder symbolic link target does not exist.
Bug: https://github.com/dart-lang/sdk/issues/47097
Change-Id: Ia32f742adf3ef24c67ec3e75cfa7dee969ff4afc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212483
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-03 19:24:27 +00:00
Joshua Litt 2cd38d1f5a [dart2js] Add support for 'or' nodes in program split constraints.
Change-Id: I6de8240082e9b2f0f219e3641cf702054d2334a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208001
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-09-03 19:19:48 +00:00
Martin Kustermann 5f9ec9f52a [vm/concurrency] Allow closures as entrypoints in Isolate.spawn calls
We already allow sending closures (if immutable via sharing
otherwise via copying). This CL makes use of this to allow the argument
to `Isolate.spawn()` to be any closure.

Similar to normal message sending, the spawn will fail if the closure
cannot be sent (or causes an error on the new isolate, e.g. rehashing
error).

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

TEST=vm/dart{_2,}/isolates/closure_entrypoint_test

Change-Id: Iab342267d87bd87bc8c0c82d16aec58a69a3df44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212295
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-09-03 19:08:37 +00:00
Alexander Aprelev 21cbb2ae3a [analysis_server/benchmark] Fix memory usage calculation to avoid double-counting.
When several isolates share same isolate group, they share the same heap.
This change iterates over isolate groups and aggregates their heap size instead of iterating over isolates.

Change-Id: I83b04110277b3a2d22ab758b50ee8c4ce480ea7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212382
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-09-03 19:02:27 +00:00
Konstantin Shcheglov f67d4b368c Update navigation notification to support ConstructorReference.
Change-Id: I815941304f8dd131998f5ae527f21077ce5324df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212482
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-03 18:53:57 +00:00
Konstantin Shcheglov f726874678 Support for --cache in 'dart analyze'.
Bug: https://github.com/dart-lang/sdk/issues/45267
Change-Id: I503227ac59a3562e79d3654c405debaf5d0c764c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-03 18:43:08 +00:00
Nicholas Shahan 5ea90ee907 [ddc] Enable construtor tearoff lowering
* Update tearoff runtime equality algorithm with newly specified
  requirements.
* Update kernel golden files for the dartdevc target to include
  the static method lowering for constructor tearoffs.
* Avoid adding source maps and debug symbols to the static methods
  created by the CFE lowering.
* Add additional expected non-nullable values detected in the
  nullable inference tests. These correspond to the values that
  appear in the static method return statements.

Measurements taken from large applications show the lowering causes
a code size increase of 2.5%-3.5%. That increase did not appear to
create any measurable difference in initial page load time but if
there turns out to be a regression we can revisit each of the various
lowerings to implement support in DDC at the site where the constructor
is torn off.

Fixes: https://github.com/dart-lang/sdk/issues/46486
Fixes: https://github.com/dart-lang/sdk/issues/46837
Change-Id: I01fa39d4f1d0e937919dd1466bb6a34c91a10e75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/206960
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-09-03 17:48:58 +00:00
Dmitry Stefantsov 94470918b9 [cfe] Check bounds in instantiated type literals
Closes #47046.

Bug: https://github.com/dart-lang/sdk/issues/47046
Change-Id: I1d081bbda316dccbfd48ed95ddf8e3f22a386191
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212290
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-03 16:19:47 +00:00
Alexander Aprelev 5ccf97a5a9 [vm/reload] Fix how isolate group source loaded_blobs are visited.
loaded_blobs need to be visited as part of IsolateGroup::Visit method rather than Isolate::Visit one.
Before this change loaded_blobs could become corrupted because GC requires objects being visited only once during collection cycles.

Fixes https://github.com/flutter/flutter/issues/89406

TEST=ci, flutter

Change-Id: Ic61498c205c5cc072e5f45928264a507a7752e0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212440
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-09-03 15:30:09 +00:00
Sam Rawlins 29ba68fcf2 Set ConstructorReference TypeName.type to null; re-arrange bounds checks
A follow up from https://dart-review.googlesource.com/c/sdk/+/211304

Change-Id: Ia68a232befc6371739551eb40ad49a9ef15ee5c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211640
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-03 15:10:07 +00:00
Sam Rawlins 394b76fd61 Add tests for constructor tearoff as const function.
Also update some TODOs.

Change-Id: I02c883e717a3315892a99879ef45aba804183c86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212020
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-09-03 14:20:58 +00:00
Martin Kustermann 462eb6a105 [gardening] Ensure we have an active isolate group when destroying IsolateSpawnState
The destructor of [IsolateSpawnState] might call destructors on
[Message] which may want to delete persistent handles. Doing so requires
an active isolate group.

This CL ensure that in shutdown races (main isolate exists which
triggers VM shutdown, helper islate is about to start but fails to start
due to VM shutdown request), we still ensure to properly delete the
persistent handles.

TEST=Fixes vm/dart_2/spawn_shutdown_test/0 on app-jit configurations.

Change-Id: I0c3e0ceca7faab36f298953dabb1ccae3a0ecc8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212464
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-09-03 13:15:57 +00:00
Martin Kustermann ecbc4ee2d4 [gardening] Fix transitive object copy of closure support in compressed mode
The allocation routine for allocating context objects (used for copying
closures) has to use uncompressed mode - since [Context] objects aren't
compressed yet.

This is a follow-up to https://dart-review.googlesource.com/c/sdk/+/209110

TEST=Fixes closure tests in vm/dart_2/isolates/fast_object_copy2_test/<num> in compressed mode.

Change-Id: I3a16701fe662ff7ea501a238653c7efb376cda55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212465
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-09-03 13:14:47 +00:00
Martin Kustermann e9b56794fc [vm/compiler] Make closures have no context if no variables are closed over
As a side-effect of making closures without captured variables have an
empty context, we not only avoid a memory leak, but also allow such
closures to be sent across [SendPort]s.

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

TEST=vm/dart{_2,}/isolates/closures_without_captured_variables_test

Change-Id: I5e8845203059ff625f7cff3f072d845b5e48ba36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212297
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-09-03 12:35:58 +00:00
Alexander Thomas 9bec5d6b3b [co19] Roll co19 to a4f77a02a3676b1c2e7390c860cb0486c8515d3f
2021-09-03 sgrekhov@unipro.ru Fixes 1187. Roll failures fixed

Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I168b3dff190ea889eba23aad0159a5d130251718
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212463
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-09-03 12:06:17 +00:00
Martin Kustermann 9615af4635 [vm] Cleanup some workaround due to native extensions (which got removed)
Now that support for native extensions (aka dart-ext:*) has been
removed, the kernel loader is guaranteed not to call out to embedder
anymore (it did so before for loading shared libraries).

This allos us to clean up some code as well as extend the scope of our
NoActiveIsolateScope.

TEST=ci

Change-Id: I5c8c9ee47298fdd316583ba3aed74772c1c7783f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212296
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-09-03 10:55:37 +00:00
Alexander Thomas 74b118d37f [co19] Roll co19_2 to 3e1ea1af9ef293d7f6a8f3332b5c71c7072a30e0
2021-08-31 irina.arkhipets@gmail.com Issue 1094: Tests updated.
2021-08-31 irina.arkhipets@gmail.com Issue 1094: Missing issue tags added.
2021-08-31 irina.arkhipets@gmail.com Issue 1094: LibTest/core test updated.
2021-08-31 sgrekhov@unipro.ru 1177. Tests updated to expect compile errors according to the new behaviour
2021-08-30 irina.arkhipets@gmail.com Fixes 1176: regression tests updated, missing issue tags added.
2021-08-25 irina.arkhipets@gmail.com Fixes 1170: tests re-named.
2021-08-24 sgrekhov@unipro.ru 1169. Change error expectation for CFE according to the new behaviour
2021-08-17 irina.arkhipets@gmail.com Issue 1158: Language/Expressions/Numbers test splitted to web and non-web ones. Non-web ones should be excluded for dart2js in status files. Minor changes.
2021-08-17 irina.arkhipets@gmail.com Issue 1158: Some tests splitted to web and non-web ones. Non-web ones should be excluded for dart2js in status files.
2021-08-16 irina.arkhipets@gmail.com Issue 1158: Changes from master moved to pre-nnbd branch, CyclicInitialization test corrected.
2021-08-16 irina.arkhipets@gmail.com Issue 1164: Got rid of toInt32, toInt16, toInt8 functions.
2021-08-13 irina.arkhipets@gmail.com Issue 1094: missing Issue tags and additional note added.

Change-Id: If6649c595fd6c820e157bdcb462bb6d7a08194e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212460
Reviewed-by: William Hesse <whesse@google.com>
2021-09-03 10:07:37 +00:00
Lasse R.H. Nielsen 9076b6a76a Add test for parsing explicit instantiations.
Change-Id: Ia1c5b6b2365849a6c69b1db2bf1878ca64dfd65b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211420
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-09-03 09:54:49 +00:00
Johnni Winther 7fb3d36c03 [cfe] End support for dart-ext
https://github.com/dart-lang/sdk/issues/45451

Change-Id: Ieed7c4a200b0480975715a149596b1f5ea733814
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212002
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-09-03 09:18:26 +00:00
Alexander Thomas 93af258b29 [co19] Roll co19 to a3af05fb4ee10b065bf0f5bfe4e9546bc077d5e8
2021-09-03 sgrekhov@unipro.ru Add const and factory constructors tests for constructor 'new' syntax
2021-09-03 sgrekhov@unipro.ru Fixes 1186. Add @dart=2.14 to the test that uses C.new()
2021-09-02 sgrekhov@unipro.ru Fixes 1185. Add test for flow analysis fix implemented under constructor tears-off flag
2021-09-02 sgrekhov@unipro.ru Fixes 1184. Disambiguate by 'is' and 'as' tokens added. Existing test fixed
2021-09-01 sgrekhov@unipro.ru Fixes 1183. Add tests for late final variable in class with constant final constructor
2021-09-01 sgrekhov@unipro.ru Fixes 1182. Add tests for f<int>.toString()
2021-09-01 sgrekhov@unipro.ru Fixes 1157. Use constructor name after '.' to test disambiguate by '.' token
2021-09-01 irina.arkhipets@gmail.com Issue 1178: Test expectation corrected.
2021-08-31 sgrekhov@unipro.ru Issue number added
2021-08-31 sgrekhov@unipro.ru Fixes 1181. Test fixed to not to fail on web platforms
2021-08-31 irina.arkhipets@gmail.com Issue 1094: Missing issue tags added.
2021-08-31 irina.arkhipets@gmail.com Issue 1094: Test updated: microseconds are not supported in dart2js.

Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I59c3622984645c8a2de5a7b699f004d326b7035d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212299
Reviewed-by: William Hesse <whesse@google.com>
2021-09-03 08:36:53 +00:00
Ahmed Ashour b204782b12 Remove BulkFixProcessor.producableFixesForError
Fixes #47083

Change-Id: I9f50beb10b95e052aff7a89dca763c8bd9710cf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212293
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-03 05:10:48 +00:00
Leaf Petersen 6d741a6e5b Flip constructor-tearoffs experiment flag
Change-Id: I25538772c4b452c647518e5a5696ba79dfb38991
TEST=Existing tests for the feature.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212262
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-09-03 04:19:57 +00:00
Konstantin Shcheglov 78ef2cc217 Support for --packages in 'dart analyze'.
Bug: https://github.com/dart-lang/sdk/issues/45267
Change-Id: I660de0c80e4f280996b6ce5e90d39aa274997d07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212380
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-03 01:46:25 +00:00
Brandon DeRosier d0a3daffb7 Revert "[vm/concurrency] Enable isolate groups by-default in all modes"
This reverts commit 57de39d07a.

Reason for revert: Breakage in flutter engine roll -- see: https://github.com/flutter/flutter/issues/89406

Original change's description:
> [vm/concurrency] Enable isolate groups by-default in all modes
>
> Various VM embedders have already explicitly opted into it
> AOT mode for a long time.
>
> Now we turn it on by default, also because we'd like to collect
> feedback from the field on this - in good time before the next
> stable branch will be released.
>
> All of our isolate related tests have already
>
>     // VMOptions=--enable-isolate-groups ...
>     // VMOptions=--no-enable-isolate-groups ...
>
> So they will continue to exercise the tests in both modes.
>
> Issue https://github.com/dart-lang/sdk/issues/36097
>
> TEST=Existing test suite.
>
> Change-Id: I1d031e8a5f2173b48eb32c53b08daccda75dc51d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208649
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Martin Kustermann <kustermann@google.com>

TBR=vegorov@google.com,kustermann@google.com,aam@google.com,asiva@google.com

Change-Id: I4f20f3a998508b2465e5c16b64b363419da62775
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212345
Auto-Submit: Brandon DeRosier <bdero@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-09-03 01:14:38 +00:00
Ryan Macnak 00f20a0732 [vm, compiler] Fix load width for X64's EmitLoadInt32.
Broken since 94362f1af0.

TEST=none
Change-Id: I85a4874becb6bade92279715543eddeeb7a3f0f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202311
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-09-02 23:09:45 +00:00
Ryan Macnak 49758cab5c [test] Explicitly enable symbolization in the sanitizers.
Apparently this is no longer the default.

Change-Id: Ia7f8e8b3e383144ff5b42446add21e6f658a55fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212320
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-09-02 22:30:20 +00:00
Stephen Adams d781fa00c3 [dart2js] Fix #47032
Fixed: 47032
Change-Id: Iecee40527c17b90696f4ee9435dcf7d0b6ad03a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212343
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-09-02 22:27:50 +00:00
Martin Kustermann 177bc7d074 [vm/concurrency] Fix test to always pass --enable-isolate-groups (or the negative flag)
This makes the self-detection of whether isolate groups are enabled work
correctly in the test.

TEST=Fixes lib_2/isolate/message3_test test failures on CI

Change-Id: I71965236444af71e6deb4df6a77911144af9af91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212294
Auto-Submit: Martin Kustermann <kustermann@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-09-02 22:15:55 +00:00
Ryan Macnak 0c07cd6bc7 [vm] Reduce peak memory usage of --write_v8_snapshot_profile_to.
Remove unnecessary members, reduce field sizes and reduce initial map capacities.

/usr/bin/time -v gen_snapshot --snapshot-kind=app-aot-elf --write-v8-snapshot-profile-to=... dart2js.dill
Maximum resident set size (kbytes): 1347220 -> 902280 (-33.0%)

TEST=ci
Bug: b/196510517
Change-Id: I2d4dd55ac6db8ccbe9f8a834bab9fe906ba1228d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212269
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-09-02 21:46:35 +00:00
Konstantin Shcheglov 0317bffb9e Only allow a class type parameter to be a potentially constant type expression.
Change-Id: Ifbbf26035fcee7c11b97ac7a01160fc2e3fbfd45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-02 21:24:45 +00:00
Stephen Adams 6e372971d6 [dart2js] dart format --fix in common/ and native
Purely mechanical except for moving a comment in one typedef.

Change-Id: I460d14aabb6081c92dd37bdfe835f7c3ad59c0f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212025
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-02 20:09:45 +00:00
Stephen Adams ef2784b4a8 [dart2js] Run 'dart format --fix' on universe/
Change-Id: Ia6b5e02098185c94b77427f64234ad6ae7fe0037
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211681
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-09-02 20:07:12 +00:00
Ryan Macnak 192d909101 [vm] Fix crashes when passing bad paths to --write_retained_reasons_to or --trace_precompiler_to.
TEST=ci
Change-Id: I42465be8cd8a05835d1cc1e5fb23a1fe2d075614
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212263
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-09-02 19:47:45 +00:00
Martin Kustermann 26ef8f6947 [vm] Allow sending closures between isolates of the same isolate group
Closures can be shared if they have no state they capture (i.e. a null
context). Otherwise we copy them by also transitively copying the
parent context chain.

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

TEST=Added tests to vm/dart{,_2}/isolates/fast_object_copy{,2}_test

Change-Id: Ie641b97806edd0c21f0a8d5c514f8e850823e165
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209110
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-09-02 19:45:55 +00:00
Ryan Macnak 714e7e6f9e [vm] Make OOM during interpreted regex non-fatal.
TEST=manually adjusting ulimit
Change-Id: I1c1a9ba583275017cfbd92cd850a8bc33920aac9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211461
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-09-02 19:22:16 +00:00
Martin Kustermann eab69f12f8 [vm/concurrency] Fix isolate failure shutdown crash
This particular test was not run in both modes (--enable-isolate-groups
and --no-enable-isolate-groups). So enabling the flag made this test
fail.

It fails because it shutdown the isolate before destroying the
[IsolateSpawnState] - which in return destroys persistant handles which
needs the isolate to be still alive.

TEST=Fixes vm/dart{,_2}/spawn_shutdown_test

Change-Id: Ib06e1149c4066fa993e899bbd3bfdba8a2533b48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212292
Auto-Submit: Martin Kustermann <kustermann@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-09-02 18:47:25 +00:00
Ahmed Ashour 55380c3ed4 Better message for extract_method
Fixes #47084

Change-Id: I7d50f92af8e13d0ad0a2602af4ff8e055f5b04bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212284
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-02 18:35:15 +00:00
Joshua Litt 5ddfa3ffd4 [dart2js] Remove deferred_load hack for main output unit.
Change-Id: I5065063b943006df8dd6655098a691934651151b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208280
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-09-02 18:13:15 +00:00
Danny Tuppeny 3aa464af26 [analysis_server] Support renaming files when classes are renamed via LSP
Fixes https://github.com/Dart-Code/Dart-Code/issues/3354.

Change-Id: I2a11a54e0a2c35d525ee08e0849e35c421f6e195
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212291
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-02 18:09:38 +00:00
Konstantin Shcheglov ddc7523958 Issue 45267. Support for --packages in analysis server.
Bug: https://github.com/dart-lang/sdk/issues/45267
Change-Id: Iac7dd7502b6936bab91279ac5db7cdafaa90c580
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212271
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-09-02 17:33:15 +00:00
Danny Tuppeny 7ccf06ad63 [analysis_server] Disable spawning pub commands during integration tests
Change-Id: Ie23331a7e136d24dc7e982046b10a7c843ec7349
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212049
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-09-02 16:55:05 +00:00
Johnni Winther 5952a48119 [cfe] Add language version to pre constructor tearoff tests
Change-Id: I5c340277f30c6290365087b7d5498fed9803fc65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212288
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-09-02 15:16:13 +00:00
Vyacheslav Egorov bda70c8489 [vm] Remove support for dart-ext: imports
Per breaking change #45451 we are removing support for dart-ext:
style native extensions from the Dart VM.

This CL removes the associated VM code, tests and samples. It also ports
a single test which used dart-ext: import to use FFI instead.

TEST=ci

Bug: https://github.com/dart-lang/sdk/issues/45451
Change-Id: Iae984bce32baf29a950b5de1323939006a217b94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212050
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-09-02 14:14:35 +00:00
Dmitry Stefantsov 6050b7e06f [cfe] Remove kernel-semantics.tex
Closes #47066.

Bug: https://github.com/dart-lang/sdk/issues/47066
Change-Id: Ia8d3397f33f049776587a4a650f4d249c9eaecb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212285
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-09-02 13:54:15 +00:00
Martin Kustermann 57de39d07a [vm/concurrency] Enable isolate groups by-default in all modes
Various VM embedders have already explicitly opted into it
AOT mode for a long time.

Now we turn it on by default, also because we'd like to collect
feedback from the field on this - in good time before the next
stable branch will be released.

All of our isolate related tests have already

    // VMOptions=--enable-isolate-groups ...
    // VMOptions=--no-enable-isolate-groups ...

So they will continue to exercise the tests in both modes.

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

TEST=Existing test suite.

Change-Id: I1d031e8a5f2173b48eb32c53b08daccda75dc51d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208649
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-09-02 13:45:50 +00:00
Johnni Winther 8c9a469084 [cfe] Only create instantiation+invocation in implicit creation context
Closes #47069
Closes #47071
Closes #47075
Closes #47079

Change-Id: Icb7a45560d736f0fe50525e0c735450a0a3d9ff0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212281
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-09-02 13:31:16 +00:00
Johnni Winther a6cc772b67 [cfe] Add always_declare_return_types lint
Change-Id: I206a7a8132b5ea79dc019acf5c2e0cd800307bcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212161
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-09-02 08:07:23 +00:00