Commit Graph

2071 Commits

Author SHA1 Message Date
Srujan Gaddam 8690bb5653 [dart:html] Change late finals to external getters
Late final fields in the JS classes in js_typed_interop tests are
changed to external getters instead.

Change-Id: I5ed17e18b5fc59bd7267ac5f8ebda649c6fb21e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142722
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-04-07 18:44:06 +00:00
Srujan Gaddam 89e7cf3357 [dart:html] Fix named args in js_typed_interop tests
Closes https://github.com/dart-lang/sdk/issues/41361

Several named args were non-nullable with no default value.
Fixes those instances and transforms some finals to late
initialization.

Change-Id: I2b223e6a8618ff3e98ced98a72f6bb87db1fe1c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142555
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-04-07 01:05:18 +00:00
Srujan Gaddam a925f4770f [dart:html] Remove 2.7 annotation from lib/html
Strips out the temporary annotation so all the tests without
NNBD related changes can run in strong mode.

Change-Id: I88f18916f0c5a45a80eddb73941db19984f0bfcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140652
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-06 20:41:14 +00:00
Srujan Gaddam 4d4846c57a [dart:html] Migrate tests with only null asserts
Remaining tests that don't belong to any particular test
suite, and only needed null asserts to be migrated.

Change-Id: I05141d60e7b50653aa9633e14e832e91d9116408
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140651
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-06 20:41:14 +00:00
Srujan Gaddam 5b2482004b [dart:html] Migrate tests that need changes to NNBD
Remaining tests that don't belong to any real test suite, but
need some changes beyond just null asserts to be migrated.

Change-Id: I91c0cb02eb72ada572a10c567b5d8bac596b16a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142445
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-06 20:41:14 +00:00
Srujan Gaddam 156e1c84c8 [dart:html] Migrate more js tests to NNBD
Missed by the migration tool on the previous js CL.

Change-Id: I43eb70ed6ecde3b624a951d0e8dd24424935ccf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142444
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-06 20:41:14 +00:00
Srujan Gaddam d3c60e0342 [dart:html] Migrate html tests with dynamic list conversions
Some tests where the list semantics aren't obvious in what we
want in the migration to NNBD.

Change-Id: I30b2d9cc5c0ea4ea360032b85ef5e48b8db27558
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142267
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-06 20:41:14 +00:00
Srujan Gaddam 16567ab59b [dart:html] Migrate htmlcollection_test to null-safe
Change-Id: I68a7874cc0afda861cb002901f7db0b58ad4be38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142266
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-06 20:41:14 +00:00
Alexander Markov df4f53adc1 [tests/nnbd] Fix lib/async/zone_error_callback_test for NNBD strong mode
The following tests began passing:
dartk-strong-linux-release-x64:lib/async/zone_error_callback_test was fixed (RuntimeError -> Pass)

Change-Id: I67118d4023cf60737c2434b005007121dd182aff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142402
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-04-03 21:47:37 +00:00
Alexander Markov a0f356b1f2 [tests/nnbd] Fix lib/isolate tests for NNBD strong mode
The following tests began passing:
dartk-strong-linux-release-x64:lib/isolate/issue_21398_parent_isolate_test/0 was fixed (RuntimeError -> Pass)
dartk-strong-linux-release-x64:lib/isolate/issue_21398_parent_isolate_test/1 was fixed (RuntimeError -> Pass)
dartk-strong-linux-release-x64:lib/isolate/native_wrapper_message_test/0 was fixed (RuntimeError -> Pass)
dartk-strong-linux-release-x64:lib/isolate/native_wrapper_message_test/1 was fixed (RuntimeError -> Pass)

lib/isolate/stacktrace_message_test didn't start passing, but it now
fails in the same way as it fails on legacy bots.


Change-Id: I8514f9f7e85e27f658ef44c5e167bf3709f3c672
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142401
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-04-03 21:34:27 +00:00
Srujan Gaddam f144d5fdca [dart:html] Migrate css tests to NNBD
Change-Id: Ia2c76116ad83abbea9721cf5dd812eeb7a47ad71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140650
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-03 17:43:57 +00:00
Srujan Gaddam 9b2d947786 [dart:html] Migrate indexeddb tests to NNBD
Change-Id: I5fcd2d53435c70fc90b46c34ea5fbf5f17c450fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140649
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-03 17:43:57 +00:00
Srujan Gaddam 3438b33dce [dart:html] Migrate custom_element tests to NNBD
Change-Id: I8554e2e41d56df403d73b34e38636e5108773195
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140648
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-03 17:43:57 +00:00
Srujan Gaddam 364db086ef [dart:html] Migrate fileapi tests to NNBD
Change-Id: I4c653fcac0f0a2c5ff7dc5b00f794fba4c3fc028
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140647
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-03 17:43:57 +00:00
Srujan Gaddam 39509bae5f [dart:html] Migrate html js tests to NNBD
Change-Id: I01cf3de95f4d7c67f97d440187a2d7254c7daecc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140646
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-03 17:43:57 +00:00
Srujan Gaddam 73b325c419 [dart:html] Migrate element tests to NNBD
Change-Id: Ie7477c232f3f28c7fe597da7d5338ac27a2e33ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140201
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-03 17:43:57 +00:00
Srujan Gaddam dea080253a [dart:html] Migrate custom tests to NNBD
DDC should skip some of these by default from the status file,
so these were tested using dart2js in strong mode.

