Commit graph

70367 commits

Author SHA1 Message Date
Janice Collins 96794c5aae Fix windows bot failure due to missing path conversion.
Change-Id: I1bf12360ee3e45b89ccc4f045151f037450df093
Bug: https://github.com/dart-lang/sdk/issues/40570
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135180
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
2020-02-10 21:17:36 +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
Paul Berry 63b5d2b053 Migration: Allow null info when introducing as.
Usually we have good information from the nullability graph about why
we need to insert a cast, but sometimes we don't.  For example, when a
cast needs to be inserted because NNBD doesn't allow implicit
downcasts, we often can't give any additional information beyond "a
cast is needed here now".

We allow info to be null in these cases to avoid an assertion failure.

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

Change-Id: I7639374f92820faf04bda2aeda96d0e38f07e8d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135161
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-10 20:19:54 +00:00
Paul Berry a017944035 Migration: fix hard crash in trial_migration when migrating package:async.
There were two problems:

1. An info object isn't being properly passed to
   NodeChangeForExpression, causing an assertion failure during the
   FixAggregator stage.  I've modified the assertion check so that it
   happens earlier, during the FixBuilder, so that the exception is
   caught by permissive mode logic and doesn't cause a hard crash.
   I'll work on fixing the assertion in a follow-up CL.

2. The hack described in https://github.com/dart-lang/sdk/issues/40536
   was causing a bogus assertion failure in
   _PassThroughBuilderImpl._checkParenLogic.  I've weakened the
   assertion slightly so that for now, the hack won't cause trouble.
   See the issue for more information about what's happening--this
   should be cleaned up eventually but it's probably not high
   priority.

Bug: https://github.com/dart-lang/sdk/issues/40533
Change-Id: Iee832fbd07e54b02d2c52f79a097ff9d973cda9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134980
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-02-10 20:19:54 +00:00
Ryan Macnak 41cef5f82f [vm] Never enter a safepoint under a regular MutexLocker.
Change-Id: Ice7ff95c91e068bd3c494d853d0047612c337b3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134563
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-10 20:15:54 +00:00
Régis Crelier 4f35a405ff [VM/nnbd] Update runtime and code generation of 'is instance of' for NNBD.
This implements the recent spec changes.
Fixes #40276.

Change-Id: Ia458d62154281dd74f019cb14c08e232859840e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134807
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-10 20:00:04 +00:00
Robert Nystrom 8871d3bc1c Bump the version numbers in the test package config to "2.7".
2.6 matches the versions used in the existing "// @dart=2.6" comments
in the tests, but it excludes extension methods, which we have tests
for so need to enable.

Change-Id: I816baeeb308ec0cac967b21d23eeccfb32cf1733
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134878
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-02-10 19:57:15 +00:00
Srujan Gaddam cd53f4ffe1 Add null-safety to html_common
Bug: https://github.com/dart-lang/sdk/issues/37931

Change-Id: I454ffd0cbd090d5f4ff0aa4f2a778710eea7c5b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133860
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-10 19:14:34 +00:00
pq 10f2b8fc76 migrate path specification to driver clients
(Hard-wired paths are making tests harder to write.)

Change-Id: Ifb996e78c18cc8249b9ee0f18e6db52097778d47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-02-10 19:06:25 +00:00
Srujan Gaddam 9af1ffc558 Don't generate getters/setters for read only promises
Bug: https://github.com/dart-lang/sdk/issues/40530

For attributes that return promises and are read only, we
use promiseToFuture casts that should be maintained.

Change-Id: I02e23fc9c47321ced64a152c245cbdccd7337033
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134902
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-02-10 18:55:35 +00:00
Mark Zhou eddfbb1776 [dartdevc] Wrapping function types with nullability wrappers.
This is required when comparing functions type objects with sub-canonicalized functions.

Example:
Function() g() => (() => 0) (opt-out)
Function()? f() => null (opt-in)

both canonicalize their return type as a step in canonicalizing the entire function. Omitting a wrapper around the canonicalized function type (the return value) would result in the runtime types of these functions being canonicalized to the same value.

