Commit graph

74669 commits

Author SHA1 Message Date
pq e2f0cbc4d6 bulk fix for avoid_return_types_on_setters
Change-Id: I29465e1a33be384948015682725b3e8f8db99bb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-29 16:03:16 +00:00
Alexander Aprelev 3cd8b5ca1e [vm/resolve] Use Resolver instead of Lookup in while-loop.
This is part of refactoring that should help with protecting class functions lookup with locks.

Change-Id: I28d25aa78c0b4d83eb8ceab827b71852a23368b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156162
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-29 15:48:15 +00:00
pq 1324146fb4 bulk fix for avoid_redundant_argument_values
Change-Id: Id7dacf56d72acecfbd0f862585e68d93f2c22d55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-29 15:11:13 +00:00
jlcontreras 17be0b4edf Fix nnbd flag bug in tests for Value Classes feature.
Change-Id: I1a092c951d529c1db395a3bb03e887a3a33a96e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156194
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-07-29 15:07:09 +00:00
Johnni Winther eb1dc6786b [cfe] Revert receiverType/receiverBound update
This change was introduced in https://dart-review.googlesource.com/c/sdk/+/155324
but has unforeseen negative consequences.

Change-Id: Ifda680a533833fc21f575f13f0e6f0f3be857fa2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156195
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-07-29 14:59:01 +00:00
Martin Kustermann fd959b824e [vm/compiler] Graph intrinsify implicit getters/setters in common cases.
To make implicit getters/setters frameless in common cases we use graph
intrinsics. We do this for boxed as well as unboxed fields. We do this
only for simple cases (e.g. not if field guards or possible boxing are
involved).

It also removes the hand-written assembly intrinsics for the getters,
which avoids bugs if boxing-state of field is not the same as
boxing-state of setter/getter.

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

Change-Id: Id3bd7842ead0278fee61d4a21c8661ce18dbccee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155900
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2020-07-29 14:49:45 +00:00
Dmitry Stefantsov 1b2c267bb2 [cfe] Use unwrapping of nullability constructor in upper bound
Previously to unwrap a type in isTop method the declared nullability
was set to Nullability.nonNullable.  This doesn't work for
intersection type because .withDeclaredNullability() doesn't work for
them.  This CL introduces a method that simulates the removal of the
top-level nullability type constructor from a type term, and uses the
method in isTop to account for intersection types and other possible
similar cases in future.

Change-Id: I3e6f30b5d93850b2cf92475a89d09d6d9255089f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156193
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-07-29 14:24:05 +00:00
Johnni Winther ac85af3a0c [cfe] Handle type parameters bounded by Null/Never in local function parameter type inference
Closes #42206

Change-Id: Id36fe76d8581ab0712165a8c90f1734d4be1a913
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156186
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-07-29 14:21:17 +00:00
Martin Kustermann 5b18fa0798 [vm/compiler] Move CheckArrayBoundInstr::Canonicalize to its base class
This ensures redundant bounds checks are eliminated for
GenericCheckBoundsInstr (in addition to CheckArrayBoundInstr which we
already do).

Change-Id: Ie49e63f3e48cd7c90f5616cc1394f4d8a6920699
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156188
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-07-29 13:46:06 +00:00
Alexander Thomas bac90ab84f [co19] Roll co19 to 86c948fbe7c8a9e74f572038f2ec70dfce7f20b0
2020-07-29 sgrekhov@unipro.ru Fixes 875. LibTest\io\HttpClientBasicCredentials and LibTest\io\HttpClientDigestCredentials migrated to null safety
2020-07-29 sgrekhov@unipro.ru 870. Minor fixes
2020-07-29 sgrekhov@unipro.ru Fixes 870. LibTest\io\HttpClient migrated to null safety
2020-07-29 sgrekhov@unipro.ru Fixes 871. Don't expect an error for super.== any longer
2020-07-29 irina.arkhipets@gmail.com Fixes 873: minor improvements for LibTest\typed_data\Float32x4 tests.
2020-07-29 sgrekhov@unipro.ru LibTest/collection tests fixed after tryjob run