Change-Id: I10a9096a9af7e394c416d26530ac42646991ddc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139964
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-03 17:43:57 +00:00
Alexander Markov b51ddda9d1 [tests/nnbd] Fix lib/isolate/function_send* tests for strong mode
When using Future.then with onError callback return value of onError
should agree with onValue callback. Inferred type of 'throw ...' is
Never, so Future.then(() => throw, onError: ...) will fail in strong
mode if onError callback returns null.
This can be fixed by explicitly specifying result type as a type
argument of Future.then.

The following tests began passing:
dartk-strong-linux-release-x64:lib/isolate/function_send1_test/0 was fixed (RuntimeError -> Pass)
dartk-strong-linux-release-x64:lib/isolate/function_send1_test/1 was fixed (RuntimeError -> Pass)
dartk-strong-linux-release-x64:lib/isolate/function_send_test/0 was fixed (RuntimeError -> Pass)
dartk-strong-linux-release-x64:lib/isolate/function_send_test/1 was fixed (RuntimeError -> Pass)
dartkp-strong-linux-release-x64:lib/isolate/function_send1_test/0 was fixed (RuntimeError -> Pass)
dartkp-strong-linux-release-x64:lib/isolate/function_send1_test/1 was fixed (RuntimeError -> Pass)
dartkp-strong-linux-release-x64:lib/isolate/function_send_test/0 was fixed (RuntimeError -> Pass)
dartkp-strong-linux-release-x64:lib/isolate/function_send_test/1 was fixed (RuntimeError -> Pass)

Change-Id: I9a904a2c2bc577348fd923acb94e87a90c75da73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142262
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-04-03 15:58:16 +00:00
Sigmund Cherem 795c0b1b64 [ddc, dart2js] Fix signature of js_util APIs expecting a constructor.
Since JavaScript constructor functions are not valid Dart functions,
they should not be expected to have a Function type.

For context see: https://github.com/dart-lang/sdk/issues/41259

Change-Id: I9092700ad60712f604cec7e5cf0189b23024839a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142321
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-04-03 04:54:56 +00:00
Srujan Gaddam 1d44ef07c1 [dart:html] Copy and rename lib_2/html to NNBD.
Added annotations such that these tests won't fail when submitted.
Added copyright notices if there isn't a copyright notice.

Change-Id: I51ae347d44875cdfa1c6d0dad1bc41e00ea443bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139963
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-03 00:36:56 +00:00
Alexander Markov 72f182d2bf [tests/nnbd] Fix lib/convert/chunked_conversion_utf88_test for strong mode
In strong mode it is no longer valid to grow the list of non-nullable
elements using x.length = y. The test is updated to add elements to the
list in order to grow it instead of using length setter.

The following tests began passing:
dartk-strong-linux-release-x64:lib/convert/chunked_conversion_utf88_test was fixed (RuntimeError -> Pass)
dartkp-strong-linux-release-x64:lib/convert/chunked_conversion_utf88_test was fixed (RuntimeError -> Pass)

Change-Id: I5e30e6f92ae30bf06ebada4a6c3686cc7986343e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142281
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-02 20:57:29 +00:00
Ryan Macnak e7c6a72760 [test] Update use of Null as a bottom type to Never.
Change-Id: Ied7176bf9bd1dafeb2b6e7e764361d2e1b1f460e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141363
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-27 19:49:22 +00:00
Johnni Winther 4150349c7c [cfe] Handle throw in return type inference
Closes #41156

Change-Id: I6f5360ccf3f05c2f59de5db703d90431e0d61e7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141100
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-03-27 15:59:27 +00:00
Liam Appelbe 70f6e6553c [nnbd/test] Fix tests that are failing in strong mode
It seems that there's some fiddliness when writing error handling
lambdas in strong mode.

async_await_sync_completer_test: The lambda was implicitly trying to
return the result of a throw, which was Never. I've switched it to this
syntax, which implicitly returns Null instead.

stream_iterator_test: The error handler needs to return a Bool, for
compatibility with the Future.

I'm open to suggestions for cleaner fixes to these bugs.

