Commit Graph

21307 Commits

Author SHA1 Message Date
Srujan Gaddam 95bb6d8d19 Separate entered_left_view tests into separate test files
Note that groups are maintained since group-level setUps are applied to
each test. This removes html_individual_config.

Change-Id: I62e722252202372880d888161e9b7544b1194034
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138045
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-03-04 00:11:43 +00:00
Srujan Gaddam 18f366cf7e Move element_animate_test into separate test files
Remove html_individual_config and separate groups out into test files.

Change-Id: Icb0b81d97797bf78d19f100c92ce9582120beed6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138044
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-03 22:33:33 +00:00
Ryan Macnak 608604589c [vm, gc] Fix a lock order inversion detected by TSAN.
If a thread acquires both a freelist lock and the pages lock, ensure it acquires the freelist lock first.

Bug: https://github.com/dart-lang/sdk/issues/39611
Change-Id: Iadd7c270e18052aa32d883db1ddb8e4ebd1f0c49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138041
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-03-03 18:30:23 +00:00
Nicholas Shahan ab30452db5 [dartdevc] Add normalization of FutureOr types
These changes are also being back ported into the existing SDK
with minimal differences that will be gone when we unfork the
dart:_runtime library. In the current back port:
* FutureOr<Null>? is normalized to Future<Null>* instead of
  Future<Null>?.
* There is no runtime normalization of FutureOr<T?>?. This
  should have no effect since nullable types can not yet
  appear.

Fixes: #40611, #40720
Change-Id: Ib3ddffbf3778f0f571cf95f58b6142d3ee0bf59b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136160
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-03-03 16:59:56 +00:00
Vijay Menon 729ee5f725 [nnbd] skip runes tests that are no longer valid
Bug: https://github.com/dart-lang/sdk/issues/40674
Change-Id: Ie67ab796140e93667750055cc2623543cdafa702
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138000
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2020-03-03 16:16:21 +00:00
Dmitry Stefantsov c07d5d84b8 [cfe] Allow uninitialized non-nullable late fields
Change-Id: If0d1450c317b488e3299cfa031ab1a3d6953a7ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137787
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-03-03 09:50:27 +00:00
Liam Appelbe 149b799ae4 [vm] Check required flag during function resolution.
Bug: https://github.com/dart-lang/sdk/issues/39660
Bug: https://github.com/dart-lang/sdk/issues/38843
Change-Id: I2eb5f5ac38d7b1896db5c57399c42cdb41b16094
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137737
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-03-02 23:05:16 +00:00
Srujan Gaddam e797a066dc Separate canvasrenderingcontext2d into multiple tests
Separate each group into its own test file and have them refer to a
shared util file.

Change-Id: I3f3534b22cb6921da19eb9534af8c4ebd8a2d1b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137727
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-29 01:23:30 +00:00
Johnni Winther dda5bcee00 [cfe] Handle invalid uri in opt-out work-around
Change-Id: Id5e8ee4578d6ff245e1345500e58ee3f800130ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137782
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-28 11:47:51 +00:00
Robert Nystrom 434f7228bf Make parameter required to fix nullability error.
It is only used in one place and is always passed.

Change-Id: I8bdc46963ee9e10591edb951dc72e065ba5678cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137760
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-02-28 01:43:01 +00:00
Robert Nystrom 16f072c783 Migrate language_2/async to NNBD.
Change-Id: Id66e712eaf52fda2069ce5177aa091e373ad52c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134244
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-02-27 23:04:03 +00:00
Srujan Gaddam 3de553f7ef Remove html_individual_config from some html tests
Only landing the ones that don't introduce rename failures in this CL.

Change-Id: I052058a0168eaad71c3e10d804bce63d9f52b194
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137647
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-02-27 21:13:25 +00:00
Régis Crelier 21bc1ed76c [VM/nnbd] Allow instantiation of a non-nullable type parameter to a nullable type.
Change-Id: Icc3413cd5c285fa40ee5188f39837625d78b9e67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137427
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-27 19:48:23 +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
Mayank Patke 01064e7b6c [dart2js] Migrate DartTypes to use a wrapper representation for
nullability instead of a field/getter.

Change-Id: I2ca61d1b3a789f2ee4f34a99f66ae237bf9687ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137283
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-27 09:08:47 +00:00
Alexander Markov 77e1c72d04 [vm/nnbd] Type testing stubs in NNBD strong mode
Issue: https://github.com/dart-lang/sdk/issues/38845
Change-Id: I82e7a1b3c4220abdd2a215529230fbb158adbe9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135627
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-02-27 04:36:24 +00:00
Srujan Gaddam b3a1299f22 Revert "Remove html_individual_config from lib_2/html tests"
This reverts commit ccd2f7e7d1.