Change-Id: I12a86bd0b87e395ef0bb336b8af998ba21608bcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156190
Reviewed-by: William Hesse <whesse@google.com>
2020-07-29 12:33:44 +00:00
jlcontreras 35a8b1ec28 Add tests for the Value Class feature.
Add experimental flag to tests.
Add words to test spelling dictionary.

Change-Id: Ie739a84fd85e7f85f312416f34506ee76313803b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156021
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-07-29 11:47:06 +00:00
Jonas Termansen defb631f2e Roll benchmarks-internal 171db4d6bcd4..9bc9e373b3d3
d33955fd00f65fc5703c46245162feb4cb647098 https://dart-internal-review.googlesource.com/c/benchmarks-internal/+/2200
9bc9e373b3d3cacdd7aba906caea77075c6cd2e3 https://dart-internal-review.googlesource.com/c/benchmarks-internal/+/2201

R=whesse@google.com

Change-Id: Ia666c4edaf6eaba90da874bf084362383a4bcb54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156189
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-07-29 11:11:24 +00:00
Alexander Thomas 7d15f06959 [infra] Add VM simarm64 nnbd builder to the test matrix
Also balances shards to reduce cycle time.

Change-Id: I3e6446076e29627e171a41bd53a1dd4754ce68ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156187
Reviewed-by: William Hesse <whesse@google.com>
2020-07-29 10:53:36 +00:00
Alexander Thomas a22f38efa7 [co19] Roll co19 to 872367c00df43a2057f541d1920b8f42f6ebbeec
2020-07-29 irina.arkhipets@gmail.com Fixes 872: LibTest\typed_data\Float32List tests adopted for null safety.
2020-07-28 irina.arkhipets@gmail.com Fixes 869: LibTest\typed_data\ByteData tests adopted for null safety.
2020-07-28 sgrekhov@unipro.ru Fixes 868. LibTest\io\GZipCodec migrated to null safety
2020-07-28 irina.arkhipets@gmail.com Fixes 867: LibTest\typed_data\ByteBuffer tests adopted for null safety.
2020-07-28 sgrekhov@unipro.ru Fixes 866. LibTest\io\FileSystemModifyEvent and LibTest\io\FileSystemMoveEvent migrated to null safety
2020-07-28 irina.arkhipets@gmail.com Fixes 852: Constant-update-2018 tests adopted for null safety.
2020-07-28 sgrekhov@unipro.ru Fixes 865. LibTest\io\FileSystemDeleteEvent migrated to null safety
2020-07-28 irina.arkhipets@gmail.com Additional fix for 848: qreflection test updated according to the recent dart changes.
2020-07-27 sgrekhov@unipro.ru Fixes 864. LibTest\io\FileSystemCreateEvent migrated to null safety
2020-07-27 sgrekhov@unipro.ru Fixes 863. LibTest\io\File migrated to null safety
2020-07-27 sgrekhov@unipro.ru Fixes 862. LibTest\io\exit and LibTest\io\exitCode migrated to null safety

Change-Id: Ib5aed3ef85525c438da23e99daa45b8f35e5e06f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156185
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Sergey Grekhov <sgrekhov@unipro.ru>
2020-07-29 10:52:53 +00:00
Johnni Winther 135c44afd9 [analyzer,cfe,dart2js] Ensure id-testing shards are deterministic
Sharding was based on the directory listing. Now we sort the entities
by test name before sharding to avoid dependency on the file system.

Change-Id: I5e6ecc191d84eb1820c05bcef0a27d8b03d89286
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156025
Reviewed-by: Jens Johansen <jensj@google.com>
2020-07-29 09:45:59 +00:00
Johnni Winther a021b99fc3 [cfe] Fix scope setup for generic function types
Closes #36870
Closes #41951
Closes #42364