Change-Id: Ifc646a965d4b435512277da96ffb5e0b429114cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141164
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-03-27 00:14:40 +00:00
Ryan Macnak bc53ecefae [vm] Don't try to include resume_capabilities, exit_listeners or error_listeners in snapshots.
Change-Id: I50ed4b5e0adbf98f157fec0905dfbb2ce38cd285
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140942
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-25 23:12:47 +00:00
Lasse R.H. Nielsen 8760283247 New implementation of runZoned.
A combination of `runZoned` and `runZonedGuarded` where only the latter allows an `onError` parameter,
and only that has a nullable return type.

Retains the `onError` parameter on `runZoned` for now because it's too breaking to remove it until packages have been migrated off of it.
It will be removed in a follow-up CL.

Change-Id: If0e86c8d14e13fa089c66f4af975aeacb2616cf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137302
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-03-25 00:24:33 +00:00
Srujan Gaddam 9dba05d559 Copy lib_2 status files to lib
Copies over dart2js and ddc status files to lib.

Change-Id: I946a7fbb7a8aadc0912b709560c33af85e701045
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140182
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-24 17:58:15 +00:00
Erik Ernst e3af7e724f Update usage of int/String fromEnvironment
Breaking change 40678 requires the constructors int.fromEnvironment and
String.fromEnvironment to get new default values for the named
parameter `defaultValue`. This CL changes usages of these constructors
such that they do not depend on the default value, such that it
becomes a non-breaking change for code in the SDK repo to perform the
change in sdk and in sdk_nnbd.

Change-Id: I82af0e1f92d6cd3618b65c0c50d754ae8c39eb0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140284
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-03-24 11:19:14 +00:00
Johnni Winther 62f84880ef [cfe] Report error on missing return from non-nullable function
Closes #40520
Closes #40948
Closes #40425