Reason for revert: CL broke other targets outside of try jobs

Original change's description:
> Remove html_individual_config from lib_2/html tests
> 
> Change-Id: I4a9684096f8e6d6a9af95f8a160c532e16f1be93
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137247
> Reviewed-by: Bob Nystrom <rnystrom@google.com>

TBR=rnystrom@google.com,srujzs@google.com

Change-Id: I762f7b7eec167dab3c96a03bd8df07b1c6ad7876
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137431
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-02-27 04:10:34 +00:00
Alexander Markov 82236bd6ab [vm] Fix incorrect inference of non-nullability from 'is' checks
Fixes https://github.com/dart-lang/sdk/issues/40792
Fixes https://github.com/dart-lang/sdk/issues/40795

Change-Id: I0af455040e05265a025b1a424c1aac30f3476f95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137426
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-02-27 03:35:34 +00:00
Srujan Gaddam ccd2f7e7d1 Remove html_individual_config from lib_2/html tests
Change-Id: I4a9684096f8e6d6a9af95f8a160c532e16f1be93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137247
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-02-27 02:25:56 +00:00
Ben Konyi 3d6c8ccbda [ VM ] Fix file_test type errors
Change-Id: I438ff8b7a1a66714415d88ade87611e8ffe829b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137430
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-02-27 01:30:31 +00:00
Siva Annamalai 48369b802d Revert "[ VM / NNBD ] Fixed standalone_2/io/file_test"
This reverts commit 099aa18654.

Reason for revert: Modifying a legacy test to make it run means it is pointing to a breaking change behaviour which we should note, considering that this test works in JIT mode I would think it is an issue in the AOT pipeline.

Original change's description:
> [ VM / NNBD ] Fixed standalone_2/io/file_test
> 
> Change-Id: I28dbe124125425bfa2460f30be974e165c6bdf7c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137360
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

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

Change-Id: I56ea1d96f8bbac5d77e9dce417515b2f21f662cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137500
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-02-27 00:20:52 +00:00
Mark Zhou 781cd94279 [tests] Adding test for recursive legacy class type bounds.
See fix: https://dart-review.googlesource.com/c/sdk/+/136724