Change-Id: Icb1fd77458267e769bd4d4f54b71d0f81a323bd8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133340
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-02-10 18:29:24 +00:00
Konstantin Shcheglov 0bd76c7d37 Issue 40546. Ensure that getSourceKind() works for changed files.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/40546
Change-Id: I68b3e0610960bfbad05d6d132d534cea9cfe5925
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-10 18:14:44 +00:00
Liam Appelbe 661fd081fb [lib] Re-add a null check in Double.toStringAsPrecision
Fixes language_2/double/to_string_as_precision2_runtime_test

Change-Id: I9fa0da0e24f4834cb68fd166c00461d13c3b646b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134920
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-02-10 18:08:04 +00:00
Liam Appelbe b86c6e0ce9 [lib] Fix some NNBD lib tests
Fixes:
lib_2/convert/ascii_test
lib_2/convert/latin1_test
lib_2/typed_data/typed_data_list_test
Change-Id: I493ef6e43db71f09e147b21cbaabdf6a47d833de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134780
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-02-10 18:06:40 +00:00
Alexander Markov 721035cd3d [vm/nnbd] Fix RangeError in NoSuchMethodError._toStringDeprecated
NoSuchMethodError._invocationType is actually always -1 which is out of
range. Before NNBD migration we had an explicit range check which helped
to avoid throwing exception, but it was replaced with assert during
migration. This CL restores the range check.

Fixes co19_2/LibTest/core/NoSuchMethodError/toString_A01_t01 with
unforked SDK.

Change-Id: I91abe92491fe3a15aa422a41fefe6538baac5621
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134875
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-02-10 17:37:51 +00:00
Mark Zhou 82b73697d7 [dartdevc] Implementing generic function type object equality.
dartdevc_native tests also have to be updated to not wrap/unwrap generic function types.

Change-Id: I4115db483bb6668c171ec29ca7483dfabc470df5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133285
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-10 17:36:14 +00:00
Mark Zhou 4152aa5be2 [dartdevc] Adding support for required named parameters weak mode semantics.
Fixes #39908

Change-Id: I50a567441fdf3928049009a7e6c183223ba91484
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134868
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-02-10 17:26:24 +00:00
pq 3d97d22fe5 completion driver suggestions
The absolute minimum to see suggestions wired through.

Lots of work to flesh out the client-implemented algorithms.

For reference:

* https://github.com/Dart-Code/Dart-Code/blob/master/src/extension/providers/dart_completion_item_provider.ts
* https://github.com/JetBrains/intellij-plugins/blob/master/Dart/src/com/jetbrains/lang/dart/ide/completion/DartServerCompletionContributor.java

Change-Id: Idc78fca787b095e5b6236481b89ddb21c0ed9c94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134877
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-10 17:07:29 +00:00
Daco Harkes 160614929a [vm/ffi] Fix sign extension for small int arguments on x64 Linux/MacOS
Sign extension of small integers is not symmetric between register arguments and register return values.
On Linux/MacOS x64, the caller is responsible for both the arguments and return value.

Previous tests only tested equality, which tests the equality of the lowest byte. However, when printing or using the small ints arithmetic all 4 bytes are used. The new tests pass back the number in a different format.
The callback tests test the number in Dart, so they did not suffer from implicit conversions. (TestTakeMaxUint8x10 in runtime/bin/ffi_test/ffi_test_functions.cc and tests/ffi_2/function_callbacks_test.dart.)

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

Change-Id: I6a57cb7cb43206926eb101a66e3b2abfacec72a0
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134825
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-10 17:05:14 +00:00
Martin Kustermann f338ed8638 [vm/concurrency] Ensure TFA doesn't eliminate static field, to ensure objects stay alive when asking for allocation stats
This is extracted from the shared heap cl.

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

Change-Id: I4903c1c458a8b046c54eb71933da8b340ae6e1a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135060
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-02-10 16:10:14 +00:00
Robert Nystrom 21758fe93c Create a package_config.json file for the generated multitests.
Change-Id: Ic603d2827184aa88c0b3d78032966591516094e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134873
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-02-10 15:46:54 +00:00
Teagan Strickland e01457d138 Reland "[vm/aot] Remove object wrapping of bare instructions for AOT snapshots."
Now, when writing an AOT snapshot in bare instructions mode, only
the actual instructions in the RawInstructions payload are serialized
instead of the entire RawInstructions object.