Change-Id: Id323bfdc26c688bfeb756ef8c1e0530283b44e34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156028
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-29 09:04:24 +00:00
Johnni Winther 767692b32f [cfe] Remove error/warning on duplicate library name in export/import
Closes #42700

Change-Id: I1fd047ea91de45be727690cf6053298cecf91410
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155326
Reviewed-by: Jens Johansen <jensj@google.com>
2020-07-29 08:53:06 +00:00
Johnni Winther 07aa9ec332 [cfe] Add test for issue 42537
This adds a language versioning test that shows that the language
version for a package defined in a `.packages` will have version 2.7
and whereas a package defined in a `.packages_config.json` will have
the current language version (2.8 in the test). Therefore the
former will not have the non-nullable experiment enabled even when
the package is in allowed_experiments.json.

Change-Id: Iabf5d6882e21538cfc1237d848bad03a37825dfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156000
Reviewed-by: Jens Johansen <jensj@google.com>
2020-07-29 08:15:33 +00:00
Johnni Winther 8e7e400a00 [cfe] Use legacy erasure in LUB computation in opt-out libraries
Closes #42836

Change-Id: Ibe6d8e54e082ffb204ccc18f438809c7776c1cd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156001
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-07-29 07:36:34 +00:00
Leaf Petersen fcbf4932be Add tests for mixed mode upper bound.
Tests for the null safety specification change landed
in https://github.com/dart-lang/language/pull/1109 .

Change-Id: I5e9388a99a8a121870b5dd8a844db4f9857a9eea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155380
Reviewed-by: Paul Berry <paulberry@google.com>
2020-07-29 05:04:38 +00:00
Karl Klose 637aeeb781 [infra] Empty SDK commit to validate recipe changes
TBR=athom@google.com

Change-Id: I267ffe00047a403ad4d98b959ead370b3ed89f7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156180
Reviewed-by: Karl Klose <karlklose@google.com>
2020-07-29 03:41:44 +00:00
Sam Rawlins d4f912dadb Analyzer: Move all remaining tests from compile_time_error_code.dart and remove
Change-Id: Id3c2a3df6aea0437b9e0798040ac76fa96a01215
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-29 02:51:50 +00:00
Nicholas Shahan bad34bdb9d [ddc] Delete unused target dartdevc_patch_sdk
Change-Id: Ia15ffea7f5198125d6ce1b8b04ef8d830678d420
Fixes: https://github.com/dart-lang/sdk/issues/42825
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156041
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-07-29 01:10:51 +00:00
Nate Bosch 5e6d949757 Remove some misleading int returns from main
During normal execution the return value from `main` is _not_ used as an
exit code. Fix some cases that try to use it that way.

Change-Id: I292dc8ebf0acc8cb3d4d72f55107e438df9112de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156143
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-07-29 00:47:01 +00:00
pq 89504b4e84 bulk fix for avoid_empty_else
Change-Id: I5ec1f4c1223aba42e972b78a3c31cc7c2f71c23e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-29 00:43:31 +00:00
Ryan Macnak fbc753337f [test] Skip scavenger_abort_test on AOT.
Bots seem much slower than local testing.

Change-Id: If5ce44a0b59b82c8651017f7efe810b8a4c65ef5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156052
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-07-29 00:36:55 +00:00
pq 1a28fb28c8 bulk fix for avoid_annotating_with_dynamic
Change-Id: I29815825e65f51f3db8ec2320412f9926abd0a92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-28 22:10:55 +00:00
pq 2cd8fc1e97 fix command
(Disabled; comment in to enable.)

The command calls out to the DAS using the bulk fix protocol to fix all bulk-fixable issues.

Fixable diagnostics are captured in the `BulkFixProcessor.lintProducerMap`.


Sample output:


```
[~/src/repos/dart/sdk/pkg/dartdev] (fix_cmd) $ dart bin/dartdev.dart fix

*** The `fix` command is provisional and subject to change or removal in future releases. ***

Computing fixes in dartdev...          5.0s
Applying fixes to:
  lib/dummy2.dart
  lib/dummy.dart
Done.
```