Change-Id: I85b005898579c1c6fe6904e590e13cc20f754fee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136820
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-02-27 00:06:20 +00:00
Mark Zhou 36cc80d576 [tests] Adding runtime tests for required named arguments.
Change-Id: I1c76fa279c8c3572b48f5eb58eff53f703baca6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124106
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-02-27 00:06:14 +00:00
Ben Konyi 099aa18654 [ VM / NNBD ] Fixed standalone_2/io/file_test
Change-Id: I28dbe124125425bfa2460f30be974e165c6bdf7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137360
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-02-26 22:08:51 +00:00
Régis Crelier 432fa1b4e8 [VM/nnbd] Implement pre-nnbd language changes (see lang/#807).
Normalize FutureOr<T> and Never? after instantiation.
Use mutual subtyping of bounds in generic function type parameters instead of structural equality.

Change-Id: I78b836d8bd2f091bd56e5a0f9c2089a411fa6f6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135787
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2020-02-26 21:32:51 +00:00
Konstantin Shcheglov 0c7b9cf470 Issue 40764. Use Never instead of Null when converting super-bounded to regular-bounded.
Bug: https://github.com/dart-lang/sdk/issues/40764
Change-Id: I58f0e9860dd000aa2d8e416c5fce7e8964db0ef8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137280
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-02-26 20:12:51 +00:00
Liam Appelbe 05d2586099 [nnbd] Fix analyser error in required params test
Bug: https://github.com/dart-lang/sdk/issues/40781
Change-Id: Id5eefd844ac80c48b8558ead859adb451eb9fcb4
Fixes: https://github.com/dart-lang/sdk/issues/40781
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137320
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-02-26 17:43:27 +00:00
Clement Skau 9c05fde96b [Cleanup] Removes deprecated --gc_at_instance_allocation.
The flag only appears in two tests and a comment.
Flag was removed in https://dart-review.googlesource.com/c/sdk/+/83120

Change-Id: I2a5d828c8ec7909a3d16579f9a9771176aabb65e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136974
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-02-26 15:00:26 +00:00
Robert Nystrom fca91e4dfd Migrate css_selector_test off unittest.
This test was actually totally broken. It called
useHtmlIndividualConfiguration(), which tells the test runner to treat
each group() as a separate test. But it had no group() calls at all, so
the test runner didn't enqueue *anything* for it. It was completely
skipped. :-O

Change-Id: Ib7b030c94d286f467601ec490308c32fb500c7a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137291
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-02-26 02:17:55 +00:00
Liam Appelbe 9e03c2c506 [vm] Add required flag to parameters, and implement subtyping rules.
This CL only covers AST mode, and doesn't address function resolution.

Bug: https://github.com/dart-lang/sdk/issues/39755
Change-Id: I19280fb0d373aa9eb17da13677fd5bb1230385da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131701
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-02-26 00:38:54 +00:00
Régis Crelier d10ffdb4c3 [VM/nnbd] Check nullability of function types in strong mode (fixes #39820).
Also added "// Requirements=nnbd-strong" to test (correctly fails in weak mode).

Change-Id: If375b912b03c50cf968fcc45bd78be3d9bc1cb33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137241
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-26 00:05:53 +00:00
Alexander Markov 3bd8e36bea [tests/nnbd] Fix language/async_star/throw_in_catch_test
Fixes a compile-time error which was introduced during migration.

Change-Id: Id2b44f11481c354c76cd216cbd3190703ed968f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137200
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-02-25 22:47:43 +00:00
Konstantin Shcheglov 550ac009b3 Update tests expectations with DEAD_NULL_AWARE_EXPRESSION.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I26f585c5ea4ec872d574a8bcd09226b8d1a1cc0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-25 21:21:16 +00:00
Zichang Guo 94009bf980 [dart:io] issue another read in _NativeSocket.read to drain pipe
if NativeSocket.read() has not specified `len`, I will expect caller wants all bytes(this is not documented, correct me if I'm wrong).

Check the available bytes after read(), if there are leftover, issue another read(). This will eventually drain the pipe.

Bug: https://github.com/dart-lang/sdk/issues/40589
Change-Id: I3b0be9ef8258defd1f71f85b3154702401e0f31c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136322
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-02-25 18:40:21 +00:00
Clement Skau 250f0e83ea [Cleanup] Removes deprecated --enable-inlining-annotations; updates annotation.
The --enable-inlining-annotations flag was removed a while ago and the uses
were attempted removed in https://dart-review.googlesource.com/c/sdk/+/99148
but was later reverted in https://dart-review.googlesource.com/c/sdk/+/109320.

This removes the two last cases of this flag.

Change-Id: I157dd7bce0a49ab01100fa6f48d96eeefdb06b45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136969
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-02-25 12:09:10 +00:00
Robert Nystrom 01907a6f9b Migrate standalone tests off ancient deprecated unittest package.
We don't intend to migrate unittest to NNBD, so the remaining tests
that use it need to be migrated off. This takes care of the couple of
tests in standalone/ and standalone_2/ that used it.

The tests should behave the same as they did before. I verified by
making the tests fail in various ways after the migration and ensuring
that the tests failed as expected.

Change-Id: I938229cabad1d78a42a030970f2003edd36572f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136060
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-02-24 23:53:33 +00:00
Nicholas Shahan 9d1b5ced65 [dartdevc] Update instantiated type arguments in tear-offs
They now become a `Object*` or `Object?` if the library where the method
is defined is legacy or null safe.

Change-Id: Ia3de0d728187b9c5bf64cc8c08aa075e63aff942
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136723
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-02-22 00:34:21 +00:00
Nicholas Shahan a47b9996c8 [tests] Add tests for function type equality with Null Safety
Change-Id: I85d9764aee2f6260267ad7b499b2c138ffcc4501
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135533
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-02-21 19:59:11 +00:00
Lasse R.H. Nielsen 98b4635aa9 Make TypeError no longer implement AssertionError.
This means that TypeError no longer inherits a spurious `message` member.
The message of a platform-thrown TypeError is still available as `toString()`.

Fixes #40317

Bug: http://dartbug.com/40317
Change-Id: I77312859ebae3f92c2e56aeea6283b075b71c8d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136129
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-02-21 14:02:57 +00:00
Jonas Termansen 4925ff677f [nnbd] Update process_detached_test with StateError semantics.
Change-Id: Ic67541198abcb1d27d2a165eb3b579943f923d7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136629
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2020-02-21 12:44:16 +00:00
Johnni Winther 5829fc7829 [analyzer,cfe,dart2js] Add marker.options files to automate running id tests on all configurations
Change-Id: Ib5eb7f3967634721047f8dcc57b9e6c350b91a41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136226
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-21 08:34:26 +00:00
Robert Nystrom b81f12a549 Migrate language_2/async_star to NNBD.
Change-Id: I0fa2ee2561dd0bc399d88868d790d56e6df3c94d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134940
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-02-21 00:22:06 +00:00
Régis Crelier fd20c7b92b [VM/nnbd] Print nullability of types by default.
Only '?' is shown by default.
To print '*' and '%', use debugging flag --show-internal-names.
Fix expectations in tests.

Change-Id: Idc60fbfb4d477602eb0c713f4bdcc1e573a3328a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135790
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2020-02-20 21:43:25 +00:00
Martin Kustermann dae308461c [vm/concurrency] Share [Heap] and [SharedClassTable] between all isolates within one isolate group
This CL:

  * Moves [Heap]/[SharedClassTable] from [Isolate] to [IsolateGroup], which
    will make all isolates in the group use the same heap. The GC will use
    the shared class table for object size information.

  * Adds support for entering/leaving an isolate group as a helper thread
    (e.g. via [Thread::EnterIsolateGroupAsHelper]). The current active
    isolate group can be accessed via TLS `IsolateGroup::Current()` or
    `Thread::isolate_group_`. When entering as a helper thread there will be
    no current isolate.

  * Changes the GC to use the above mechanism and ensures GC works without
    a currently active isolate. The GC will use information purely available via
    [IsolateGroup]. The GC will iterate all isolates within an isolate
    group e.g. for scanning roots.

  * Makes spawning of new isolates start in their own isolate group.
    Once the isolate is fully functional it's heap will be merged into
    the original isolate group

  * Moves ApiState, containing persistent and weak persistent handles,
    from [Isolate] to [IsolateGroup], plus adds appropriate locking.

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

Change-Id: Ia8e1d8aa78750e8400864200f4825395a182c004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126646
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-02-20 21:08:35 +00:00
Dmitry Stefantsov b7aff59973 [cfe] Report errors on case expressions without primitive equality
Bug: http://dartbug.com/40425
Change-Id: Ied2da91cc32b84f6e64c0b76541e020d1a2447b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136227
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-20 13:39:09 +00:00
Teagan Strickland d985907536 [tests] Change the test we use to detect issues with instruction deduplication.
When deduplicating instructions, multiple Code objects may end up
mapping to the same set of program counters, which affects decoding a
stack trace using PC addresses. Since the DWARF stack traces test
depends on the stack trace decoding a certain way, pick a test as a
canary for issues with instruction deduplication that _doesn't_ depend
on how the stack trace will decode.

In previous experience, the underlying test used is unimportant,
so we build off the existing hello world code. If we have an error
due to code inadvertently assuming non-deduplicated instructions,
this error tends to manifest in the VM failing to start up no matter
what code should eventually run.

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

Change-Id: Ife9048740b91dc98b50c8fe4b9ff3dc052dd0a62
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136122
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-20 13:22:38 +00:00
Jonas Termansen 0683e9273d [dart:io] Throw StateError in meaningless getters on detached processes.
This is a breaking change. https://github.com/dart-lang/sdk/issues/40483

The Process class will now throw a StateError if the process is detached
upon accessing the exitCode getter. It now also throws when not
connected to the child process's stdio upon accessing the stdin, stdout,
and stderr getters. Previously these getters would all return null.

The getters in question are meaningless for detached processes and there
is no reason to use them in that case. To provide a better experience
when Dart becomes null-safe, these getters are changed to throw and
never return null, which avoids all legitimate uses of the getters from
needing a null check that will never fail.

The NNBD migration required making subtle changes to some dart:io
semantics in order to provide a better API. This change backports one of
these semantic changes to the unmigrated SDK so any issues can be
discovered now instead of blocking the future SDK unfork.

Change-Id: I776e0dc8bcd517d70332c60dd8ab88db17746aa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134329
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-02-20 13:18:38 +00:00
Srujan Gaddam 5237bcb12d Revert fileapi_entry_test to use unittest.dart
Bug: https://github.com/dart-lang/sdk/issues/40659

This behavior is similar to other tests where removing the dependency on
unittest leads to unhandled rejections.

Change-Id: Iba9eed271b839c764e544cc7200a132f0fb8e92b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136480
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-02-19 21:00:44 +00:00
Johnni Winther 17d8b6b015 [cfe] Do not hoist this expressions
Change-Id: I3ffa0ad7c5c8e98a23c28281ac7840480fd366ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136223
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-02-19 11:31:59 +00:00
Daco Harkes 8a23b8034e [test/ffi] Re-enable disabled tests
Undo commenting out of tests in https://dart-review.googlesource.com/c/sdk/+/121422

Change-Id: I51acc1fd23f93007b4e75c1b641a325027136c58
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136220
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-02-19 08:53:39 +00:00