NonNullableFix now communicates with DartFixListener through the
abstract interface DartFixListenerInterface; this will allow us to
build a version of DartFixListenerInterface that doesn't require the
analysis server.
Change-Id: I106d769b0e6ed49a916e2f1665a7e31a9a63be86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144471
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
The migration logic doesn't need to access the AnalysisDriver object;
it just needs access to the AnalysisSession (which the driver holds).
By changing the interface so that it requests the session directly, we
pave the way for making a version of the migration tool that doesn't
require the analysis server.
Change-Id: Ib99725bbb2c1728a4c57b46659e9d94cbfe65ee0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144470
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
This removes most of the imports from nnbd_migration to
analysis_server by replacing them with abstract interfaces that are in
turn implemented by classes in analysis_server.
Change-Id: I9be9a5bd69b1664f0fea9ff3b6ba4678f134f0e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144468
Reviewed-by: Janice Collins <jcollins@google.com>
This should fix the Windows failures from the 1.3.5 roll.
Change-Id: If0470b63ae301b5ce3a8a92458cf7388d5b5ddf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144686
Commit-Queue: William Hesse <whesse@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
In weak mode A<dynamic> is a subtype of A<Object>. Break out this
expectation into separate files for weak and strong modes.
Change-Id: I8d7b10d836eeb4a3221fe51ee7717aa544347b05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144682
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This causes the current state to fail to parse the (empty) success
result and falsely thinks things like rerunning the migration/applying
the migration result in an error.
Change-Id: Id68e089000e0be65278f687cd06112756ccb2a3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144668
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Previously, we said that the LUB of instantiated subtypes/subclasses for
a JS interop class was JavaScriptObject. This worked in most cases, but
failed when JavaScriptObject was not marked instantiated.
One way this could arise is if the only calls to JS_INTERCEPTOR_CONSTANT
were JS_INTERCEPTOR_CONSTANT(Interceptor). The LUB has to be some
interceptor, but JavaScriptObject (and its interceptor subclasses -
PlainJavaScriptObject, UnknownJavaScriptObject, and JavaScriptFunction)
are not instantiated, so we actually need to go even higher in the type
lattice.
In fact, the class hierarchy already knows how to do this - we need to
assist it a little in going from a JS interop class to JavaScriptObject,
but it can recursively compute LUB(JavaScriptObject) just fine.
Change-Id: I1e08faa42c42a43afc0b1cfafb5a012f5cd69193
Bug: https://github.com/dart-lang/sdk/issues/41330
Fixes: https://github.com/dart-lang/sdk/issues/41330
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144667
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
The current behavior is inconsistent across the backends so locking this
down in weak mode feels like a subtle breaking change. The VM currently
tries calling .iterable and throws a NoSuchMethodError. DDC throws a
TypeError.
Change-Id: Ib121a91f045a4f190be77dc57b5c216d818e0301
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144683
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Includes link to file an issue on github.
Change-Id: Ie0003651d3b3955766c6af016565418fd6ec86a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144523
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Brian- I didn't know if we wanted this in analyzer or analysis server, I am happy to move it if we want it in analyzer.
Change-Id: I7cf909da6d31009ca9be726829cee4342aa2f7a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144665
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Using strong mode with a mix of opted in and opted out libraries may result in a static call with bad arguments (missing required named argument) that may crash the VM with an assert fault. Ideally, we should emit code to throw a NoSuchMethodError when the code is executed. For now, we report the error as an informative exception during compilation instead of aborting.
The name of the enclosing function needs to be canonical when creating an instance of _FallThroughError when compiling a switch statement.
Change-Id: I50349fcc5b5036fbdec4697238b1e840de15ec07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144498
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Various optimizations to the null safe dart:async sdk to fix
performance regressions in dart2js.
Change-Id: I32c64b54be196ac18946ade45de6b352a20be832
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144302
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
This reverts commit 367ee916d6.
Reason for revert: Build failures
Original change's description:
> [ DartDev ] Generate dartdev.dart.snapshot for runtime builds and place it in the root of the build output directory
>
> VM developers rarely run the create_sdk build as it's significantly
> slower than just building the VM. Since DartDev is coupled to the VM, we
> should build it to ensure that there's no snapshot errors due to old
> snapshots from previous create_sdk builds.
>
> Change-Id: I7626e0f3c791f2a6e69830641d9abf043ec5138f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144465
> Reviewed-by: Jaime Wren <jwren@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
TBR=jwren@google.com,bkonyi@google.com,asiva@google.com
Change-Id: I36754f7830e637313a390218d16869a8528f75ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144622
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
VM developers rarely run the create_sdk build as it's significantly
slower than just building the VM. Since DartDev is coupled to the VM, we
should build it to ensure that there's no snapshot errors due to old
snapshots from previous create_sdk builds.
Change-Id: I7626e0f3c791f2a6e69830641d9abf043ec5138f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144465
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
The 2.5.2 release notes were never copied from stable to master.
Change-Id: I270227bb1701fbbf1df2f22de6f72d022214175a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144561
Reviewed-by: William Hesse <whesse@google.com>
In most cases, Code objects in the static calls tables are reachable
through other means. Thus, only add the overhead of walking the static
calls tables when we are in precompiled mode and
--retain-function-objects is disabled.
Also, when deduplicating Instructions objects in Code objects, only
adjust the entry points for the owning function if the Code object is
the current code for that function.
Fixes https://github.com/dart-lang/sdk/issues/41619
Bug: 41619
Change-Id: I51621ccfe1d1c8402088a1c24c56e0a74a02e1ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144560
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
We don't copy the saved debugging info over to the Android device,
so these tests can't succeed.
Bug: https://github.com/dart-lang/sdk/issues/41578
Change-Id: Ife11e31862457e7c7dba1c38f15c8c7d22eda414
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-android-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144562
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
This reverts commit 334dd63dac.
Reason for revert: There are unit test failures on Windows, including crashes of the formatter.
Original change's description:
> Update dart_style to 1.3.5.
>
> The main change is not directly user visible: it brings in the new
> Command used by the new "dart" tool to invoke the formatter. But there
> are also a handful of minor formatting changes.
>
> Change-Id: If7ce92e5a97d527749030714397b7b56773d9987
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142541
> Commit-Queue: William Hesse <whesse@google.com>
> Reviewed-by: William Hesse <whesse@google.com>
> Auto-Submit: Bob Nystrom <rnystrom@google.com>
TBR=whesse@google.com,rnystrom@google.com,athom@google.com
Change-Id: If6afb82e83c2e491c63e5fa0859b10daaa7d4f33
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144563
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
This will allow it to be used by the nnbd_migration package.
Change-Id: Ia628630cf156af7bbfdbe2e104254cf5a609ae91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144467
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
These fields were not being used. Removing them will make it easier
to move these classes into pkg/nnbd_migration.
Change-Id: I7528bc07e5efd3936a9c6fd1635415e139d5df43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144466
Reviewed-by: Samuel Rawlins <srawlins@google.com>
The main change is not directly user visible: it brings in the new
Command used by the new "dart" tool to invoke the formatter. But there
are also a handful of minor formatting changes.
Change-Id: If7ce92e5a97d527749030714397b7b56773d9987
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142541
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Symbolic and non-symbolic stack traces had separate ToCString
implementations with the same general structure, but those
implementations diverged enough to cause issues in certain async stack
modes. They are now merged, with the --dwarf-stack-traces-mode flag
checked where appropriate within the merged method.
Also, now non-symbolic stack traces do not include frames for Code with
invisible Function owners unless the flag --show-invisible-frames is
enabled. With this change, pkg/native_stack_traces no longer needs to
guess at which frames corresponding to Dart code should be treated as
internal.
Tested by adding --dwarf-stack-traces version of the tests
in runtime/tests/vm/dart/causal_stacks.
Fixes https://github.com/dart-lang/sdk/issues/41578
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try
Change-Id: I41a887129616c88acd7729492addf7364d95df33
Bug: 41578
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143816
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>