Change-Id: I0aa3cfa51b410c90dd0bea963846eeb6b2e73efb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140540
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-03-24 08:21:36 +00:00
asiva 8246621d4d [Test] Fix calls to lib.loadLibrary() to not use lib.loadLibrary()! (see https://github.com/dart-lang/sdk/issues/41122)
Change-Id: Idf5ca500c58e5f08fe9fba1d402026488a7801d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140623
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-03-24 03:13:05 +00:00
Erik Ernst e9fa8fcd05 Adjust tests where a TypeError may occur to also expect ArgumentError
This change is required because said tests may throw an ArgumentError
until we have soundness.

Change-Id: I09f569bf4ade6936e672490ab6b539f1d15b7708
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140289
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Auto-Submit: Erik Ernst <eernst@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2020-03-20 17:23:19 +00:00
asiva c559da805a [Test/NNBD] Add remaining isolate tests to lib
Migrate tests to be null safe.

Change-Id: I29900379cb848a5acf01fceba6856f6233931099
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140162
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-03-20 03:42:00 +00:00
Leaf Petersen 7aace6fa60 Make StackTrace generally not nullable in migrated NNBD library.
Bug: https://github.com/dart-lang/sdk/issues/40130
Change-Id: I13aba0c2a3fa5b1c3d3995f075ffd38f03aca897
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139880
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-19 23:31:30 +00:00
Liam Appelbe 1a86f79198 [test] Fix some nits in strong mode mirror tests
Bug: https://github.com/dart-lang/sdk/issues/40968
Change-Id: I0c89352fbb53d0d76fbeba8dd177af5202593b18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140161
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-03-19 22:29:56 +00:00
asiva a980fb1849 [Tests/NNBD] - Migrate initial set of isolate tests for NNBD.
Fix all warnings/errors when running with --enable-experiment=non-nullable flag

Change-Id: I7673aa34466273d623f7a429d96b0ccd6b612dae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139980
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-03-19 20:07:58 +00:00
Nicholas Shahan fa77a43c76 [tests] Add analysis options file to migrated test directories
The intent of this change is to make editing the tests in these
directories more user friendly. When you open these directories in an
analyzer enabled editor it will produce results consistent with the
language features being used in the test.

Change-Id: I68e9cdc0e9fccfc360a2649261a5fdca042ec108
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139560
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-03-16 20:51:26 +00:00
Robert Nystrom 54ae6c123e Make minitest and async_minitest NNBD agnostic.
Fix a couple of errors when compiling those libraries as opted in to
NNBD.

Change-Id: I7dfb629d951d8531c8bed4e765950984e9291f44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139686
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-03-16 19:58:10 +00:00
Markzipan 7397c03670 [tests] Cleaning up strong mode tests.
Change-Id: I78ee36b245fb91f23775de87ce616445fbcbdb7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139039
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-16 16:54:56 +00:00
Ryan Macnak 8ed772d37f Reland "[vm] Fix some further mirror breaks with frontend NNBD checks enabled."
Without loadLibrary()! changes.

Change-Id: I78806547ac62fa806e99eb2d5e3f2041f20ce942
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139404
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-13 17:11:52 +00:00
Ryan Macnak 42e6cf4967 Revert "[vm] Fix some further mirror breaks with frontend NNBD checks enabled."
This reverts commit daf91f56b9.

Reason for revert: Analyzer and CFE disagree

Original change's description:
> [vm] Fix some further mirror breaks with frontend NNBD checks enabled.
> 
> Change-Id: I3c52dac2244c1f7eae59d85bc637cce2cbb3faa9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139302
> Reviewed-by: Régis Crelier <regis@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TBR=rmacnak@google.com,asiva@google.com,regis@google.com

Change-Id: I2f13dac7f2d7441f8db61543261ca28f500b8adc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139319
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-12 22:41:41 +00:00
Ryan Macnak daf91f56b9 [vm] Fix some further mirror breaks with frontend NNBD checks enabled.
Change-Id: I3c52dac2244c1f7eae59d85bc637cce2cbb3faa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139302
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-12 20:58:56 +00:00
Ryan Macnak f82e5fcbb1 [vm] Update some return types of mirror natives to be explicitly nullable.
Bug: https://github.com/dart-lang/sdk/issues/40997
Change-Id: I18e4bc4637f68ba5080c11d0a2c3c7bb43eb54bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139061
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-03-11 22:47:30 +00:00
Mark Zhou 684c53a6f1 [tests] Fixing some null-safe strong mode tests.
Change-Id: I131754d0183bed52e6443c2511197ed3b1e63b04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138887
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-03-11 15:41:59 +00:00
Robert Nystrom 63bff1a2fb Improve asynchronous test failures and async_minitest.
There's a bundle of improvements here:

- Show the stack trace of the failure when a test using async_minitest
  fails. The trade-off is that it now only reports the first failure.
  Collecting all of them didn't play nice with the stack trace
  deobfuscation the test runner does.

- Report the group and name of the test that failed when known.

- Fix as many double-reporting test result bugs as I could find. Also,
  in case that still happens, don't spew out a pile of useless JSON.

- Correctly wait for a test to complete even if it schedules its own
  asynchronous operations without returning futures.

- Generally simplify and clean some stuff up.

Change-Id: Ie020ae0b80a11764c455cf0ce24dfea09ca0adce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138903
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-03-11 01:12:48 +00:00
Nate Bosch 9d76737487 Remove support for --emit-metadata in DDC
This flag is unused and the behavior it enables was only useful along with
`dart:mirrors`.

- Remove the flag and the field on the options object.
- Prune code branches that are no longer reachable.
- Remove or inline some functions that became either empty or trivially small.
- Remove the manual check for a `dart:mirrors` import since this is handled by
  the CFE now.
- Remove references to the flag in tests.
- Remove test files which only existed to enable the flag for other tests.

Change-Id: I21bf594271fb4eeb5b73fcbf07da736e9e8d1f33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138018
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Nate Bosch <nbosch@google.com>
2020-03-05 23:26:13 +00:00
Ryan Macnak 2a5d0589ac [vm, gc] Verify the store buffer contains all old-space objects that reference new-space objects.
Speed-up ObjectSets.

Fix pointer verification before and after scavenging to set the correct mark expectation being on concurrent marking state.

Bug: https://github.com/dart-lang/sdk/issues/40780
Change-Id: Ic7ce6d5a829e41634083b0c274b9764da3f4b619
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137240
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-02-27 19:26:33 +00:00
Robert Nystrom 2225d1895d Fix timer_cancel_test.
It wasn't waiting for anything, so it would consider the test done
before the expectation was even reached. Went ahead and migrated it to
the simpler expect and async_helper libraries in the process.

Change-Id: I1d498980f34985bc5d54c5a514711143c689c199
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136080
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-02-15 02:40:00 +00:00
Robert Nystrom 0d34bf5571 Remove another one of the unittest-like libraries.
This one was literally only used for a single test. :-/

Change-Id: I316e17ecaf9a839b3c6f27ec86971a67ab52bbfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135782
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-02-13 23:36:13 +00:00
Ryan Macnak 0fde59b21d [vm] Further mirrors and test fixes.
Bug: https://github.com/dart-lang/sdk/issues/40497
Change-Id: Ieed8a51600f92fa4dc9137bf1f4ed58bb4cfa598
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134900
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-10 20:58:05 +00:00
Robert Nystrom 4a76bafa5a Migrate lib_2/typed_data/typed_data_view_sublist_test.dart to NNBD.
Change-Id: I70eb2c4ffcff7bf0ed788e9586694daca945e831
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134603
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-02-06 14:59:11 +00:00