Since there are no longer RawInstructions objects in these AOT
snapshots, we also change how Code objects are serialized. Instead
of just containing a reference to the RawInstructions object, we
serialize two pieces of information: where the instructions
payload for this Code object begins and whether there was a single
entry for the instructions payload. (To save space, the single
entry bit is serialized as the low order bit of the unchecked
offset, which was already being serialized).

While we also need the length of the instructions payload, we
approximate it for all but the last Code object by subtracting
the next Code object's payload start from this Code object's
payload start. For the last Code object, we assume it extends
to the end of the instructions image.

Changes on flutter gallery in release mode:
armv7: instructions size -2.70%, total size -1.73%
armv8: instructions size -6.04%, total size -3.63%

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

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm_x64-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: Ia0a5c4e5e47c956776dc62503da38ec55a143c04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134325
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-10 15:08:04 +00:00
Aske Simon Christensen 293c5bec50 Revert "[VM/Libraries] Turn on NNBD versions of dart:io and dart:_http libraries"
This reverts commit b158bf7bd5.

Reason for revert: Changes to Class::InvokeSetter trigger failure of
ASSERT(!other.IsDynamicType()); in Instance::RuntimeTypeIsSubtypeOf.

Original change's description:
> [VM/Libraries] Turn on NNBD versions of dart:io and dart:_http libraries
> 
> - Turn on NNBD versions of dart:io and dart:_http libraries
> - Fix an unimplemented section in Class::InvokeSetter
> 
> Change-Id: I5343a76e62c0bacaddd9b1859bef5119d80bc5ac
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134884
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>

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

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

Change-Id: Id98204057ff49a28c1ad5e94f8afcdfcb8261e0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134826
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2020-02-10 13:44:04 +00:00
Daco Harkes 27385faab5 [vm/ffi] NNBD: Change nullptr type argument to Never
Fixes: https://github.com/dart-lang/sdk/issues/40234

Change-Id: Ib99b6922180d3b13a5042cc4798e57abf6201a12
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-mac-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134320
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-02-10 13:32:54 +00:00
Erik Ernst 9e1bbc1203 Ensuring that every feature spec in SDK is marked as background material
A couple of feature specs did not explicitly say that they are now
background material and normative language should be found in specific
other places. This CL does that. It also makes the README.md even more
explicit in order to make the same point.

Change-Id: I79cbd86a662faf478ce41c01e09c5f32a3f03cd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134824
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-02-10 11:31:44 +00:00
Brian Wilkerson d0e779ff71 Improve some diagnostic documentation
This recpatures some documentation lost in
https://dart-review.googlesource.com/c/sdk/+/129833.

Change-Id: Ie8355533bd0c42360c9d7dd2138813c83391d7c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134981
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-09 20:57:33 +00:00
Konstantin Shcheglov 5244d99a5d Issue 40547. Make MISSING_ENUM_CONSTANT_IN_SWITCH a warning.
Bug: https://github.com/dart-lang/sdk/issues/40547
Change-Id: Ia041ef7940372ed801a6ffcefc9d9333d6c943fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135001
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Konstantin Shcheglov <scheglov@google.com>
2020-02-09 19:21:43 +00:00
asiva b158bf7bd5 [VM/Libraries] Turn on NNBD versions of dart:io and dart:_http libraries
- Turn on NNBD versions of dart:io and dart:_http libraries
- Fix an unimplemented section in Class::InvokeSetter

Change-Id: I5343a76e62c0bacaddd9b1859bef5119d80bc5ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134884
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-02-08 21:42:07 +00:00
Konstantin Shcheglov 4aa097b082 Issue 40394. Report warning for nullable enum in switch.
Bug: https://github.com/dart-lang/sdk/issues/40394
Change-Id: I9e8112ead97d5ecaccc167b2378112cefa391bcc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134874
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-08 19:59:07 +00:00
Siva Annamalai f120417ddb Revert "[ DartFuzz ] Prevent generated programs from explicitly throwing OutOfMemoryError"
This reverts commit 9464eb51f5.