Change-Id: I71f82623a452cb747bfc13dba0bb764ec9b1a15b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156046
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-07-28 22:02:51 +00:00
Ryan Macnak 5a085c6bcb [test] Prevent tree-shaking of fields in scavenger_abort_test.
Change-Id: I427987827200d9311ba94040d673e4d2a8e06d65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156049
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2020-07-28 21:57:51 +00:00
Konstantin Shcheglov 78bcab9428 Fix for NPE when REMOVE_UNUSED_PARAMETER in invalid code.
R=brianwilkerson@google.com

Change-Id: Ida985d86e062d6c62efa2ae8a394f75a239644e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156068
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-28 21:24:06 +00:00
Alexander Markov 76711d10af [vm/nnbd] Improve performance of Future.value
Make sure Future.value constructor is inlined, so 'value == null'
test can be removed. Also, removes the implicit cast to FutureOr<T> on
all code paths and only leave a faster 'value as T' cast in case
value == null.

EmptyFutureTest benchmark in AOT/null safety mode on linux/x64: +11.62%

Change-Id: I56916d3a1f6a60e3fc9c50cd565db71aea6ab975
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155928
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-07-28 20:38:49 +00:00
Ryan Macnak 19e6ae22b2 [vm, gc] Do not FATAL when the scavenger fails to allocate.
With the introduction of paged new-space, it became possible for the scavenger to fail to allocate if old-space could not grow and survivors did not pack after being reordered, and the scavenger would FATAL out. Long before that, the scavenger could fail to allocate the other semispace and FATAL out. Now an allocation failure causes the scavenge to abort, and partial forwarding to be reversed.

Change-Id: Idadfa4d9797aa7afce362bf70343e66b1b1dfeaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155683
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-28 19:42:09 +00:00
pq 03e4737f31 bulk fix for prefer_contains
Change-Id: Ifb45c1d9dbb19ca7ac6ba20ce9da1b7712827d76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156120
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-28 18:24:26 +00:00
Christian Altamirano d983751b77 [dart2js] Refactor a few methods for type masks
Pass the CommonMasks abstract value domain instead of the JClosedWorld to TypeMask methods that need access to *their* abstract value domain. It is wrong to get the abstract value domain from the JClosedWorld because when we try to wrap abstract values, the abstract value domain in the JClosedWorld is the wrapper domain, not the domain being wrapped.

Change-Id: I5bbd0f4c56abe45714dd0a2657f73ef240efae0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155640
Commit-Queue: Christian Altamirano <coam@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-07-28 17:25:40 +00:00
pq fbe33e8123 avoid_init_to_null bulk fix
Change-Id: I2c40b1028382d1818dc13a3f80e94184738016c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156069
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-28 16:03:48 +00:00
Brian Wilkerson 58a6e3c478 Rewrite handling of ignore comments to use token structure rather than regex
This also captures the information needed for the hints we want to add
around duplicated, erroneous and unnecessary ignore comments.

Change-Id: Ibafa2a92a02cf8113c222680f4868c38166d94e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155847
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-28 15:18:08 +00:00
Brian Wilkerson 4a268b764c Support const subclasses of visitor classes (issue 42853)
Change-Id: Idee546d25a4cb96d790d966695c852c22f4c3392
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156064
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-28 13:54:18 +00:00
sgrekhov 9b96337521 [co19] LibTests/async tests enabled in status files
Change-Id: I268dff370f6067ebe7ede16b1e655a427329bca0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155603
Reviewed-by: Alexander Thomas <athom@google.com>
2020-07-28 13:08:10 +00:00
jlcontreras 355cade14f Add experiment flag for Value Classes
Change-Id: I94b42676ed233c3d421ac41be1c74dd90c74501e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156005
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Javier López-Contreras <jlcontreras@google.com>
2020-07-28 12:16:08 +00:00
Jonas Termansen 459769185c Roll benchmarks-internal 0e59a6bc3ee9..171db4d6bcd4
2329d2a24cc5067529c8b0f1e8eb53294d060679 https://dart-internal-review.googlesource.com/c/benchmarks-internal/+/2180
171db4d6bcd4689ef3328eedc6ce3ffd21cea168 https://dart-internal-review.googlesource.com/c/benchmarks-internal/+/1100

