If a user program installs custom signal handling for SIGINT,
the DartDev instance may exit before its child, potentially causing
confusing behavior and 'zombie' children. By ignoring these signals in
DartDev, the DartDev instance will only exit once its child process
exits.
Fixes https://github.com/dart-lang/sdk/issues/42092
Change-Id: I04bf6d1f375b8bb3a4f7022f2c79ddde3bd5f414
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149643
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
This CL adds tests in language/external_abstract_fields, testing the
support for abstract instance variables, and for external top-level,
class, and instance variables. It is tested that the syntax of
supported declarations is accepted, and a number of non-supported
forms are rejected, and abstract fields are tested at run time as well.
The implementation of external fields is provided by an implementation
specific mechanism, and no tests are added for any such mechanisms
(that is, with external fields we only test errors).
This CL also updates the spec grammar Dart.g to include grammar
rules for the new kinds of declarations, and it has been verified that
the new tests are passing, respectively cause syntax errors, as
indicated in the test files.
The tests are a further development of the ones in
https://dart-review.googlesource.com/c/sdk/+/145862.
Change-Id: I13be746a05d5acf0117d8cb22151bd9863a71a78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148324
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Adds TODO comments in appropriate places for future work that will move
non-covariant type checks out of the closure body. Instead, the VM will
perform them in the invoke field dispatcher (or NoSuchMethodFromCallStub
if --no-lazy-dispatchers is used) when a dynamic call is detected.
This change has minimal negative effects on the code size. Here are the
code size change percentages for the Flutter Gallery in release mode:
* ARM7
* Instructions: +0.0391%
* ROData: -0.0040%
* Total: +0.0239%
* ARM8:
* Instructions: No change
* ROData: +0.0015%
* Total: +0.0004%
All other code size benchmarks are also <0.01% increase.
Bug: https://github.com/dart-lang/sdk/issues/40813
Change-Id: I4bf145803bb9e2d4ba5c22c12b6fd3bb5368441d
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-dartkb-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151826
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commits aff77e7e..e24f205d.
Due to a breakage in a Flutter roll, this CL stack needs to be
reverted. It should be reintroduced with changes to Flutter code to
compile with the changes in dart:html.
Breakage: https://github.com/flutter/engine/runs/828631927
Change-Id: I9c93c4eab823337d09d2e347015ad9ec402f2038
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152910
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Getter types need to be a subtype of the setter type, so if getters
are nullable due to incompatibility, the setter needs to be as well.
This change makes those changes, updates documentation, and modifies
a template and test file.
Change-Id: I2130538bb4005b3553eb7951af022c1c2ed59c1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152607
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Changes tests that use native getters that have changed to
nullable.
Change-Id: I469b283f65dc45b2359a850b09fc7f32f88086fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152405
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Change-Id: I3c9fb55e49630372d232d1dcf12ab323badac42a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152846
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
This CL adds support for type inference on type aliased invocations of
factory constructors, redirected as well as non-redirected, and it adds
some tests using this feature.
Additionally, this CL resolves a couple of issues that arose when the
directory nonfunction_type_aliases was migrated to null-safety (by
means of two single line fixes, in 'usage*_test.dart').
Still missing: The shadow nodes should be eliminated in
_unaliasTypeAliasedConstructorInvocations and
_unaliasTypeAliasedFactoryInvocations, this will be done in a separate
CL.
Change-Id: Ic146bd16a02ca8f79c46b7df7c8dff7712f21189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152740
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
We should verify that element type is nullable every time length is
increased, not only when capacity is increased.
Fixes https://github.com/dart-lang/sdk/issues/42502
Change-Id: Id91c702a99028634da8c2d41ae0ceac521af2cf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152900
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
- Some of the package config tests for isolates were not ported in the
initial round, this CL ports these tests.
- lib_2/isolate/isolate_stress_test.dart is not ported as it is
currently skipped for the VM and was probably intended to be a
dart2js test.
Change-Id: I53c3641d2a83f2661ecdb8cd57a8c381234b06d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152940
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
A generalized stream which provides a controller for each listener.
Can be used to implement both broadcast streams and single subscription streams,
as well as any stream behavior between the two.
Change-Id: I7a75f8736ca6bc91ce266e768db68536efd24dfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150936
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Instead of highlighting the entire constructor, which might be long, we
now highlight just the keyword `const`.
Change-Id: Ie520db0a2fcaf05db79d9e49e08f06a5212fef7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152727
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Change-Id: I9930a6f0969249c6b1c59d694b76a28cbe3a6e90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152615
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
When we moved to make errors non-nullable in the async API, I added
legacy tests, but not NNBD tests because it is a static error in NNBD.
However, we've since started testing that null is caught dynamically
when flowing into those APIs from legacy code.
So this migrates those tests over.
Change-Id: I8002bacb45e947ef8c93dca10c7c1fd41afaa696
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152614
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
The annotation has no semantics related to these tests, and the tests
will be cleaner without the extra code.
Change-Id: I0f31a30af624d2af707eae3003acb09a742bef3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152612
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
https://dart-review.googlesource.com/c/sdk/+/145591 introduced a try
catch into FFI calls to call ExitHandleScope on the exception path.
However, we only need this try-catch if we actually need to exit the
handle scope on the exception path, which is not the case if we have
no handles in the signature. So this CL makes the try catch optional.
This speeds up ffi calls without handles (tested on JIT x64):
FfiCall.Uint8x01(RunTime): 206.4801280066068 us.
->
FfiCall.Uint8x01(RunTime): 203.7240782236708 us.
Also adds a test that checks that an exception can still be propagated
with Dart_PropagateError from native code when the FFI trampoline has
no try catch.
Change-Id: I9fac7078381c60fb8055b64fff29ea364fbc948f
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-nnbd-linux-debug-x64-try,analyzer-nnbd-linux-release-try,front-end-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151239
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Looks like this was added to lib_2 after the initial migration.
Change-Id: Ic56357cd99c9b369c38628f4527cfa84f50f5f72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152600
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Change-Id: I6cc37cc5aa7042aacabde4814aecdfe934876d7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152583
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
This CL adds some infrastructure that makes it possible to defer the
inference of type arguments for a type alias which is used to specify
an instance creation:
class B<X, Y> {}
class C<X> implements B<String, X> {}
typedef T<X> = C<List<X>>;
void main() {
B<Object, Iterable<num>> c = T(); // Infer `T<num>()`.
}
The CL contains an implementation for type inference in the case
where the target is a non-redirecting constructor.
There is not yet an implementation of type inference for the case
where the type alias ultimately resolves to a redirecting factory
constructor, and the shadow nodes are eliminated as null.
Change-Id: I9721b293dce37313e046a8339359e51c2d54b4c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150301
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
This reverts commit 038e981f89.
Reason for revert: Breaks some tests; visible changes to some web UIs.
Original change's description:
> Fix duration.toString() to conform the description
>
> Duration.toString() should return in a format of "HH:MM:SS.mmmmmm".
> But when `hours` is less than 10, toString() doesn't have the leading
> zero, which is "H:MM:SS.mmmmmm".
>
> The corresponding co19 issue: https://github.com/dart-lang/co19/issues/733
>
> Bug: https://github.com/dart-lang/sdk/issues/41737
> Change-Id: I2264171b2b37e89056695f7f821125a5f78d87fb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151163
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
TBR=lrn@google.com,zichangguo@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: https://github.com/dart-lang/sdk/issues/41737
Change-Id: I4d7ef5de9807e8e2b2a77c2171d1693b7527f671
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151848
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
If "CONNECT" is used in HttpClientRequest, it is supposed to create a
tunnel and reuse the socket. The socket should remain open instead of
being closed.
Bug: https://github.com/dart-lang/sdk/issues/37808
Change-Id: Ic765bdc6fe4d3e21b3117e882b38e3abae15ceda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148684
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>