Commit graph

81320 commits

Author SHA1 Message Date
Alexander Thomas 77fc0254c6 [infra] Default presubmits to use python3
Fixes https://github.com/dart-lang/sdk/issues/46930.

Change-Id: I249b7420b68c0e5221a4c1479161f7d5822e5770
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211001
Reviewed-by: William Hesse <whesse@google.com>
2021-08-24 08:20:47 +00:00
Johnni Winther 184fd50728 [test_runner] Support multiple arguments in update_static_error_tests.dart
This improves usability of the tool when a multiple tests needs updating.

Change-Id: I034e3da7381ae79b2149429e5271904e0dfcae59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210862
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-08-24 08:02:38 +00:00
Nate Bosch 89ba203a8d Rename some _tag to _rev in DEPS
Dart team packages should be synced first by commit before being
published and tagged. These packages were already using that pattern,
update the naming to match.

Change-Id: I004dba9459897b892af2e5f652d13730c90ad5cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210980
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2021-08-24 03:09:42 +00:00
Sam Rawlins 419d70afb2 Fix message of RETURN_IN_GENERATOR; stop double reporting.
* This message should only be reported by the parser; the
  error raised in the analyzer was strictly duplicate.
* This message theoretically used to mention "async*" or
  "sync*" depending on the modifier that the function in
  question listed. However, listing one modifier or the
  other is a red herring, and may confuse the user; any
  function declared with one or the other is a "generator",
  and the error applies equally to a "generator" using one
  or the other modifier.

Bug: https://github.com/dart-lang/sdk/issues/43665
Change-Id: I6ef1f5c055473170e7563222f6f0a6c56a4ad5f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210801
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-08-24 01:43:48 +00:00
Ahmed Ashour f4b6fa85ea Add a quick fix to return_of_invalid_type
Bug: 46785
Change-Id: Ided0ebd07935289b9b7fdfaaf5a38a992646c9d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209962
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-23 23:56:07 +00:00
Ahmed Ashour 5502e51627 CHANGE_TYPE_ANNOTATION to handle unreferenceable type
Fixes #46971

Change-Id: Id0f1a2ebd79b1459c4d518c0cd7f42545c584159
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-23 23:53:37 +00:00
Danny Tuppeny 63f1fb02a4 [dds] Support attachRequest in Dart CLI DAP
Change-Id: I4bcd7483ab9f3ed8dd839bd69b59d21f8139c582
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210724
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-08-23 23:22:48 +00:00
Sam Rawlins cccc9f93b2 Analyzer: Fix representation of an arrow generator (illegal) function
Fixes https://github.com/dart-lang/sdk/issues/43665

A function like `foo() sync* => []` is illegal, but there is no _parse_
error, only a compile-time error. So the analyzer needs to be able to
represent this function accurately.

I think that without this fix, the formatter crashes trying to format
such a function.

Without this fix, a function like `foo() sync* => []` has a
FunctionElement with `isAsynchronous` true (because there _is_ a
modifier) and `isGenerator` false, because an arrow function cannot be
a generator. But these bool values lead to wrong errors being reported.

Change-Id: I1f7bda3696d04b437f6ea12491ca4aa19b893574
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210820
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-08-23 21:12:10 +00:00
asiva b67f45f955 [VM/Runtime] Fix 'File' object leak in async file open operation
The 'File' object created in the async file open method is leaked
if the operation is not completed when the isolate shuts down
with an unhandled exception.
This change adds a finalizable state for the 'File' object so that
the message deletion that happens when ports are closed could run
the callback to clean up the 'File' object.

TEST=new tests added

Change-Id: I4a3cb28370d27306c795c1914aeb5c18a1d85e2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210761
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2021-08-23 20:57:48 +00:00
Michael Thomsen 484825eb09 Add dart2native discontinuation to changelog
Follow-up to https://dart-review.googlesource.com/c/sdk/+/210241

Change-Id: I828adafb04ae92731378b2e372a127dc35de12cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210921
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-08-23 20:54:22 +00:00
Michael Thomsen 6c5fb84716 Discontinue dart2native (use dart compile)
TEST=Existing tests updated to use dart compile