R=regis@google.com, rmacnak@google.com

Change-Id: Id723a7fef4a01465f88ebc2bb6d509d509a7e8be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155800
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-07-28 11:31:06 +00:00
Alexander Thomas d19617f513 [infra] Remove ABI builder from the test matrix
This is no longer a feature we plan to support.

Change-Id: Ie916f3bbb0313c98863e360472f126c24340013d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156026
Reviewed-by: William Hesse <whesse@google.com>
2020-07-28 09:09:45 +00:00
Johnni Winther 251c3d7d42 [cfe] Allow nullable arguments to super==
Closes #42603

Change-Id: I52261ccb7c1d88a7469a72e244466b193777fe38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155330
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-28 07:41:01 +00:00
Alexander Thomas 125f9e3ae8 [infra] Increase shards for co19 tests on VM AOT NNBD builder
With more co19 tests getting migrated, some shards were timing out.

Change-Id: I2e8acbf6f41cb472fc48a8bcdbf07d2387623ad1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156024
Reviewed-by: Karl Klose <karlklose@google.com>
2020-07-28 07:01:06 +00:00
Johnni Winther fffd0d04b1 [cfe] Handle Null/Never-ish spread element types
Closes #42758

Change-Id: I0b25a5a1abc0896300f61fc98f514f1ed1a63e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155447
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-07-28 06:29:36 +00:00
Johnni Winther 77fcb33bd0 [cfe] Update local function return type inference
Closes #42721

Change-Id: Ia962c8ff3b6d469a0884b8983994de5c5c2286f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155760
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-07-28 06:29:17 +00:00
Johnni Winther 4c210e8b98 [cfe] Infer Null from implicit return in function literal type inference
Closes #42743

Change-Id: I7aca374894704cdc002d927aef9ea72cbabd12e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155606
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-07-28 06:29:17 +00:00
Johnni Winther 45173623e2 [cfe] Add test for issue 42459
Closes #42459

Change-Id: I77215b0b6dcdf4cdbfd07796c41478087607359f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155860
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-07-28 06:28:34 +00:00
Clement Skau 6ca00d12c0 [VM] Adds Future.wait support for --lazy-async-stacks.
- Makes Future.wait a recognised function, and asserts its chained
future, _future is allocated at a known index in the context.
- Adds logic to locate, extract the chained future during lazy async
stack unwinding.
- Adds tests for the Future.wait async case.
- Minor consistency nits, comments.

This change is similar to a previous CL, adding Future.timeout support:
https://dart-review.googlesource.com/c/sdk/+/152328

Change-Id: I7439750968595d25d7bbac0068ad64fcc891e176
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155420
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-28 05:41:01 +00:00
Mehmet Fidanboylu d878cfbf20 [dart:io] Introduce per-domain policy for strict secure connections.
The default behavior is controlled via a private configuration variable
settable by embedders (#_mayUseInsecureSocket). It is, by default,
configured to allow insecure connections. The domain configuration
itself is sent as a JSON encoded string which gets parsed once.

Embedders are expected to set these configurations before they run any
user code.

This is a re-work of https://dart-review.googlesource.com/c/sdk/+/142446
[dart:_http] Allow the embedder to prohibit HTTP traffic.

Change-Id: I4ccbd35da9ce25bf5f81ad4468111018d6af2f03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/154180
Commit-Queue: Mehmet Fidanboylu <mehmetf@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-07-28 05:21:11 +00:00
Ryan Macnak 3a821631fb [vm] Fail gracefully when background compilation runs out of memory.
Bug: https://github.com/dart-lang/sdk/issues/42852
Change-Id: I63ba1cb71dd9ad50b583a19ea3a3859c1d667ccc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156042
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-07-28 00:13:51 +00:00