events on Developer stream.
Also removes intrinsic implementations for UserTag_makeCurrent to allow
for service events to be sent on UserTag change.
TEST=DartAPI_UserTags,pkg/vm_service/test/user_tag_changed_test.dart
Change-Id: I5dc9ee77c0048590d3c6e33a652eee5bc3bf522a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204440
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Add rename migrations for all the screaming snake case constants that
were renamed to lower camel case during the Dart 2 migraiton.
Rename the test from `file.dart` to `io.dart` so that we can test all
deprecations for the same import together. Add a test for the same
deprecations when imported through `dart:html`.
Change-Id: Iee91d88b1b11648e8c65cfcc8d2fcfabac3954ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203820
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
This reverts commit 613d8cd88e.
Reason for revert: order of initialization seems to affect core-jit
Original change's description:
> [vm] Avoid race between profiler and stub code initialization.
>
> TEST=ci
> Bug: https://github.com/flutter/flutter/issues/83939
> Change-Id: I1b1e5e759fbdb766bac5a89328d05389a712aa98
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204441
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: https://github.com/flutter/flutter/issues/83939
Change-Id: I7221e0ac1d9c9ab967c2068af8997ba8609a4784
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204623
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
When a local variable doesn't have an initializer we now look for
assignments to find a reasonable type. This will not only allow this
lint to be fixed but will increase the number of places the assist is
offered.
Change-Id: Ib278477d277557aff7d2ddbcca3230f2a0a144b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204521
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
This is a reland of 09d2025685
Fixes https://github.com/dart-lang/sdk/issues/23746
Intrinsics for sameRuntimeType wrongly assumed that types with unequal type arguments are unequal, which is not true:
1) nullability of individual type arguments may be different
2) one vector may be a prefix of the other vector
Note that the intrinsic for type equality did not make this assumption.
Case 2 above was not handled properly in the runtime.
TEST=added regression test
Original change's description:
> [VM/runtime] Handle generic types in intrinsics for type equality and runtimeType comparison.
>
> Generic types with equal class ids and equal type arguments are now considered equal by the intrinsics and a runtime call is avoided.
>
> Fixes https://github.com/dart-lang/sdk/issues/23746
>
> TEST=existing ones
>
> Change-Id: I668db119ac6d2525eac3a4f17a44f36c53b9dbf5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203143
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Régis Crelier <regis@google.com>
Change-Id: I53fc00d856ecd9d9b8d66b8da95285e6e0bd508e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204363
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
The `unawaited` function in `dart:async` is intended for use with the `unawaited_futures` lint which is hopefully going to be part of the Dart recommended set of lints.
The `ignore` extension method is there to provide an alternative if you even want to ignore errors from a future. By having both, it makes the distinction clearer and makes it easier to not think one can be used for everything.
Change-Id: Ib96ed5ff64ead4b228721e5210efa82f76119c9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200428
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
multiplyDefinedElementMatcher was used exactly one time, in
assignment_test; I almost removed it before finding this other use.
Change-Id: Iebcc04d897cc1337f97edbcfaa9f13385247ec35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-linux-debug-try,pkg-mac-release-try,pkg-win-release-try
Change-Id: Iccd49bf2ef18250e4b1c755594d3382eff38cee5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204504
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
This feature is also known as "explicit function tear-off type
instantiations."
This first change adds the merest support for function references, only
those with explicit type arguments.
This change also bumps all PubPackageResolutionTest tests to opt-in to
constructor tear-offs.
We support:
* top-level functions, static and instance methods, local functions and
local variables
* prefixed top-level functions
We error on:
* Wrong number of type arguments
* unknown identifier
Not included:
* static methods with explicit receiver
* prefixed static methods
* extension methods
* erroring on the validity of each type argument
* anything to do with implicit type arguments
* anything to do with constructor tear-offs
* anything to do with type literals
https://github.com/dart-lang/sdk/issues/46233
Change-Id: I8437f494f1c3d98cef667f675bb18e79a91c78c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203801
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This is a first pass at running inlined tests
(seemingly called doctests in for instance python) on internal CFE code.
This is not useful for testing the entire compiler for instance, but
could be useful for utility methods that take simple inputs and provide
simple outputs.
I've added tests to a few tings to try it out.
The syntax for it here is probably overly verbose but we could iterate
on that if need be.
The way it's done is that the test-code is extracted from the comments
and (virtually) "injected" in a weirdly named top level method of the
same file, which is then called from a "fake" main; the whole thing is
compiled to dill and run in an isolate.
(This is an application where making advanced invalidation support
adding top level methods would be great).
Change-Id: I7927822bca0ba68780458c40fe585882330e3b60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203242
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reduces VM code size by about 33k.
TEST=ci
Change-Id: Ifc74284fa69fe209ebf12566ca81bda765f19057
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202863
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
- Collects `VariableSymbols` for global variables and class fields.
- Add test cases.
Change-Id: Id79d60d01f84948c4c7b0bf9e54fbdd232da63da
Issue: https://github.com/dart-lang/sdk/issues/40273
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204086
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Since we anyways delegate all work to the same snapshot, this allows us
to maintain the argument parsing in a single location and makes it easier to
migrate existing usages of `dart2js ...` to `dart compile js ...`.
Change-Id: I24172fc87c040128d552cf68b98094e1c2f2c22f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204421
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
The rehash-on-null-index code has been dead since 84dbb6e0b6.
TEST=ci
Change-Id: I4eec641ca412b6b254360a049f20e67b2c9e9718
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204061
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
I removed the postmortem functionality in
203d0ed789 but instead of removing the
postmortem tool itself, I merely removed the body of its `main`
method. This CL finishes the removal.
Change-Id: I525afe40ab3b69b81edc28b0fdded06fed5710c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
AllocateHandleInstr returned a pointer to uninitialised memory.
This CL initialises the handle to sentinel.
This addresses the MSAN issue in
https://github.com/dart-lang/sdk/issues/46367.
TEST=dartk-msan-linux-release-x64 vm/cc/Dart_SetFfiNativeResolver
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try
Bug: https://github.com/dart-lang/sdk/issues/46367
Change-Id: I90b731dcb25ccdca77364fb0e97d040c954942d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203768
Auto-Submit: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Some refactoring in preparation for adding a bunch of additional pubspec validation to analyzer.
Change-Id: Iacda7fd098aeab01d3ed2bafc314f018a2eb6504
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204340
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
I've recently wasted a lot of time tracking down strange behaviors
that resulted from inadvertenly writing a migration API test
containing a static error. Failing the test early if there's an error
should avoid that problem in the future.
Change-Id: Idc9d84901a517ce9555fa3180f5c669aea449ea5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204180
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>