Change-Id: Ia3478069df2354a3bf057fedae0f1eea9415de95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210241
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-08-23 20:53:09 +00:00
Ryan Macnak 0c165830b8 [vm, compiler] Fix saving an invalid pointer to the stack in the BuildMethodExtractor stub.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/46796
Bug: https://github.com/dart-lang/sdk/issues/46954
Change-Id: I7e32fd28cdaebdf7b4ddde484a21cbe7c49f23e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210620
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-08-23 20:05:27 +00:00
Sam Rawlins 4bff21f56c analyzer: Remove deprecated IgnoreInfo API and refactor
* Change `IgnoreInfo.ignoredAt` to accept an error code name, case-
  insensitive, and allow short-circuiting to a "no this is not
  ignored" if the file has no //ignore_for_file comments, and if the
  relevant line has no //ignore comments. I think this accounts for
  the vast majority of diagnostics (both IDE, code-in-development,
  and "final" code).
  * This also improves `uniqueName != name` checking, which I think
    was previously _always_ comparing a lower case string to an upper
    case string. :/
* Remove the deprecated `IgnoreInfo()` constructor.
* Remove the deprecated `IgnoreInfo.calculateIgnores` method.
  * This allows us to remove the capture groups on
    IgnoreInfo.IGNORE_MATCHER and IgnoreInfo.IGNORE_FOR_FILE_MATCHER.

Change-Id: I6617e65e5c2063769dbe9d922740d20b6fba219d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210800
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-08-23 19:11:27 +00:00
Janice Collins 2a8f3d5fd5 Update dartdoc to 2.0.0.
Release notes:  https://github.com/dart-lang/dartdoc/releases/tag/v2.0.0

Change-Id: If9a7218a974225224d5f2dd23c026366e71a9405
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210900
Auto-Submit: Janice Collins <jcollins@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-08-23 19:04:47 +00:00
Brian Wilkerson 804109b3c6 Add documentation to completion metrics and clean up a bit of code
Change-Id: I612b5f5953bc0f8d94ad9976e55590097389c62e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210740
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-23 18:26:57 +00:00
Brian Wilkerson d6f4640c0d Make the set of fixes for lints extensible
Change-Id: I70ba8737f91aa2d3728ae67d656de26d3619579e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210840
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-08-23 18:19:27 +00:00
Sam Rawlins f274c79333 analyzer: Rewrite function tearoff followed by a method call
Today, the parser reads `a<...>.b()` as a constructor call with
explicit type arguments for the class. This could be a method call
on a function tearoff (however unlikely).

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

Bug: https://github.com/dart-lang/sdk/issues/46020
Change-Id: I16681171a7d99adf3fd080a235fcedc46c5fb1ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210780
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-08-23 18:10:47 +00:00
Jens Johansen 7399e4e631 [parser] Recover differently when formal parameter name is keyword
Fixes https://github.com/dart-lang/sdk/issues/46736

Change-Id: Ia8ee921e14ac80934f9d0ec14e0140b23cc7d3bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210725
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-08-23 15:14:47 +00:00
Dmitry Stefantsov d3c3e92740 [cfe] Add error on misplaced type arguments in constructor tear-offs
Closes #46890.

Bug: https://github.com/dart-lang/sdk/issues/46890
Change-Id: Idf0c4e5ef6380541aaccba9f74755572b2fa9549
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210460
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-08-23 14:36:47 +00:00
Jens Johansen b977476ca0 [parser] Add test for formal parameter with name that is keyword
Change-Id: If3256128bd7ad4c6062e3ea24f35e6a0552740a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210722
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-08-23 08:42:28 +00:00
Jens Johansen 5e00baa329 [parser] Format files and add /* name = */ comments
Change-Id: I701c3b0cc0c4d4210a8d81efe2d3683cec4f7f88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-08-23 07:27:47 +00:00
Ahmed Ashour fc9ead5e9d Fix grammar
Fixes #46961

Change-Id: Ic4534e7e27a0ecee681992cb00d92f0d290a7054
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210729
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-22 16:33:56 +00:00
Ahmed Ashour 86898c2ee6 DartEditBuilder to have canWriteType()
Bug: 46911
Change-Id: Icf8cdb3af6f2c34fe2eff75f1aeb1dac4aa8aac3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210463
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-21 18:51:36 +00:00
Brian Wilkerson 86c660faaa Fix an exception in the ErrorVerifier
Fixes https://github.com/dart-lang/sdk/issues/46952

Change-Id: I2cfd8778d6a26cf3107868264713a171470c6bf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210762
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-08-21 16:07:40 +00:00
Devon Carew 3238d433fa Revise the SDK size benchmark.
Change-Id: Iab9b301737e141a9ad95d4f4e9391a06b5788e6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210760
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-08-20 21:47:25 +00:00
Sam Rawlins 0a7819ee40 analyzer: Address feedback in function_reference_test.
Change-Id: I1485800010914363c7f5b4dfdeb3e8f2ce50870c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210700
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-08-20 17:31:22 +00:00
Sam Rawlins 485c1962d3 analyzer: report tearoff of generative constructor of abstract class
From the spec:

> A compile-time error occurs if a constructor tear-off denotes a
> generative constructor declared in an abstract class.

Change-Id: Ic1bf3fd5a726f327a0dd80d180b7b88790514797
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210660
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-08-20 17:16:06 +00:00
asiva 30a8be52a6 [VM/Runtime] - Adding port check in one additional case of
SendAndWaitForResponse that was missed in the last CL.

TEST=ci

Change-Id: I7d18cdb7daf6bf5ca6d1a0ed2be0574dc09a3dbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210649
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2021-08-20 16:42:05 +00:00
Devon Carew d7c8e6a9d3 rev the build of devtools; add a 'dart devtools' command
Change-Id: I98ffbceedd06b3693703518243e231d6a1a66c9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210423
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
2021-08-20 16:25:24 +00:00
Alexander Aprelev 064a9a50a0 [vm/regexp] Ensure regex interpreter checks and yields to safepoints, handles OOB messages periodically.
Fixes https://github.com/flutter/flutter/issues/88063
Fixes https://github.com/dart-lang/sdk/issues/26041

TEST=benchmarks/EventLoopLatencyRegexp,
long_regexp_process_oob_messages_test

Change-Id: I2bb10b332768f794b902b58be18d437cc07a59a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210065
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-08-20 16:19:16 +00:00
Martin Kustermann 709f87e7f3 [gardening] Attempt to fix flakily timing out service{,_2}/get_vm_timeline_rpc_test
We launch the subprocess with --complete-timeline which will collect and
buffer all timeline events in-memory. This works ok if we don't have too
many events and if we have enough memory.

On ia32 in particular the JIT's kernel-service runs from kernel file
(not from an app-jit trained snapshot). That means it's slow and
possibly produces many more timeline events since kernel-service isolate
has to JIT all of the CFE in order to compile the test script.

On ia32 we only have 2 or 3 GB of memory available. So this could lead
to OOMs to due the timeline buffer getting too large.

(See issue below for more information)

This is an attempt to fix that by first compiling the testee to kernel,
so the subprocess can be run immediately from kernel instead of first
needing to compile via CFE.

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

TEST=Tries to make flakily timing out less flaky.

Change-Id: I46a674ce7a8c44a716a543c73703d40f690f396e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210723
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-08-20 15:56:24 +00:00
Tess Strickland d95e6337dd [vm] Ensure _Closure <: FutureOr<Function>.
Instead of checking in AbstractType::IsSubtypeOf, check in
Class::IsSubtypeOf, after any FutureOr layers have been unwrapped.

TEST=vm/cc/ClosureType

Change-Id: I5f39bba1660e795442a7a489cf6922a38c449932
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210683
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-08-20 12:56:15 +00:00
Martin Kustermann f4ca1ed08b [gardening] Fix ubsan issue where nullptr is passed to qsort()
TEST=Fixes various ubsan failures.

Change-Id: Iaed0f012604e0fa6bf8aebf20e858bf482b7c336
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210720
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-08-20 12:41:20 +00:00
Slava Egorov a2e5dc8400 Revert "[vm, gc] Make the generational barriers in the runtime multi-thread safe."
This reverts commit a3bcca9aba.

Reason for revert: there are indications that this is causing flaky crashes (b/196919000)

Original change's description:
> [vm, gc] Make the generational barriers in the runtime multi-thread safe.
>
> TEST=ci
> Bug: https://github.com/dart-lang/sdk/issues/46909
> Change-Id: I9e26b88779ff9039ab7723d07ef9f8568e6595d8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210283
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

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

Bug: https://github.com/dart-lang/sdk/issues/46909
Change-Id: Ifdbf921dbcf439ba4dfa77a63a37b34c6bfe815c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210682
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2021-08-20 10:45:04 +00:00
Dmitry Stefantsov 3b98b1d5dc [cfe] Use 'packageConfig' instead of 'script' in an internal tool
Change-Id: Ibcad91ddbaeb5b466c09a55c2be31f2a705d895f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210461
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2021-08-20 09:40:44 +00:00
Alexander Thomas b7f320714c Revert "[infra] Temporarily remove package_deps.dart from the test matrix"
* This reverts commit c04a71e455.
* Fix pkg/compiler pubspec.yaml to work with package_deps script and
  `dart pub get`.

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

Reason for revert: Duplicate dart2js_info has been removed from DEPS.
TEST=dart pub get in pkg/compiler.

Original change's description:
> [infra] Temporarily remove package_deps.dart from the test matrix
>
> It currently fails because pkg/dart2js_info isn't wired up, yet.
>
> Change-Id: I10a2d43385fe3d900a62fa7438ed37b9e366dffb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209902
> Reviewed-by: William Hesse <whesse@google.com>

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

