This reverts commit 1caee4d1fd.
Reason for revert: This breaks google3 - we need to update the linter's use of the analyzer API.
Original change's description:
> [analysis server] remove the --file-read-mode cli option for the analysis server
>
> Change-Id: Id07e3655cb4bcfc462ada0db8257e7cf584272f5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171101
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
> Commit-Queue: Devon Carew <devoncarew@google.com>
TBR=devoncarew@google.com,scheglov@google.com,brianwilkerson@google.com
Change-Id: I68294ad8b565a94aa098e65276b78e9745eec5a5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171640
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Adds some basic tests to check for runtime subtyping with JS
interop types. Uses function types only to check for subtyping
relationships. Extends some tests on is and as checks as well.
Change-Id: I9cbc91d0c475fba3213dd9a3443921232c286804
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170660
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This CL unifies the implementations of `verify_tests_test.dart` found
in packages `analysis_server`, `analyzer`, and `analyzer_plugin`. It
also enhances the functionality of the tests by having them detect
both missing and extra imports in `test_all.dart` files.
This should make it easier to re-use this logic in other packages,
such as `nnbd_migration`.
Change-Id: Id344eeb4ad514461cda622495651b1339f379022
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170363
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This CL unifies the implementations of `package_root.dart` found in
packages `analysis_server`, `analysis_server_client`, `analyzer`, and
`analyzer_plugin`.
This should make it easier to re-use this logic in other packages,
such as `nnbd_migration`.
Change-Id: I0da44edb379b8e929dd0b1c16a6989c1e9418acb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Previously, the user experience was an `UnimplementedError` with no
further information. Now the user gets an error message telling them
how they need to update the pubspec, which I believe was the original
implementation intent.
Note that the field `_packageIsNNBD` has been removed. Although the
comment for this field said it was tracking whether the package was
opted in to null safety, it actually had no effect (since the only
code path that would set it to `false` was after the
`UnimplementedError` and thus unreachable).
Change-Id: I3cef2f0a7203941b22e37e3ae1bee14806cfc9c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171621
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This CL adds the result register used for subtype test cache stubs to
TypeTestABI. This avoids the hardcoding of the register per-architecture
and allows GenerateCallSubtypeTestStub to be unified into a single
implementation for non-IA32 architectures.
Since the register arguments to GenerateCallSubtypeTestStub were always
either kNoRegister or the same TypeTestABI register across all calls,
those arguments are removed and the appropriate TypeTestABI registers
are considered hardcoded input registers and either implicitly (for
non-IA32) or explicitly (via the stack on IA32) passed to the subtype
tests cache stub being called.
TEST=Tested using our existing test cases, running debug (if available)
or release (if no debug available) trybots for all architectures.
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try
Change-Id: Id046f033022398547476fe6cd68920547ec407f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170095
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
The script's Usage text has the best description.
Change-Id: I6baf747a13a7655e40bc0158cb40ad965fa6ee3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171422
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Since this package is opted-in, the experiment is no longer needed.
Change-Id: Ie5b855cc7b180ebcc30a3a4cb4001bbdc82c9c39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171622
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
An upcoming breaking change will change the static type from `dynamic`,
and at runtime allowing either `String` or `Uri`, to having a static
type of `Uri`.
https://github.com/dart-lang/yaml/issues/97
Change-Id: I0abd4c99c0cb2ff3fa220ffd5e30cc5cb683516c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171440
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
All code which was tested now throws a TypeError in both
sound and unsound null safe mode.
Change-Id: I304dfa6b8683223562f8613f3d14823fccab35bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170439
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
We have currently two ways to shut down isolates from the outside:
* An embedder shuts down an embedder-owned isolate via
`Dart_ShutdownIsolate()`.
* An `Isolate.spawn()`ed isolate finishes the VM-owned message loop
and VM shuts it down.
The second mechanism uses almost the same as the first, but slightly
different. This CL makes us change the second one to call our normal
`Dart_ShutdownIsolate()`.
Approved failures that got revealed by moving canonicalization check
to all isolate shutdowns, see
Issue https://github.com/dart-lang/sdk/issues/44141
Issue https://github.com/dart-lang/sdk/issues/36097
Issue https://github.com/dart-lang/sdk/issues/44088
Change-Id: I58af0e9ae73842545e21edad23c106ea59b176b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170984
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Change-Id: I4ecec92d5d0d51e050e2d3a189eede439e5b8de3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171520
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Change-Id: I5883ce6e80d451b52073f3770fbdf971e7dcf18c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170692
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Simple calls to `List.generate` are expanded into a list allocation
and a loop. This generates better code for several reasons:
- There is no overhead for the function argument (closure allocation,
closure type, closure class)
- Global type inference is more precise since each List.generate list
is tracked separately, and the assignments in the loop give better
inference to the collection's element type.
To get precise element type inference, there are two new JSArray
constructors. Global type inference starts with the element type being
bottom for these elements, avoiding spurious nulls in the inferred
type.
Change-Id: I5efb90651ae3f9eb2e81af556704960cdf0b75c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168770
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
The spec string `Object` matches all native classes. The combination
of RegExp named groups and importing 'dart:html' in a small program
could result in a larger `.js` file than expected. Using `=Object`
fixes the excessive number of native classes matched.
Change-Id: I40ab8195d0edc24d05a748bc35c5f74f66272937
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171044
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
If the bound is not specified, CFE will use Object* in an opted-out library or Object? in an opted-in library, and not dynamic as before.
This workaround is therefore not needed anymore, and actually harmful as shown in the regression tests.
Closes https://github.com/dart-lang/sdk/issues/44136
Add regression tests.
Change-Id: I11a96cbebcb592f66f3965e38cb2411200df332b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171380
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
The 'isInvariant' property of ir.MethodInvocation nodes allows dart2js
to lower JSArray.add to Array.push in more cases. It is set in the
expansion of List literals.
Change-Id: I6c08ec449e6f7e2b2d839e9faeeff2c338f29e5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171080
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
This flag doesn't seem to be used anywhere, neither of
dart/flutter/golem/g3.
Main motivation is to remove the GC triggering code in
Isolate::MakeRunnable.
Issue https://github.com/dart-lang/sdk/issues/36097
Change-Id: If48072f62974dec5f7c19cc08be7904401e38a61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171282
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Change-Id: Ic209ecd3ec52380a9dd1f214be3b854a64e03d9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171283
Auto-Submit: Karl Klose <karlklose@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Now a `pub get` will be run implicitly if needed.
(This happens in getExecutableForCommand from the pub package).
Change-Id: I9eca9b6d8761a3035f21c0f86653c87710b9d229
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171281
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>