Commit graph

71495 commits

Author SHA1 Message Date
Robert Nystrom
9014495aa5 Add other breaking changes to CHANGELOG.
Change-Id: I0616669dc6d8d9a676d057da54d59ea932ec67f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141208
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Franklin Yow <frankyow@google.com>
2020-03-27 00:18:42 +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
Robert Nystrom
db1cf5d113 Fix Markdown link in CHANGELOG and remove duplicate entry.
Change-Id: I99b50febfb985c73f3990ac63116a96a69431ba6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141162
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Franklin Yow <frankyow@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-03-26 22:00:05 +00:00
Brian Wilkerson
7d66feb5ff Compute new relevance in LocalConstructorContributor
Change-Id: Ife24a24829fae36b1caef5ab0a55e4c210a063a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141201
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-26 21:50:29 +00:00
Kevin Moore
9f1fbd242b DEPS: remove references to pkg:package_resolver
Related to https://github.com/dart-lang/package_resolver/issues/30

Change-Id: Ia97424c4a4d8e6721272e65e1ccd1c40fbcdd3c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141200
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2020-03-26 21:41:28 +00:00
Janice Collins
da1d9eb1bd Add a way for analysis_server to open communication via a IsolateChannel.
The idea is to pass a SendPort as an optional parameter to
ServerStarter.start(), and if present, key server behavior around
behaving well as an isolate.

Bug: https://github.com/dart-lang/sdk/issues/41056
Change-Id: Ifc6ac2fefcf6aae8bce712e470524d1c06fa2ba6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140373
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-03-26 21:37:59 +00:00
Konstantin Shcheglov
216d98ad2c Use NNBD_TOP_MERGE to combine signatures of the inherited members.
Initial: https://dart-review.googlesource.com/c/sdk/+/133041
Reverted: https://dart-review.googlesource.com/c/sdk/+/133086

Instance inference is not supported yet in this CL, will continue
in following CLs.

Change-Id: I72de01180b0624eeafc03bfe415ed3d928f1110f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133167
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-26 21:13:12 +00:00
Nicholas Shahan
a6664e093b [ddc] Update types in JSArray operations
- Avoid unnecessary type checks.
- Convert comment syntax to actual generic method syntax.
- Cleanup some type Strings from the JS foreign interface.
- Use var on LHS more consistently.

Performance optimizations can be seen in the ArrayLoop
benchmarks with the highest being ArrayLoop.pseudopoly.forEach
with a 34.15% improvement.

These changes also avoid a large performance regression when
we unfork and the array contains legacy or nullable types.

Change-Id: I88e21a7b0d36d9bb9ba1b0e8ba24326f2b2c8229
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140760
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-03-26 20:12:53 +00:00
Sam Rawlins
fe6f3eaf9f Migrator: Add an auth token for the preview site
Fixes #41134

Change-Id: I6d436805d3dfb64cc4d7ddde2b307132fbd1365d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140621
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-03-26 20:01:56 +00:00
Daco Harkes
445d279ff3 [vm] Add Reachability Fence Instruction
The reachability fence keeps a value alive and reachable.

Required for finalizers: https://github.com/dart-lang/sdk/issues/35770

Design: go/dart-ffi-finalizers (See "Premature Cleanup (Single Object)".)

Change-Id: I9742889f0f8d8b15bbcb5dca47f2a4231899dd59
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,vm-kernel-nnbd-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136188
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-03-26 18:30:44 +00:00
Stephen Adams
93c2900477 [benchmark] Make BigIntPrintParse be NNBD-agnostic
Change-Id: I6e93972bf904cbf09316517798a43116ee7fa61a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141027
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-03-26 17:55:33 +00:00
Robert Nystrom
12e81d336f Bump the SDK constraint on dart_internal to permit Dart 2.8.0.
Change-Id: I8f9dfcd2c361b28f62e7388fc642414efbd120aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141021
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-03-26 17:51:53 +00:00
Kevin Moore
bdedd7a574 Update changelog with dart2js --package-root removal
Follow-up to b3522564d9

Change-Id: I47e75fc3f7916cc6ec0464ace1b6df93638dd80b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141163
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-26 17:28:24 +00:00
Alexander Markov
5b131b60d7 [vm/corelib] Specify types explicitly in convert_patch.dart
This refactoring adds explicit types to convert_patch.dart where
they were previously omitted.

It was requested in https://dart-review.googlesource.com/c/sdk/+/140804/2/sdk_nnbd/lib/_internal/vm/lib/convert_patch.dart#522

Change-Id: If78240b4f9f9f4a58ba6b52c7fb6edc880b3de81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140940
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-03-26 17:25:14 +00:00
Konstantin Shcheglov
1089356a21 Update checkForWrongTypeParameterVarianceInMethod(), fix NPE.
Saw in crash logs:

NoSuchMethodError: NoSuchMethodError: The getter 'type' was called on null.
Receiver: null
Tried calling: type
at Object.noSuchMethod	(dart:core )
at ErrorVerifier._checkForWrongTypeParameterVarianceInMethod	(error_verifier.dart:5002 )
at ErrorVerifier.visitMethodDeclaration	(error_verifier.dart:973 )
at MethodDeclarationImpl.accept	(ast.dart:6978 )
Change-Id: I17b3db0d537827e34c4cc63a9ebdf1ecbda455f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141023
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-26 17:15:48 +00:00
Mike Fairhurst
8f492da139 [analyzer] Copy result of allSupertypes for now.
Change-Id: I7713c439872734c94681fa1826e443a33fbec14f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141030
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-03-26 17:15:09 +00:00
Konstantin Shcheglov
81a6ffae13 Add more data to debug crash in buildExportNamespace().
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/41212
Change-Id: Iaf52b17cc39529362bd1932484a7fa69cdd95a7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-26 17:07:46 +00:00
Konstantin Shcheglov
fc91636703 Fix for crash when FieldFormalParameter in a local function has annotations.
Saw this in the crash reports.

R=brianwilkerson@google.com

Change-Id: I890592b264a3c33df80d89b45ad55ebe3fdf0c09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141024
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-03-26 17:07:03 +00:00
Ben Konyi
a71449925a [ VM / DartDev ] Disable DartDev for the 2.8 release
Change-Id: I0b2d588599bee57b546c304b61c3edf1bc92f64c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141020
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-03-26 16:50:23 +00:00
Kevin Moore
b3522564d9 Remove unused package-root option and configuration from dart2js
Related to https://github.com/dart-lang/sdk/issues/41197

Change-Id: I4681139b5fe9d2d3d49c69796cf8a3c277753bee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140980
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2020-03-26 16:49:34 +00:00
Srujan Gaddam
fcc43457b3 [dart:html] Add nullability to EventTarget conversion
initMouseEvent uses this conversion to call the native function,
and it is allowed for the EventTarget to be null in the native
call.

Change-Id: I345e82fa00f4cca72e15f713cd7a271d306b7d37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141040
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-26 16:36:14 +00:00
Kevin Moore
96234b3ce0 DEPS: Bring in latest pub
```
737f055d0a1cfb348178dbde6bd13f06704bf6d4 Fix NPE during language version analysis (#2398)
```

Change-Id: I83a3110a64e8db9c576a5a52d53688ea392e1b33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141060
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2020-03-26 15:13:18 +00:00
Daco Harkes
4cec4fdc18 [vm/ffi] Mark Struct as entrypoint
Required so that we can access its slots in the compiler.

Issue: https://github.com/dart-lang/sdk/issues/36730
Change-Id: Ib14aa73f5cb6b713c682693f95841773b1b4e5d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141121
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-03-26 15:12:48 +00:00
Jens Johansen
137aeeb8a1 [analyzer] Sort entries in error.dart and syntactic_errors.dart
Change-Id: I1913b0dedc7a0100911c4cab3aeba5a30031bbbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-26 14:03:18 +00:00
Karl Klose
bb14279237 [infra] pkg/smith: custom test runner steps are test steps
Change-Id: I6517475d1db1cad707fb0d096e2689ea265f6a9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133522
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-26 13:44:08 +00:00
Martin Kustermann
1402e8e1a4 [gardening] Ensure standalone/io/non_utf8_output_test flushes stdout
This can remove flakiness of the test, the approval status will be NonUtf8Output.

Change-Id: Ie911547481ed0421632a54a3a74ce93984656948
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141123
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-03-26 13:15:18 +00:00
Karl Klose
f6acefa078 [infra] Ensure configuration names for custom test-runner steps are valid
Change-Id: I1bf57a3258aeb37f5fee485bde9a74a2ff3af8ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139803
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-03-26 07:01:27 +00:00
Mike Fairhurst
2eaa5bcec6 [nnbd_migration] Handle removing language comments after other comments
Change-Id: Iecee603fbef5ff2d0f822728b9ae0d83967afc21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140770
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-03-26 03:47:57 +00:00
Mike Fairhurst
3095a082cd [analyzer] Add an API to get a language comment token off a unit.
Change-Id: I377fdc44d5e514d6d9a601b3947c3908e5a4497a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140768
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-03-26 03:47:57 +00:00
Siva Annamalai
ba389f9061 Revert "[VM] - Delete non-nullable-flag() function and adjust code that was"
This reverts commit 1178f96600.

Reason for revert: "Gets an error VM initialization failed: To use --null-safety, please enable --enable-experiment=non-nullable"

Original change's description:
> [VM] - Delete non-nullable-flag() function and adjust code that was
>        using it.
> 
> Change-Id: Ibaf439fbef5e5e183f16240c4ee02b7031bc35c4
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140882
> Commit-Queue: Siva Annamalai <asiva@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>

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

