Commit Graph

21307 Commits

Author SHA1 Message Date
Alexander Markov 061848e97e Cleanup misc remaining references to bytecode
Change-Id: I37c2dfb29a5bc4faf1478fb31623749cb8f67d67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169502
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-10-28 21:51:20 +00:00
Srujan Gaddam 2fd4b4f562 [dart2js, ddc] Emit native null checks in sound mode only
Bug: https://github.com/dart-lang/sdk/issues/42536
Bug: https://github.com/dart-lang/sdk/issues/42535

Since ddc would require a potentially breaking change to emit these
checks in unsound mode without opt-in and it's currently not possible
to emit these checks only in opt-in with dart2js, both are changed
to only emit checks in sound mode. In ddc, calling convention is
changed conditionally on sound mode as well to avoid emitting
unnecessary code in unsound mode.

Change-Id: I42f7bb5a53550f4ee5412fbbbfb6ca533c393e96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169247
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-10-28 21:35:45 +00:00
Daco Harkes 312a572ade [vm/ffi] Fix prepare_flutter_bundle.dart
It now includes /ffi_test_functions_generated.cc and prints
instructions on how to use the generated bundle.

This CL adds some TODOs and deletes the non-migrated copy that was in
the NNBD folder.

Finally, this CL disable a check that fails because of static linking
on iOS.

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

Change-Id: Ie85d92568bb95eaafd2991725a1a31cdecd246be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169402
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-10-28 21:33:35 +00:00
Srujan Gaddam ed009afc4c [package:js] Add static errors for invalid extends
Bug: https://github.com/dart-lang/sdk/issues/37896

dart2js disallows JS interop classes from extending Dart classes,
and ddc does not work as expected. Dart classes that extends JS
interop classes can't be declared in ddc and throw an error on
usage in dart2js. This CL adds static errors for both cases.

Change-Id: I72001d2e8bec046c0e1ab4c06fed8fcf84ade259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164840
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-10-28 16:04:15 +00:00
Martin Kustermann a99904a45a [vm/nnbd] Explicitly opt-out test helper scripts from null safety to prepare for NNBD turned on
Closes https://github.com/dart-lang/sdk/issues/43947

Change-Id: I5c7abdd25e15f4ddaef11b45af294e7345d7cf99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169321
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-10-28 11:00:57 +00:00
Clement Skau c486a07b02 [VM] Fixes yield* exception handling in sync*.
This adds a mechanism similar to that used in async functions where
exceptions are caught in the synthetic code and passed into the
generated body to be rethrow'n.
This ensures the exception is throw'n from the same place as the
original yield*, as per the spec.

Bug: https://github.com/dart-lang/sdk/issues/42466
Change-Id: I054b9db568a49b046b6bb49f3e775bf093f83950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/160221
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-10-27 06:46:27 +00:00
Daco Harkes 957487b5da [test/ffi] Structs by value 1-byte aligned
The 3 and 7 byte tests in
https://dart-review.googlesource.com/c/sdk/+/168829
had their sizes rounded up to the next power of two due to alignment of
fields inside the structs.

In order to properly exercise behavior on win32, win64 and iOS, this CL
changes those structs to only have uint8 fields to prevent alignment
influencing the sizes.

Old tests are renamed to exercise the size rounding due to alignment.

This also swaps around the two 9byte structs to have consistent naming
with the new 3 and 7-byte tests.

structs_by_value_tests_confguration.dart is the only non-generated file.

The tests are tested in the dependent CL. Tests are ignored in status
file and are un-ignored in dependent CL.

Tests for https://github.com/dart-lang/sdk/issues/36730.

Change-Id: If47cfcaebe56f43d50265f0d6e2749c56fe7b195
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169101
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-10-26 17:26:56 +00:00
Daco Harkes b62e715073 [test/ffi] Passing structs by value test generator
Split off from https://dart-review.googlesource.com/c/sdk/+/140290/33
to make that CL smaller and review the test generator separately.

Because of the amount of corner cases in the calling conventions that
need to be covered, the tests are generated, rather than hand-written.

