Commit graph

70479 commits

Author SHA1 Message Date
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
Vyacheslav Egorov a634ef8159 [vm/snapshot] Add root names into write_v8_snapshot_profile_to output
R=sjindel@google.com

Change-Id: Ic178da22d2e97a86067808d4eb14df723efd03df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136582
Reviewed-by: Samir Jindel <sjindel@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2020-02-20 13:07:18 +00:00
Johnni Winther 5c869545f2 [cfe] Add option for agnostic nnbd mode
Change-Id: Ie37b0fcd30985992ce5c4973bf1cce1ccba181a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136580
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-20 12:47:38 +00:00
Jens Johansen cf4e044e07 [parser] New syntax for null aware index
Change-Id: Iea6b29eb897eb01863a92b223e270d225c3ca1ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135903
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-20 12:33:28 +00:00
Aske Simon Christensen 8964874f7a [vm/aot] Use the NOTFP register for the global dispatch table on ARM.
This reduces the instructions sizes of the Flutter benchmarks by between
0.22% and 0.36% (0.24% for Flutter Gallery) and the total sizes by
between 0.15% and 0.23% (0.15% for Flutter Gallery).

Change-Id: I69c0551883d31afcbaad0f592aafcd3115ecb347
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135904
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-20 11:27:38 +00:00
Aske Simon Christensen 3c2c795671 [vm] Free up NOTFP register on ARM in precompiled mode.
This makes the register available for the global dispatch table.

Change-Id: Ic77974a1c3e46395b2f8bab6e117187163972221
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134724
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-20 11:27:38 +00:00
Johnni Winther e6d1762ff2 [cfe] Add test for issue 40512
Change-Id: I85eed2287a4df8c38035cf79847753f1ce8a032b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136189
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-20 10:27:58 +00:00
Robert Nystrom 156c503620 Change indexOf() and lastIndexOf() back to Object.
In the legacy SDK these two methods in ListMixin take Object, not E.
When I migrated them to NNBD, I changed them to E to match the
declaration of the methods in List. This was an unintended breaking
change.

Fix that by changing them to "Object?", which is the NNBD equivalent of
the declarations in the legacy SDK.

Change-Id: I2a75e9f26a8198e4f51cb32a55055d5e64a69ed1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136412
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-02-20 09:00:17 +00:00
Konstantin Shcheglov 81d4cc6bc9 Issue 40701. Include 'late' into unlinked API signature.
R=brianwilkerson@google.com, pquitslund@google.com

Bug: https://github.com/dart-lang/sdk/issues/40701
Change-Id: Ia11ff4e65e779c4a370a6fec539564c0533bffa3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136529
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-20 04:16:35 +00:00
pq 6da009031c add static fields and getters to available suggestions
Fixes: https://github.com/dart-lang/sdk/issues/40699

Change-Id: Id60307de949395c2274cb35ac4d14521b301437d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136525
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-02-20 03:24:35 +00:00
Alexander Aprelev 612728f970 [frontend-server] Only set VM environment defines for VM compilation target.
Fixes https://github.com/dart-lang/sdk/issues/40669.

Change-Id: I9e58deed5d2c67c953de7dae10ccbf9c46ab6fd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136411
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2020-02-20 03:05:25 +00:00
Brian Wilkerson e187e42593 Stop producing trailing spaces when writing the last column of tabular data
Change-Id: I386795a266a81f0a1b9c0d71a1465c2642084498
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136522
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-20 01:57:45 +00:00
Régis Crelier 088e31036b Revert "[VM/runtime] Fix type tests with LHS FutureOr (fixes #38906)."
This reverts commit 3ef5270f71.

Reason for revert: precomp not tested by CQ and failing