Reason for revert: Causes a failure in the Analyzer bot, some analysis errors.

Original change's description:
> [ DartFuzz ] Prevent generated programs from explicitly throwing OutOfMemoryError
> 
> Programs generated by dartfuzz.dart explicitly look for OOM errors and
> return with a specific error code (254) to notify dartfuzz_test.dart
> that the program exited after running out of memory. If both
> configurations being tested return 254, the result for that fuzzing run
> is counted as "skipped", artificially inflating the "skipped" count.
> 
> Fixes https://github.com/dart-lang/sdk/issues/40493
> 
> Change-Id: I552dbd497fe514da929b08a7a523616d1d3db538
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134903
> Auto-Submit: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

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

Change-Id: I23e286bb9c5aba1513fbc66bcb6d49221cbd4aba
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135000
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-02-08 19:37:12 +00:00
Ben Konyi 9464eb51f5 [ DartFuzz ] Prevent generated programs from explicitly throwing OutOfMemoryError
Programs generated by dartfuzz.dart explicitly look for OOM errors and
return with a specific error code (254) to notify dartfuzz_test.dart
that the program exited after running out of memory. If both
configurations being tested return 254, the result for that fuzzing run
is counted as "skipped", artificially inflating the "skipped" count.

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

Change-Id: I552dbd497fe514da929b08a7a523616d1d3db538
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134903
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-02-08 01:03:39 +00:00
Ben Konyi 342fd67c1d [ VM / Hot Reload ] Fixed issue where CallSiteResetter was attempting to rebind ICData for field initializers
Fixes multiple hot reload tests.

Change-Id: I7b6a58bef78eef59db350c52dd5435c57482a21e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134864
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-02-08 00:48:49 +00:00
Sigmund Cherem 4310f50edc Switch dart2js nnbd bot: use a sdk-built configuration with no assertions
This is a temporary measure to help run the bots faster (the hostasserts
configuration seems to be timing out periodically)

See also https://github.com/dart-lang/sdk/issues/40521

Change-Id: Iba06626388124c146fbde8e78f3edc0a62f089f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134885
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-02-08 00:32:00 +00:00
Devon Carew 3a8264cb35 [nnbd preview] iteration on the nnbd preview tool ui; fix layout and scrolling
Change-Id: I1d5ddc855c3f47971436668d3d64f8ff63e377e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134872
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-02-07 23:52:00 +00:00
Ryan Macnak d71b1e5b04 [vm] Remove 'dynamic' from 'dart:core'; add missing accessors to the embedding API for dynamic, void and Never.
Fix crash when create type errors involving Never.

Bug: https://github.com/dart-lang/sdk/issues/12478
Bug: https://github.com/dart-lang/sdk/issues/40176
Change-Id: I8cff7042850717d02da36ad935cf0a49ace80c3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134886
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-02-07 23:47:50 +00:00
Paul Berry a6d792797c Fix package_config.json configVersion field.
Change-Id: Icf35201202de43bd01b1d48254f789a5df197f25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134862
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-02-07 23:39:38 +00:00
Robert Nystrom bdfcbe4bf8 Migrate the dart2js dart:collection patch file to NNBD.
Change-Id: I975104fd6257e867693f2374a174aa1082d1d507
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134810
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-07 23:28:59 +00:00
Robert Nystrom 63017808b6 Migrate the dart2js dart:math patch file to NNBD.
Change-Id: Ieebc2ccf9a3194fe427dd72fd97eb9b491f2fcc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134811
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-02-07 23:28:48 +00:00
Srujan Gaddam 8c0d72db1d Fix how composedPath is called
Bug: b/149075352

Event.path should call composedPath if the result of the inline is
True. As it is, it only calls it if the result is null, which is
erroneous.

Change-Id: Idacc9ccddafc4374aca10de84265bf82cfbd0ab9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134887
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-07 23:25:22 +00:00
Paul Berry 1554a119ed Migration: add explicit parameter types to function literals when necessary.
Under NNBD rules, certain function literals have their types inferred
as `Object?` instead of `dynamic`.  We need to add explicit `dynamic`
to prevent follow-on errors if those parameters are used in a dynamic
fashion.