The tests are tested in the dependent CL. Tests are ignored in status
file and are un-ignored in dependent CL.

Change-Id: I5507f52229793fdf07da3066b49045fdb703a69d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168829
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-10-26 12:01:16 +00:00
Brian Wilkerson 6b3f3403ec Unify three diagnostic codes for documentation purposes
Change-Id: I46326160fedb26c92843698dd6513b9fe87e32dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169041
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-10-26 04:24:55 +00:00
Jens Johansen 5a6129406f [parser] Consistently disallow 'late' without 'var', 'final' or type
Fixes https://github.com/dart-lang/sdk/issues/43811
Fixes https://github.com/dart-lang/sdk/issues/43812
Fixes https://github.com/dart-lang/sdk/issues/43813

Change-Id: I39de527883d33459694ec0f91b769676eb52d54b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168641
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-10-23 06:28:51 +00:00
Srujan Gaddam 1c1fef8d68 [dart2js] Add negatable flag for native null assertions
Allows build systems to turn off native null assertions if the
default value ever changes.

Change-Id: I7265b2328e4e8834d8bbe19159fcac7ea916b451
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168763
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-10-23 00:07:21 +00:00
Srujan Gaddam d201c33f69 [ddc, dartj2s] Exclude null checks on non-web native members
Modifies ddc and dart2js logic to only include null-checks on native
members inside the web libraries. Modifies tests to account for this
change.

Change-Id: If9c164fb90b761d3c4611d87ffeb02c2fa884457
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168585
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-10-23 00:07:21 +00:00
Alexander Markov f4afdb3d76 [Tests] Skip slow co19 tests on simarm* and aot/debug configurations
These tests involve large list literals which are very slow to
compile in AOT/debug mode, or they perform a large amount of work
which is too slow on simulated architectures (simarm, simarm64).

Closes https://github.com/dart-lang/sdk/issues/43614

Change-Id: Iafe1407247cc69e641d1e63f47b4c3d9f6eea35f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168782
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-22 17:09:40 +00:00
Liam Appelbe e2840ed07a [wasm] Basic WASI support.
Enabling WASI when building an instance sets up the default WASI
imports, and can optionally capture stdout/stderr. I'd like to set up
something similar for stdin, but Wasmer doesn't support that yet.

I also improved error handling in WasmRuntime by adding Wasmer's last
error to the thrown exceptions where appropriate.

Bug: https://github.com/dart-lang/sdk/issues/37882
Change-Id: I2d8546e878bcb43c7093490eac085aa62d318e96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167904
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-10-20 19:24:05 +00:00
Jens Johansen 9b28b6e503 [tests] Add const-big-set-literal test
Const version of regression test for #43756

Change-Id: Ie21be7985e420290cf1c286fd299d5e8962f757e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168483
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-10-20 11:07:23 +00:00
Erik Ernst a917cae88c Add further cases to metadata test
Adding static methods/getters/setters to class/mixin/extension,
instance getters/setters/operators to mixin/extension, new-syntax
type alias.

Change-Id: I4e3f168d8db9c5f168b138c847bccf948c05c567
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168080
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-10-19 16:10:08 +00:00
Jens Johansen bf46063e16 [tests] Add big-set-literal tests
Regression test for #43756

Change-Id: Iaf2cca5ae5440d3604c8c3311ad443f63355dc33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168340
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-10-19 09:23:26 +00:00
Liam Appelbe 89dbc35fca [wasm] Wasm function imports.
I switched from a WasmImports object to a builder pattern:
module.instantiate().addMemory(...).addFunction(...).build();