Original change's description:
> [VM/runtime] Fix type tests with LHS FutureOr (fixes #38906).
> 
> Fixes tests/language_2/subtyping_static/future_or_subtype_test
> Also simplifies code making use of TypeAtNullSafe().
> 
> Change-Id: I045a030b2ece9d6980f7a9ba785948f0c10f697b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135625
> Commit-Queue: Régis Crelier <regis@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>

TBR=alexmarkov@google.com,asiva@google.com,regis@google.com,liama@google.com

Change-Id: Ie6399e6c6cfd602dc7388a1a9ef5a7c335e70c65
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136528
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-02-20 01:47:45 +00:00
Régis Crelier 3ef5270f71 [VM/runtime] Fix type tests with LHS FutureOr (fixes #38906).
Fixes tests/language_2/subtyping_static/future_or_subtype_test
Also simplifies code making use of TypeAtNullSafe().

Change-Id: I045a030b2ece9d6980f7a9ba785948f0c10f697b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135625
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-20 01:14:15 +00:00
pq fb840da85f update test expectations for changes in available declarations
Updated to keep up with changes to available declarations.

Change-Id: I80405f396e4946ebae93bc9501a68855d45dd3fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136540
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-02-19 23:37:35 +00:00
Mark Zhou f8f6c5d0b2 [dartdevc] Suppressing weak mode errors for functions with required named parameters.
Fixes #39908

Change-Id: I604bfd44d070fbc2f387deb4c9bda31921cb66d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135206
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-02-19 22:27:25 +00:00
Ryan Macnak 8f74e54790 Revert "[observatory] Display isolate groups."
This reverts commit 7469b87b04.

Reason for revert: Breaks service/get_cpu_profile_timeline_rpc_test on opt counter bots

Original change's description:
> [observatory] Display isolate groups.
> 
> [vm, service] Hide internal isolate groups unless --show-invisible-isolates.
> 
> Change-Id: I9be4dc128f66099d11e37f04fb59253d3a459c09
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136340
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

TBR=kustermann@google.com,aam@google.com,bkonyi@google.com,rmacnak@google.com

Change-Id: I300db0da1b0dc237070edb8fd0ce8bda7087ba25
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136500
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-02-19 22:04:55 +00:00
Brian Wilkerson 8517b53e26 Fix bug in create-method quick fix that omitted required parameter names
Change-Id: Ic9e15703d4f50ea237046ca72ef12692d610c55e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136407
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-19 21:43:07 +00:00
Konstantin Shcheglov ff8a5dfb72 Issue 40689. Add isStatic to available Declaration.
I did not use it yet, but filtered out all not top-level declarations
that are not CONSTRUCTOR or ENUM_CONSTANT. But isStatic might be used
if we decide to suggest static getters.

R=brianwilkerson@google.com, pquitslund@google.com

Bug: https://github.com/dart-lang/sdk/issues/40689
Change-Id: I1c86754d9dbbc1422defc06a8fe6a47fa0bf6f98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136410
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-19 21:29:24 +00:00
pq 34cdc8112e getter/setter suggestion tests
See: https://github.com/dart-lang/sdk/issues/40689

Change-Id: I87837592d4af458583b1710190beee4672ae4cfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136408
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-19 21:19:45 +00:00
Konstantin Shcheglov ba579eef57 Issue 39791. Infer Object? instead of Null or Never.
Bug: https://github.com/dart-lang/sdk/issues/39791
Change-Id: Iac4dae42b30d9358d818b78c77462312bab672fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136461
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-19 21:01:56 +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
Ryan Macnak 7469b87b04 [observatory] Display isolate groups.
[vm, service] Hide internal isolate groups unless --show-invisible-isolates.

Change-Id: I9be4dc128f66099d11e37f04fb59253d3a459c09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136340
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-02-19 20:51:40 +00:00
Victor Lima 7eedaf192f [vm/aot] Fix broken benchmarks
This CL fix an assertion inside Serializer::WriteInstructions
that was always failing in debug mode AOT 32-bit platforms
which used to happen when Utils::IsUint was called with a
signed type value was being passed.

It also fixes a bug that happens on some architectures that do not
support atomic unaligned load operations of 64-bit values.

Change-Id: Ic26cdeabccb55fcda5257da00f13dc400fa37e9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136228
Commit-Queue: Victor Agnez Lima <victoragnez@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-19 20:49:29 +00:00
Srujan Gaddam 59370f29c5 Fix html methods without returns
Several method bodies did not return a value conditionally or at all.

Change-Id: I01ca87e2e0501597bacb49bcddd10668b59026b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135626
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-19 20:43:34 +00:00
Konstantin Shcheglov 21b78a1f85 Implement TypeSchemaEliminationVisitor using ReplacementVisitor.
Change-Id: I3a33031e20de34061f9bdc436506b59487dfbcbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-19 20:41:24 +00:00
Paul Berry d81549e2b2 Migration: fix offset handling when there are deletions.
Since deleted code is shown in red in the preview tool (rather than
being deleted), we should only look at insertions when computing the
offsets for applying navigation links to the preview text.

Fixes a bug wherein a large block of deleted text near the top of a
file would cause a crash due to a bogus negative offset.

Change-Id: I704b2cecaf4b93eeb91f16d9bd5890ad3e3080e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136403
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-19 20:33:44 +00:00
Mark Zhou 691596486b [dartdevc] Adding more warnings when invoking functions missing required named parameters.
Change-Id: I6dd1bcc6f597e2438f5aa7f64a7a9b318bd6e37f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135181
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-02-19 20:18:44 +00:00
Brian Wilkerson 3dc8cb0d2b Minor improvements to metrics gathering
Differentiate between class references and constructor references when
the class name comes first.

Start gathering data for general cases (start of expression, start of
statement) to determine whether we need fine-grained handling based on
the context or whether all expressions (for example) follow the same
distribution.

Change-Id: Iec403474aa19a3468fd15c0b90ec26392bf040f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136440
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-19 18:01:34 +00:00
Paul Berry fa38644450 Migration: handle dead code removal in awkward places.
Usually when migration removes dead code it can just delete it
(e.g. because it's removing a statement from a block and blocks can
contain any number of statements).  However, in certain contexts dead
code must be replaced with something else, such as an empty statement.

Change-Id: I65faf017897215d750395dc78a2bf8a157d8dce0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136441
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-19 17:39:44 +00:00
Paul Berry 2fa27b5d57 Introduce a "postmortem output" for nullability migration.
The postmortem output is currently only generated if the static
constant NullabilityMigrationImpl._postmortemPath is non-null.  The
generated file can be analyzed using
pkg/nnbd_migration/tool/postmortem.dart.

Change-Id: Ic5bf7aecc4176306839c00237eed668c2cd42571
Bug: https://github.com/dart-lang/sdk/issues/40624
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136003
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-02-19 16:44:40 +00:00
Dmitry Stefantsov 0f141be8bd [cfe] Implement new rules around types of case expressions
Bug: http://dartbug.com/40425
Change-Id: I1f6e93bde663ab6f1a6a63e91aef4133af6e5253
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136186
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-19 13:32:10 +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
David Morgan 40ba886fa7 Revert "Reland "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API""
This reverts commit 082aece5f4.

Reason for revert: tonic fix not yet landed in google3.

Original change's description:
> Reland "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API"
> 
> This reverts commit 34447c8dbb.
> 
> Reason for revert: Last Dart_AllocateWithNativeFields usage removed in Tonic
> 
> Original change's description:
> > Revert "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API"
> > 
> > This reverts commit 3d1b8b26c2.
> > 
> > Reason for revert: Broke Flutter HHH. Dart_AllocateWithNativeFields is still used in Tonic.
> > 
> > Original change's description:
> > > [ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API
> > > 
> > > These methods are no longer necessary and all objects should be created
> > > using Dart_New instead.
> > > 
> > > Change-Id: If64d3e3579fc03dd1a2eb6bfec73c35e90c66d8f
> > > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135523
> > > Reviewed-by: Ryan Macnak <rmacnak@google.com>
> > 
> > TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
> > 
> > Change-Id: I3dca62a1db60a90bbcc78c34ae150df628cd85c8
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135642
> > Reviewed-by: Clement Skau <cskau@google.com>
> > Commit-Queue: Clement Skau <cskau@google.com>
> 
> TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com,cskau@google.com
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Change-Id: I2ac83e1bfccccd9b626acfa4a6ac517b4f3968fb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136020
> Auto-Submit: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>

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

Change-Id: I74b6fafc86a3adcb52ca9f924fceda7831be8fc0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136222
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-02-19 09:28:29 +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
Jens Johansen 707ecda05e [analyzer] Add test for bang before type arguments
In https://dart-review.googlesource.com/c/sdk/+/128402 I was asked to
add a test to the analyzer.
This is the (somewhat belated) follow-up that does that.

Change-Id: I7065882b458a480b12d79a4913a59e2bee4f35da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136184
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-02-19 07:45:59 +00:00
Mike Fairhurst c11c0ae3fd [nnbd_migration] Remove personal test file
Change-Id: If9f43600567793e5203dc3a5dd6be0d4172daf8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136303
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-02-18 23:12:49 +00:00
Joshua Litt 6c68844821 [dart2js] Two small fixes for building dart2js with the nnbd runtime.
Fix for NoSuchmethod's signature.
Fix for NeverType's scope visitor.

Change-Id: I7d98e37eb7bfcb67339b36d1b335fc4ba9eff6d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136320
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-02-18 23:02:49 +00:00
Vijay Menon b706395788 [dartdevc/nnbd] check parameters in strong mode
Change-Id: I3580c3957729c20facf8d4a78bb32e7cf5573ad6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135320
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-18 22:40:10 +00:00
Konstantin Shcheglov cef02fff52 Merge Dart2TypeSystem into TypeSystemImpl.
Just mechanical movement of methods.

Change-Id: Ieb62190d2d531652b50cd233145f3dea22c00d97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136302
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-18 22:37:35 +00:00
Konstantin Shcheglov 4592153aec Add ReplacementVisitor, implement NullabilityEliminator with it.
Change-Id: If8c0fcee76733c0c3e9605becd6738fa9d92df2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-18 22:37:34 +00:00
Brian Wilkerson 36a6d509ba More improvements to completion metrics computation
Change-Id: Idbab7d6cb14d45e850a08f5ca87e15c90c434664
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136300
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-18 22:29:24 +00:00
Alexander Aprelev 005e336de9 [vm/heap] Take into account abandoned bytes so new space grows appropriately.
Need for this was discovered while landing shared heap.

Change-Id: I95a27a5b8de51f94289ff67e2844279c189ea6c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135584
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2020-02-18 22:11:14 +00:00
Joshua Litt 4c1a77c2f0 [dart2js] Migrate dart2js rti library to nnbd.
Change-Id: Id38470117a51dc97cbbdcefdb8b31803f013deca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136240
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-18 21:21:34 +00:00
Janice Collins 79b507f4cb Upgrade dartdoc to v0.30.1.
Change-Id: I8e6b6bad839912ba30c9d03f7763bd89cbadab86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136281
Commit-Queue: Janice Collins <jcollins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-02-18 19:46:54 +00:00
Ben Konyi 3883c60709 [ VM ] Updated Dart_NewList and Dart_NewListOf to work with NNBD and added Dart_NewListOfFilled which behaves the same as List.filled(...).
Change-Id: Ie35b973fe6102d882181074eb6466d4b02fb073f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135800
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-02-18 19:42:14 +00:00
Konstantin Shcheglov 303992f7a7 Don't report StrongModeCode.INVALID_CAST_* for NNBD libraries.
Change-Id: I87e0a2cbeb1365a5facd48c154ff0986c857fabe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136002
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-18 17:35:54 +00:00
Ben Konyi 082aece5f4 Reland "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API"
This reverts commit 34447c8dbb.

Reason for revert: Last Dart_AllocateWithNativeFields usage removed in Tonic

Original change's description:
> Revert "[ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API"
> 
> This reverts commit 3d1b8b26c2.
> 
> Reason for revert: Broke Flutter HHH. Dart_AllocateWithNativeFields is still used in Tonic.
> 
> Original change's description:
> > [ VM ] Removed Dart_Allocate, Dart_AllocateWithNativeFields, and Dart_InvokeConstructor from embedding API
> > 
> > These methods are no longer necessary and all objects should be created
> > using Dart_New instead.
> > 
> > Change-Id: If64d3e3579fc03dd1a2eb6bfec73c35e90c66d8f
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135523
> > Reviewed-by: Ryan Macnak <rmacnak@google.com>
> 
> TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
> 
> Change-Id: I3dca62a1db60a90bbcc78c34ae150df628cd85c8
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135642
> Reviewed-by: Clement Skau <cskau@google.com>
> Commit-Queue: Clement Skau <cskau@google.com>

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I2ac83e1bfccccd9b626acfa4a6ac517b4f3968fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136020
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-02-18 17:34:44 +00:00
Ben Konyi edc8bd7ec6 Revert "Re-land "[vm] Aggressive write-barrier elimination.""
Reason: Causing numerous DartFuzz crashes

This reverts commit 595038d19f.

Change-Id: I94e79cf1a3ddf9210a2929128cfc825bf47c92ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136260
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-02-18 17:12:21 +00:00
Konstantin Shcheglov 21e944f1bc Use promotedBound for TypeParameterType promotion.
Change-Id: I217a8b9140f60d4f6a9ffc052564388c24c1a7ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-18 17:11:44 +00:00