Change-Id: I12bfd3a3da2bda1ae11b01a5d029dbea3d512cb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134567
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-07 23:07:27 +00:00
Konstantin Shcheglov eeaa9085ae Issue 40394. Updates to switch / case validation.
No changes to enum validation yet.

Bug: https://github.com/dart-lang/sdk/issues/40394
Change-Id: I2cca426b5b59d18a6244622f84884a3747a07190
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134888
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-07 22:38:40 +00:00
pq 15198ebad8 add pubspec caching to PubWorkspacePackages
See: https://github.com/dart-lang/linter/issues/29

Change-Id: Ifcd4ad359a43c9183ab42ed6bb0ebb3586c73afd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134861
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-07 21:56:26 +00:00
Régis Crelier 4d10cd96d8 [VM/nnbd] Fix canonicalization of type 'Never' (fixes #40249).
Change-Id: I160efcff977c385309a7a7034c67779441dfbff3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134882
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-02-07 21:55:07 +00:00
Konstantin Shcheglov 6f6797e745 Add NullSafetyUnderstandingFlag, update APIs to use it.
DartType.== implementations ignore nullability if the flag is not true.

TypeSystem APIs eliminate nullability from types before doing anything.

Internally analyzer continues using actual nullability for types.

Package nnbd_migration opted into NullSafetyUnderstandingFlag.

Bug: https://github.com/dart-lang/sdk/issues/40500
Change-Id: Ifeea28c01adf1dc59ed2da675b4a62c6334d529a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134865
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-07 21:38:06 +00:00
Johnni Winther 8d9cbaf4c4 [kernel] Allow invalid types in naive_type_checker
Change-Id: I9a7614056fa3a14a382e41ad1e927f023fe00250
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134726
Reviewed-by: Jens Johansen <jensj@google.com>
2020-02-07 21:14:37 +00:00
Ryan Macnak a73b0ceda2 [vm, lib] Teach mirrors about the Never type and member signatures.
Bug: https://github.com/dart-lang/sdk/issues/12478
Bug: https://github.com/dart-lang/sdk/issues/40497
Bug: https://github.com/dart-lang/sdk/issues/40510
Change-Id: I841d7e239b8235555ec26fbcb74ca41b5de60f58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134806
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-07 20:57:46 +00:00
Vijay Menon 05b806ace7 [dartdevc,nnbd] analyze whole sdk, fix isolate errors
This should fix all ddc isolate errors.  Remaining two io/_http errors are due to:
https://github.com/dart-lang/sdk/issues/40482

The rest are mirrors.  Do we think we'll be able to remove it altogether?  If not,
I can take a pass to fix.

Change-Id: I4cef9773b5fa36490bdfbc08a06fae6cd80c5eae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134860
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-07 20:50:16 +00:00
Janice Collins 7869bc39c6 Steel thread through fantasyland.
This includes a mostly feature-identical version of tool/migrate_ecosystem.sh, written in Dart.


Bug: https://github.com/dart-lang/sdk/issues/40280

Change-Id: Ib3fe2f353208038ac6c3f035fcdb17f638c68e49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134786
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2020-02-07 20:27:16 +00:00
Brian Wilkerson c6b0ee3931 Convert the remaining fix tests using a lint marker and remove the ability to use a marker
Several of the tests were testing conditions that cannot occur and hence
were either re-written or removed. There's one test that I couldn't get
working so I marked it as failing. I marked another test as failing
rather than remove it because I think we want to update the lint to
catch that case (it's failing because no lint is produced).

Change-Id: I852c3c4595b0993ce2a64cbd9da1b6c7339dd59b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-07 20:22:26 +00:00
Dmitry Stefantsov fd992e423e [cfe] Normalize supertypes before nnbd-top-merging them
Closes #40454.

Bug: http://dartbug.com/40454
Change-Id: Ia255c99c937a04876e04a0f0f5935147e55fbd35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134842
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-07 18:14:40 +00:00