Bug: https://github.com/dart-lang/sdk/issues/37882
Change-Id: I381aa0f7df1fa006ce8d051cd5b4a1bcc1835e46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167460
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-10-16 23:16:42 +00:00
Paul Berry f0052ef52e Add cycle detection test cases for nonfunction type aliases.
Change-Id: I4375c3374ba5d51b4431dbe22a0e8c867a4eb03d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167720
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-10-16 23:13:42 +00:00
Lasse R.H. Nielsen a15025fc85 Harden StreamIterator against out-of-order events.
Users have seen event being sent *during* the `listen` call
to the underlying stream. This caught the `StreamIterator`
in an unanticipated state (subscription wasn't available yet).

Sending events during a `listen` call can currently happen
using a synchronous broadcast stream controller adding
events in the `onListen` callback.
That should be fixed so that broadcast stream subscriptions
are treated as paused during the `onListen` call like
single-subscription streams already are.

This change hardens the class against that particular malpratice,
but it's still possible to get into inconsistent states if the
`listen` call somehow manages to call back into the same
stream-iterator again. So, don't do that.

(The class also assumes that no stream will send events/call callbacks
* while paused.
* after cancelling
* after a done event
* while delivering another event.

If a stream does so, things will still crash.
It is believed that no platform stream will do any of these.)

Fixes #43779.
BUG= http://dartbug.com/43779

Change-Id: If47065cfa9a1115425fdf51b147f2ed7154fef99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167800
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2020-10-16 20:20:02 +00:00
Alexander Markov dea3fa7b8c [vm/compiler] Allocation sinking of arrays and typed data objects
JIT mode: ParticleSystemUpdate +44-52%
JIT mode with null safety: ParticleSystemUpdate +40-44%

In AOT mode a few methods from package:vector_math are not inlined
in ParticleSystemUpdate benchmarks, which prevents allocation
sinking optimization.

Closes https://github.com/dart-lang/sdk/issues/43228

Change-Id: I28d5816e643e4cfffe4b4fb7db5db5a3aa72499c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164805
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-10-16 20:05:02 +00:00
Erik Ernst 016ebdd03a Add tests for metadata in all locations, cf. grammar
Change-Id: Ibaa2bcd014257c6ec7c756d352e55d48f8a4a902
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167801
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-10-16 08:19:42 +00:00
Srujan Gaddam 5a28f14a25 [package:js] Add test for inheritance between classes
Adds a test to verify that JS interop and anonymous classes can
properly extend one another and that member access behaves as
expected.

Change-Id: I98b77444363ec3f985a9a10f3716e15a7fd970f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164882
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-10-15 23:15:11 +00:00
Erik Ernst 00a28b5797 Fix test with syntax error
This CL changes `late x;` to `late var x;` in a test. Apparently, this
syntax was considered correct and the front end and analyzer accept it.
However, it is a syntax error, and this CL corrects it. The fact that
the tools accept it is reported as SDK issue #43811.

Change-Id: Iaa2fe56fe99d3702345368a54a7389a59288515c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167804
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-10-15 21:35:41 +00:00
Alexander Markov fc317794dd [test] Fix standalone/io/windows_environment_test for NNBD
This test launches Dart sub-process and should pass VM options like
--enable-experiment=non-nullable and --sound-null-safety, otherwise
sub-process will try to run migrated Dart code without appropriate
flags.

Also, fix NNBD compile-time error in
tests/standalone/io/windows_environment_script.dart

Change-Id: I5bc0bf4ba32a3933c236c1a2f04cea3d7a1fa31a
Fixed: 1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167722
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-15 18:32:40 +00:00
Johnni Winther 16f7ce8e57 [cfe] Warn on null aware access on this and static members
Closes #43703
Closes #43461

Change-Id: I861462b5fcf31d5459c17cbe1604ce285c359dec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167563
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-15 08:48:33 +00:00
sgrekhov 24ca7b5284 [co19] Skip 'main' optional parameters tests on dart2js
Fixes https://github.com/dart-lang/co19/issues/952

Change-Id: Ic350695354f2c0c585e15c599ec227bbe7875cb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167560
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-10-15 07:45:52 +00:00
Alexander Markov 4a6e2ae6e2 [Test] Skip standalone/entrypoints_verification_test on simarm_x64
This test uses native extension (shared library) which is not included
into cross-word builds.

Change-Id: I777f28f55dde96556590b8ef3a5673be6caa253d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167504
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-14 16:51:07 +00:00
Alexander Markov 89ee3c8e2a [test] Fix lib/mirrors/library_uri_io_test to pass when running not from source
This test was assuming that Platform.script would be equal to library
URI, but this is not the case when running from a dill file or a
snapshot.

Change-Id: I0ff2249b5b5301d6463ceca48097df7cb64e78b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167501
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-14 00:54:17 +00:00
Alexander Markov 18b2f6db03 [test] Fix lib/isolate/no_package_test for Windows
The test was using file path as an URI, which is not correct on
Windows.

Change-Id: I097821a1090016994baf7bab66440ca83a58564f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167500
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-13 23:56:50 +00:00
Liam Appelbe cff78bed87 Reland "Switch wasmer FFI boilerplate to new API"
This reverts commit 0c3d3da6ce.

Un-deleting the LICENSE file, to fix the dart->flutter roller.

Change-Id: Iee44c24e7cdb5c03f4ae131d08451fae2e996f49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167201
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-10-13 19:30:58 +00:00
Joshua Litt d2b0e39144 [dart2js] Add stressful unit / integation tests for deferred loading.
Change-Id: I456af72961803bb24b089c6f3655e9d8ef2a7396
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167044
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-10-13 17:55:58 +00:00
Erik Ernst 7e75ea38a2 Discriminate more precisely in least_upper_bound_function_test, f4
language/least_upper_bound/least_upper_bound_function_test.dart would
succeed if in `f4` the type of `z` were any top type. The type actually
expected is `Object?`. This CL adds some extra steps to `f4` to ensure
that it rejects other top types.

Change-Id: Ie2d042d54e83bf3e9c9db0c432ca32e90c5bbc6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166850
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-10-12 16:39:02 +00:00
Alexander Aprelev 340f78eab3 [vm/io] Add a test for nonblocking ssl certification evaluation.
This is follow-up to a6dafabb88.

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

Change-Id: I4da732ab08235a1f549d45c7fa5fb87db672e2aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166701
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-10-12 15:06:52 +00:00
sgrekhov ec7eb45058 [co19] Instantiate to bound typedef static tests enabled
Change-Id: Ifa942d5ebfe7410ba25284a7972c7e2c05ceff16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166633
Reviewed-by: Alexander Thomas <athom@google.com>
2020-10-10 07:17:33 +00:00
Alexander Aprelev 0c3d3da6ce Revert "Switch wasmer FFI boilerplate to new API"
This reverts commit 9d0ae7d017 as it broke dart->flutter roller's flutter license script.

Change-Id: If523b9b88631e1eca0fef3612387005921481222
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166981
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2020-10-10 05:56:29 +00:00
Alexander Markov e9aa232066 Remove remaining tests for bytecode mode
Change-Id: I9690bd8a9bdcf16963424c64c1b80628e50fa28a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166922
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-10-09 22:30:19 +00:00
Paul Berry 8857836b62 Ensure that flow analysis sees the correct type of late-lowered local variables.
Change-Id: Id6f3d2ddff5b1d6b496710103d0b557eaed4dc08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166791
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-10-09 21:14:07 +00:00
Liam Appelbe 9d0ae7d017 Switch wasmer FFI boilerplate to new API
Broadly speaking, the new API is very similar to the old one. The only
public facing change is that you can't make a memory by itself anymore.
You need to construct if from a store, which is owned by a module.

The new API no longer passes structs by value, so I was able to delete
the wasmer_wrapper.cc, and the files I had copied from the wasmer repo.

The new API is also a lot more verbose, so it made more sense to write
a script to generate the FFI boilerplate, rather that write it all
manually.

All the migrated tests that were passing before this refactor are still
passing.

Bug: https://github.com/dart-lang/sdk/issues/37882
Change-Id: I52ca54b982a27f1d851c630d3e09833b8810060c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164081
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-10-09 19:43:57 +00:00
Daco Harkes d650ea90c4 [vm/ffi] Fix alignment of Uint64 fields in structs on some ABIs
Affected ABIs: ia32 Linux, ia32 Android, ia32 MacOS, and arm32 iOS.

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

Change-Id: I35f719abb69bb46d99f647d66847e3d5874d9371
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-ia32-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166843
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-10-09 16:32:08 +00:00
Alexander Thomas 679e2a2e21 [infra] Use Cq-Include-Trybots instead of git cl try for co19 rolls
Cq-Include-Trybots allows the CQ to submit the rolls safely and allows
for editorial control of which tryjobs to run for a given roll before
starting them.

Also formats the jq program according to go/bash-style/#s5.3-pipelines.

Change-Id: Ib072c971b06bd1e4bbff05887c8a84434c5949ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166637
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-10-09 12:45:32 +00:00
Erik Ernst a369992f4b Corrections in lub tests, cf. #43717, #43720.
The tests least_upper_bound_{futureor,function}_test.dart are corrected:
The expected least upper bound was changed in one case in each test,
because the case matches a rule earlier in the ruleset, so the new rules
are not used in these cases.

Change-Id: I1f5f303ccde10af6084771a90d92d81d636909d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166635
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-10-09 11:22:46 +00:00
Johnni Winther b2e33ee550 [cfe] Check getter/setter types on top level and extension members
Closes #43714

Change-Id: I07ee20cb3a65758dda2139e965aeb4fb36cf38c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166628
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-09 07:16:06 +00:00
Erik Ernst 2ffa46326b Add test dealing with UP on types involving FutureOr
Cf. spec change https://github.com/dart-lang/language/pull/1254,
commit ae340c7dcc62d375bd8df9fd4cb0d669d84478d2.

Change-Id: I28c950ee37c21e138fb7148950b0404004086eff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166626
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-10-09 07:05:16 +00:00
Johnni Winther 4d1e0378c9 [cfe] Update test expectation for number_operator_error_test
Change-Id: I43cda6ca3f57818f9afb0dd33ae9b040f08f384a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166630
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-10-09 06:27:16 +00:00
Johnni Winther 5a2a435b6e [cfe] Use combined member signature for override inference.
Closes #43381

Change-Id: Id3ba97d717556f807eac1115e1c3570662cab87c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166240
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-08 15:29:05 +00:00
Johnni Winther 383b470d39 [test] Update never_runtime_check_nnbd to match new expectations
The test was written when a more disruptive solution for the unsoundness
fix was planned. A more lenient solution was found and the test is updated
accordingly.

Closes #43707

Change-Id: I31936fdc3aa0ae23fddd72c850eca5da50b22352
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166620
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-08 15:08:05 +00:00
Erik Ernst 2d92a26cca Test error for -e and ~e when e is potentially nullable
This verifies that the operators `unary-` and `~` do not participate
in null-shorting. Cf. https://github.com/dart-lang/language/issues/1081.

Change-Id: Iba446724f00c1c4aaedb4be4425e69fb52cdb5c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166627
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-10-08 15:01:55 +00:00
Erik Ernst 87dd7c03e1 Add tests for least upper bound spec change #1195
https://github.com/dart-lang/language/pull/1195 changes the UP function
such that it uses the greatest closure with bounded and promoted type
variables, and adjusts the catch-all rules about function types (used
with `Function(int)` and `String` and other "otherwise" cases).

This PR adds tests for the updated rules.

Change-Id: I793b85ceec76105d013c03e8d9bccdd187bb476f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166101
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-10-08 10:49:33 +00:00
Paul Berry e933e91aaa Reland "Flow analysis: promote to non-nullable on initialization"
This is a reland of 6a1c54ec30

Original change's description:
> Flow analysis: promote to non-nullable on initialization
>
> When flow analysis encounters a variable declaration of the form `T? x
> = expr;`, if the type of `expr` is `T`, then the variable is
> immediately promoted to type `T`.
>
> Fixes #43099.
>
> Change-Id: Ia206fe0d50e2fdd9bdf637e13c85633d8490dbcc
> Bug: https://github.com/dart-lang/sdk/issues/43099
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163841
> Commit-Queue: Paul Berry <paulberry@google.com>
> Reviewed-by: Bob Nystrom <rnystrom@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>

Bug: https://github.com/dart-lang/sdk/issues/43099
Change-Id: I7530bb0f7c24674a7b500558b89d50b35e045aca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166305
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-10-07 13:14:55 +00:00