Change-Id: Ia651ec60f8ecfc82a305bcff855a6ca6c2ab9e27
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141026
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-03-26 03:32:56 +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
asiva
1178f96600 [VM] - Delete non-nullable-flag() function and adjust code that was
using it.

Change-Id: Ibaf439fbef5e5e183f16240c4ee02b7031bc35c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140882
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-03-25 22:57:46 +00:00
Brian Wilkerson
d194838578 Add new relevance scores to LibraryElementSuggestionBuilder, which covers both LibraryMemberContributor and CombinatorContributor
This should have tests, but I (or someone else) need to do some data
mining to figure out the correct relevance values and hence the correct
ordering to test for.

Change-Id: I7782d7b7e13ff38a785c445cd0d6fc82a388a6aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141000
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-25 22:49:26 +00:00
pq
d18b648062 linter 0.1.114
Change-Id: I91eaaf6299065c18876fa8ebb0ca0f570a086743
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140981
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-03-25 22:47:56 +00:00
Martin Kustermann
cd8f712bcb [vm/compiler] Force members with @pragma('vm:entry-point') annotation to have boxed calling convention
So far the unboxing support in TFA disabled unboxing for natives and
relied on TFA inferring entrypoint parameters to be nullable (and
therefore boxed).

Though the added support for unboxing return values missed to explicitly
disable unboxing for return values of entry points.
  => This CL fixes that.

This is also a preparation for NNBD when parameters to entry points are not
necessarily nullable anymore.

Change-Id: Ia80a6acc8e803732b81665ebab14a9bfa720be22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140866
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-03-25 21:36:46 +00:00
Brian Wilkerson
df5e6c8e5f Compute new relevances in LibraryPrefixConstributor
Once again, test suggestions are welcome.

Change-Id: I470825a0ef51f555977bdc86192cc38bd718519a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140943
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-03-25 21:01:16 +00:00
Mike Fairhurst
5f20fe7d83 Revert "Trim not useful bottoms off of the non/nullability stack traces"
This reverts commit a225178919.

Reason for revert: This seems to remove useful info from the stack trace. Will revert, then hopefully land an improved version.

Original change's description:
> Trim not useful bottoms off of the non/nullability stack traces
> 
> Change-Id: I2f7bfab13fd3d70c5cbdbb10ce14a8a91f8c7a60
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140000
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Paul Berry <paulberry@google.com>

TBR=paulberry@google.com,mfairhurst@google.com,srawlins@google.com

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