Change-Id: I35e642d1adb931fff665d48f7f51c31c070ff180
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210680
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-08-20 09:28:45 +00:00
Devon Carew b44250c3f6 remove some unused dartdev benchmarks
Change-Id: I75118d2a18ae3bbea25647c9c59e3d4e4aaf809d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210502
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-08-20 00:40:24 +00:00
Sam Rawlins c86bfe3e2c Correct type of CONSTRUCTOR_TEAROFFS_NOT_ENABLED code
Additionally, sort the UNUSED_RESULT_* codes.

This addresses comments in
https://dart-review.googlesource.com/c/sdk/+/209300

Change-Id: I4d3fd25703f6df59f8ad985352c87406e218b544
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-08-19 22:22:06 +00:00
Konstantin Shcheglov 643d68793a Remove WithNonFunctionTypeAliasesMixin from analysis_server/.
Change-Id: I3b25bf726d977984552ab361baf11eed28cafd7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210651
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-08-19 22:08:24 +00:00
Konstantin Shcheglov d24708d4a0 Stop specifying released experiments in PubPackageResolutionTest.
Change-Id: Ibe63970e404dceedc98d6542143181b41dbd0f6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210650
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-08-19 22:03:54 +00:00
Konstantin Shcheglov 04a6f33ea5 Use the latest language with experiments for most summary tests.
Only a few need language 2.9 (before null safety).

Change-Id: Iadb11d41c7212cabbc2dc30f10660eae5bd794ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210647
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-08-19 21:28:05 +00:00
Jake Macdonald b78929f061 update frontend_server_client
Change-Id: I7b2d06373b666a54f2b961bde063dcd755945541
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210600
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-08-19 21:16:06 +00:00
Konstantin Shcheglov 4d42e73295 Report EXPERIMENT_NOT_ENABLED instead of ANNOTATION_WITH_TYPE_ARGUMENTS.
On one hand this is less precise, OTOH this tells which feature and
the language version it requires.

Change-Id: I1d24a2d7cf2c7b7ca305d5bfc9f094fce0734bc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210644
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-08-19 20:20:26 +00:00
Konstantin Shcheglov c929388181 Support for FunctionReference in summaries.
Change-Id: I709297a11a63f9b3c84f17bd9934442969128b9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210642
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-08-19 19:44:40 +00:00
Tess Strickland 431ed5183f [vm/compiler] Reduce number of subtype comparisons in AOT.
Previously when building subtype class id ranges for a class in AOT, we
looped over the entire class table, even though in most cases, the
number of actual subclasses and implementors of the class is a small
subset of all loaded classes.

Instead, use the same hierarchy information in both JIT and AOT, only
falling back to traversing the entire class table in cases where the
hierarchy information is missing.

Additional changes:
* Do not generate unused type argument checks if the subtype class id
  range to check is empty.
* Only generate a nullability check when checking that an instance
  type argument is a subtype of non-nullable Object in null safe mode.
* Fix AbstractType::IsSubtypeOf so _Closure <: Function.

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

TEST=vm/cc/HierarchyInfo

Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-tsan-linux-release-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try
Change-Id: Ic0310208d271ef04e778f070f420ae0abbdd47d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210581
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-08-19 18:32:01 +00:00
Konstantin Shcheglov 8fbaaffd2e Support for TypeLiteral in summaries.
Change-Id: I7daafe544f076175328ec8be39cf5c489940279b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210601
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-08-19 17:29:40 +00:00
Martin Kustermann 0201d76154 [vm/concurrency] Remove internal-only "Isolate.spawn() into new group" functionality
This was mainly used as a backup plan which is no longer needed at this
point.

This CL removes internal only functionality that couldn't be used by
end-users.

TEST=ci

Change-Id: Ie0828bda1ba48ee6a5a460ff039267e0549e0060
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210340
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-08-19 15:19:00 +00:00
Jens Johansen 8394c5f953 [CFE] Remove unused parameter for 'recordUse'
Change-Id: Ie22544d1e9aa4c94087e5a8b9f575c2cb273705b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210580
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-08-19 13:28:50 +00:00
Jens Johansen 01212e3262 [CFE] Add a parser test with triple shift disabled
Change-Id: I4c4bc51ae6f115f700ed5feea69a334213dedace
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210560
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-08-19 12:01:25 +00:00
Jens Johansen 7bf731a547 [parser] Special-casing of '}' (like eof) wrt. looksLikeName
Change-Id: I55fb4c10931831630f9c1621addef7fbe9d5a9d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205797
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-08-19 06:41:58 +00:00