Change-Id: I9a2fb07e387d57394242b694e27456333f2cf2b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140908
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-03-25 20:57:36 +00:00
Brian Wilkerson
3abbcd0da9 Attempt to fix windows bot failure
Change-Id: I6288838fe5dea2cb7b8e0d79ee90d09c91496769
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140901
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-03-25 20:39:56 +00:00
Regis Crelier
33cafef25e [VM/nnbd] Do not check nullability of LHS too early in strong mode (fixes #41160).
Nullability of left hand side in type test was checked too early, i.e. before
handling FutureOr on the right hand side.

The following tests began passing (in strong mode):

standalone/io/addlatexhash_test was fixed (RuntimeError -> Pass)
standalone/io/file_output_stream_test was fixed (RuntimeError -> Pass)
standalone/io/file_stream_test was fixed (RuntimeError -> Pass)
standalone/io/file_system_async_links_test was fixed (RuntimeError -> Pass)
standalone/io/file_system_links_test was fixed (RuntimeError -> Pass)
standalone/io/file_write_only_test was fixed (RuntimeError -> Pass)
standalone/io/pipe_server_test/0 was fixed (RuntimeError -> Pass)
standalone/io/pipe_server_test/1 was fixed (RuntimeError -> Pass)
standalone/io/pipe_server_test/2 was fixed (RuntimeError -> Pass)
standalone/io/pipe_server_test/3 was fixed (RuntimeError -> Pass)
standalone/io/pipe_server_test/4 was fixed (RuntimeError -> Pass)
standalone/io/pipe_server_test/5 was fixed (RuntimeError -> Pass)
standalone/io/stream_pipe_test/0 was fixed (RuntimeError -> Pass)
standalone/io/stream_pipe_test/1 was fixed (RuntimeError -> Pass)
standalone/io/stream_pipe_test/2 was fixed (RuntimeError -> Pass)
standalone/io/stream_pipe_test/3 was fixed (RuntimeError -> Pass)

Change-Id: I855328f101382cf5f1af9119b396aa9d0cb14e40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140776
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2020-03-25 20:26:26 +00:00
Jaime Wren
0ea3ae6282 Initial dart run * support and files. I will follow up with additional tests and pubspec executable support.
Change-Id: I5679429218a77f1de5d49caacc1a60d7a55b2dcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140700
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-03-25 20:14:06 +00:00
Leaf Petersen
a55e37289e Deprecate CastError.
CastError is deprecated.  See
 https://github.com/dart-lang/sdk/issues/40763 for details.

Change-Id: If00963e68987a259396c4b5a0cd6d703bc7ac76c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140885
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-03-25 19:41:03 +00:00
Mike Fairhurst
f10e1ed253 [nnbd_migration] Fix #38462, remove @ for @required nullable params
Change-Id: I755cd261a812a714f03cc09b1858d4925e98f88f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140907
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-03-25 19:40:24 +00:00
Paul Berry
bdf8e7b27e Migration: handle introduction of both ! and as on a single expression.
Fixes #40016.

Bug: https://github.com/dart-lang/sdk/issues/40016
Change-Id: I54047d843d5d1670876a5827276899b1a56dcc65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140905
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-03-25 19:38:34 +00:00
Paul Berry
9007eb4ce4 Sort declarations in fix_aggregator.dart
Change-Id: Ie3a3ba432531a920c7227193d60de32cd0347d57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140941
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-03-25 19:38:34 +00:00
Paul Berry
08c6dd6164 Migration: add FixBuilder support for expression null check hints.
Previously, null check hints were only affecting the behavior of
EdgeBuilder, which meant that we handled simple cases like:

  int f(int/*?*/ x) => x/*!*/;

(because the EdgeBuilder wouldn't build an edge from the type of `x`
to the return type of `f`, so the return type of `f` would be
non-nullable int, and hence the FixBuilder would insert a `!` in order
to prevent an error).

But if there were some *other* reason for the destination type to be
nullable, then no `!` would get inserted.

This CL adds explicit logic to the FixBuilder to ensure that a `/*!*/`
hint causes a `!` to be inserted whether it's necessary or not.

Change-Id: I283bb9793d8d01408333f5b56562286bf19d8773
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140904
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-03-25 19:38:34 +00:00
Paul Berry
e0e83793af Sort declarations in fix_builder.dart
Change-Id: I85934963e8d87e26c4fcb436651062b2adfbdc58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140900
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-03-25 19:38:34 +00:00
Paul Berry
2b74e6bca6 Migration: get rid of interfaces VariableRepository and VariableRecorder.
The only purpose of these interfaces was to enforce an artificial
separation of concerns between the methods of Variables used by
NodeBuilder and EdgeBuilder; this separation was never really very
useful, and it's getting in the way of adding features to FixBuilder.
It seems better to just use the Variables class directly everywhere.

Change-Id: I7b9c6c08c09a466bbcc1e3f72f9aa05db0d1a7b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140884
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-03-25 19:38:34 +00:00
Paul Berry
244b4247e9 Migration: better description text for edges.
Change-Id: I58651c927a741721283c3c4c951673a86aa7a1b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140883
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2020-03-25 19:38:34 +00:00
Alexander Markov
364ec714dc [vm/corelib/nnbd] Correct types in dart:convert and dart:io
This change fixes a couple of types in dart:convert and dart:io
implementation. Previously, non-nullable types were used where
null is actually allowed.

Stack traces where casting null to those types failed:

type 'Null' is not a subtype of type 'Object'
  _ChunkedJsonParser.result (dart:convert-patch/convert_patch.dart:523)
  _JsonStringDecoderSink.close (dart:convert-patch/convert_patch.dart:1491)
  decode (file:///b/s/w/ir/cache/builder/sdk/tests/lib/convert/chunked_conversion_json_decode1_test.dart:88)
  main (file:///b/s/w/ir/cache/builder/sdk/tests/lib/convert/chunked_conversion_json_decode1_test.dart:182)

type 'Null' is not a subtype of type 'Object'
  _Link.createSync (dart:io/link.dart:197)
  testCreateLinkRecursiveSync (file:///b/s/w/ir/cache/builder/sdk/tests/standalone/io/create_recursive_test.dart:62)
  main (file:///b/s/w/ir/cache/builder/sdk/tests/standalone/io/create_recursive_test.dart:14)

Change-Id: I2a52ff037927339df1148655189cc053acea4432
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140804
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-03-25 18:42:42 +00:00
Robert Nystrom
113c4e1793 Pretty up the CHANGELOG in anticipation of 2.8.0.
The changes are mainly:

- Add a brief intro section.

- Fix indentation to make Markdown happy. In particular, +4 is needed
  for nested lists to format correctly.

- Do a little copy-editing on the text. Mostly changing future tense to
  present tense.

- Merge the two dart2js sections together.

- Change some inline links to reference links since those are a little
  easier on the eyes.

Change-Id: I72f4d3a4f74d7b83afa8d02dd95589aeddc613d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140771
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-03-25 18:24:02 +00:00