Commit graph

70367 commits

Author SHA1 Message Date
pq a0323c755f convert test path (for windows)
Change-Id: I8abb8605d1161147ae6bbcdb2139767b2ad020a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135621
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-02-13 13:53:48 +00:00
Karl Klose c90fca7188 [infra] Inline content of cloud epiloque file into approval script
Change-Id: Ifdbe1297e30dc6ed4e44d3fc9ba62c3faf0d8bde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133986
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-02-13 12:02:21 +00:00
Daco Harkes 902e2b097b Revert "[vm] Arm Assembler simplify code for SubImmediateSetFlags"
This reverts commit be38459b98.

Reason for revert: Comments in other pieces of the code state that kMinInt should be able to flow into SubImmediateSetFlags.

Original change's description:
> [vm] Arm Assembler simplify code for SubImmediateSetFlags
> 
> See https://dart-review.googlesource.com/c/sdk/+/124136/9/runtime/vm/compiler/assembler/assembler_arm.cc#3203
> 
> Change-Id: I8d2a1bb781f22d6aae0e02eacf042a203a44790d
> Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-product-arm-try,vm-ffi-android-release-arm-try,vm-kernel-linux-release-simarm-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-bare-linux-release-simarm-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm_x64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134333
> Commit-Queue: Daco Harkes <dacoharkes@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,dacoharkes@google.com

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

Change-Id: Idb6ec6e55256c3a4894179a844d118a41378a074
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try, vm-ffi-android-product-arm-try, vm-ffi-android-release-arm-try, vm-kernel-linux-release-simarm-try, vm-kernel-precomp-android-release-arm_x64-try, vm-kernel-precomp-bare-linux-release-simarm-try, vm-kernel-precomp-linux-debug-simarm_x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135645
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2020-02-13 10:25:07 +00:00
Vyacheslav Egorov c096f9d6e5 [gardening] Fix 3H patching logic with respect to newly added dependencies.
Dependency might reside in path with one name but come from a repository
with completely different name.

Change-Id: Ic96ba2d5e32a8a5eeb3fdc44cae732ae35eac22d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135643
Reviewed-by: Jens Johansen <jensj@google.com>
2020-02-13 09:05:36 +00:00
Clement Skau 34447c8dbb 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>
2020-02-13 08:27:07 +00:00
Jens Johansen 0a8484ca20 [CFE/VM] Add patch after 'Use package config v2'
After 81d4ac07d4 ([CFE] Use package config v2)
landed the HHH bot hasn't been able to compile.
Hopefully this CL fixes that issue.

Change-Id: Ia3bb983f5a2ccf2539e59452b58058970bb6af1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135641
Reviewed-by: Jens Johansen <jensj@google.com>
2020-02-13 08:19:57 +00:00
Sigmund Cherem f1d715b4d6 [dart2js] migrate dart:_interceptors and dart:internal patch files
Change-Id: I54b81401c94c866770c492f818e76dcf6d40868f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135488
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-02-13 02:16:57 +00:00
Ryan Macnak 3fbf5f93b6 [vm, service] Fix stack overflow in heap_snapshot.dart's data representation.
Although the old code does not involve deeply nested invocations, it does create one local variable per node, which requires a very large frame. Instead, flatten the tree into a list and re-inflate the tree interpretatively.

Change-Id: I9bbb8f0fe100f1d69daa14a92aa69412c668472b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135444
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-02-13 01:46:28 +00:00
Nate Bosch 43bbf73da3 Update doc comments for dart:js_util
- Format consistently with a header sentence.
- Use `JavaScript` over `JS`, and surround references to the `@JS()`
  annotation with backticks.
- Drop the word "efficiently" since it isn't true of the more commonly
  used API `jsify`.
- Add a note about preferring `@anonymous` interop classes over `jsify`
  with a map.
- Remove mention of `JsObject` since this isn't what gets returned.
- Clarify that Dart objects can't be used from JavaScript, this is
  mentioned at the library level but it worth repeating on `jsify`.

Change-Id: If7582db6440d96f20bb5b4e11bcc0ffe047d9d0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135525
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kathy Walrath <kathyw@google.com>
2020-02-13 01:41:41 +00:00
Zichang Guo fb7e6ba494 fix nnbd http parsing bug for http_headers_test
This fixs part of http_headers_test. The rest is because HeaderValue becomes non-nullable(in this cl https://dart-review.googlesource.com/c/sdk/+/134722).

Change-Id: Id1aad86363564986dba5282a9983924252ae0ecb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135530
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-02-13 00:49:29 +00:00
Joshua Litt cefd113de2 [dart2js] Migrate convert to nnbd.
Note: This is the DDC convert patch.
Change-Id: I4dbdcc146756a32ddfc12c5bf9e0cc1592f40b69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135442
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-02-13 00:14:27 +00:00
Robert Nystrom ddef611e04 Copy over the README.
That's the only thing in language_2/async_no_suspend.

A little weird, but I think it's worth copying it just to minimize the
diff between the two test directories.

Change-Id: Iac7078d8e44ac63331c38bd6465a654880bbeb98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134905
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-02-12 23:45:07 +00:00
Robert Nystrom ca6cb6ce75 Always pass --default-language-version=2.7 to analyzer for legacy tests.
Change-Id: I2adca91ce34a343a6dd21aeb891ec041283f3365
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135529
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-02-12 23:38:37 +00:00
Alexander Markov 0a57671f90 [vm/nnbd] Use legacy types to create lists in Dart_NewListOf
In order to be backwards-compatible existing Dart API should create
lists using legacy types (instead of lists of non-nullable types).

Issue: https://github.com/dart-lang/sdk/issues/40176
Change-Id: Ie5460b41b2c5e9ecfb124bce1ab43fd466930ea0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135531
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-02-12 23:05:58 +00:00
Konstantin Shcheglov 5c332bea91 Stop using 'factory something() => null;' in most cases.
I did not change MockSdk, to avoid conflict with
https://dart-review.googlesource.com/c/sdk/+/135241

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/40603
Change-Id: I9f0af20f5914b5ac1aefee02aa8052db269529b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135532
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-12 22:58:57 +00:00
Ben Konyi 3d1b8b26c2 [ 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>
2020-02-12 22:48:08 +00:00
Zichang Guo 91eee195fc [http] loosen status code constraints and rephrase some http exceptions
1. Remove limitation of http response status code check. It used to be [100, 599]. Extends range to [0, 999] to allow users to use customized status code.
2. Rephrase some http exceptions to be more informative.
3. Possibly a bug in isHead setter, where it is only allowed to set to true.

Bug: https://github.com/dart-lang/sdk/issues/38898
Change-Id: I77d8d66eb8333dec1f53742821860b802f74f680
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134763
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-02-12 22:21:57 +00:00
Brian Wilkerson 86b1b9d03c Enhance member depth completion metrics
This now looks in mixins (which were ignored before) and finds matches
from interfaces, reporting the interfaces separately from the superclass
and mixin chain.

Change-Id: Id5f3379261e1ec184dc347abb371693481b65680
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135528
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-12 22:16:32 +00:00
Nicholas Shahan dd9adebad0 [dartdevc] Fixes to support un-forking dart:_runtime
- Cleanup some instances of `core.Type._check()` from generated code.
- Remove assertions to avoid a bootstrap ordering issue.
- Ensure testing for FutureOr in the SDK before async.FutureOr has been
  loaded returns false.
- Make the Null Safety strict mode option false by default.

Issue: #40266
Change-Id: I109432ed5226d8187b600c1d4ba6264d9b2f6a9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135380
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-12 22:10:48 +00:00
Konstantin Shcheglov 84ff9e5008 Fix NullabilityEliminator to substitute type parameters in bounds.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I9b3d986a52f8006854b23db600493566aea86cb9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135527
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-02-12 22:08:27 +00:00
Alexander Markov 0966e06ee4 Reland "[vm/nnbd] Enable type testing stubs in NNBD weak mode"
This is a reland of bffc9d101e

Original change's description:
> [vm/nnbd] Enable type testing stubs in NNBD weak mode
> 
> According to the current NNBD spec we should use legacy subtyping rules
> when running in weak mode (disregarding nullability and accepting 'null'
> in type casts). So we can reuse exactly the same type testing stubs as
> we used before (in NNBD weak mode).
> 
> Change-Id: I387660fc2c8b36eb993239de9e34cc2bf9f7bb93
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135381
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>

Change-Id: Id40fe1465e480caaca1ab568664d2c45c96539a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135526
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-02-12 22:00:57 +00:00
Paul Berry f57f1eb56b Add an analyzer test step to test legacy code using the unforked SDK
Change-Id: I7a06dbeacbf389ecfb343528652c9ec2ba545745
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134340
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2020-02-12 21:32:49 +00:00
pq afaeb04137 sanity check project files for errors
Change-Id: Ie530f0aec435440abbcf4a1feb34ee7cb53ebab1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135524
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-02-12 21:12:37 +00:00
Brian Wilkerson 4f6a5811fc Add json support to completion metrics computation
Change-Id: I43e987c946dc5c3b200ced14c132a31cc97b5f29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135560
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-12 21:03:37 +00:00
Robert Nystrom 86f8e3438a Migrate language_2/async_nested to NNBD.
Change-Id: I16f1be4e17fa87aa94b294f281dfe14ea0129eb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134904
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-02-12 20:46:37 +00:00
Robert Nystrom b671b916d4 Treat the observatory service tests as opted out of NNBD.
Change-Id: I240133399323cd25f1e3ea2924c2d8415d79ba2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135521
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-02-12 20:45:57 +00:00
Konstantin Shcheglov 78b1e15637 Don't report NULLABLE_TYPE_IN_CATCH_CLAUSE in opt-out libraries.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Iabd6a4b23c81e25bc7045db6d562c38567c81921
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135522
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-12 20:22:37 +00:00
Joshua Litt 60295a2cef [dart2js] Migrate async_patch.dart to nnbd.
Change-Id: I11a78e5f085e0121a7bdd34de7ab92bddca44f60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135480
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-02-12 20:09:47 +00:00
Sigmund Cherem 272a03a71d [ddc,dart2js] restore null check in dart:js
Change-Id: I275c202368eabc3d72fb49ff21d8635e0905ad69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135443
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-02-12 20:01:57 +00:00
Konstantin Shcheglov 0fa3d79a3f Move applying LEGACY_ERASURE to isCorrectOverrideOf().
Change-Id: Ic9ebd89be8dbbb560b47ae9f96988b552b75ddaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135482
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-12 20:01:27 +00:00
Zichang Guo e0621b65b2 [nnbd] Stop writing chunked into headers
There are some tests failed after switching to NNBD. This is supposed to fix HttpException: Connection closed while receiving data.

It reduced the number of failure from 300 to 70.

The root cause is that HttpHeaders write {Transfer-Encoding: chunked} into _header field once user set it to true. However, when user tried to flip the bit,
remove() function didn't remove the content. This leads to an additional property in header. Parser alarmed when parsing it.

This is inconsistency on how others handle chunked transfer encoding. Looking at add(), set() and remove() implementation, all of them will only set _chunkedTransferEncoding instead of actually touching _header.

Bug: https://github.com/dart-lang/sdk/issues/40534
Change-Id: I80d76f3a6da01022fdb8e755e0def8a630ca376a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135353
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-02-12 19:36:47 +00:00
Sigmund Cherem 9f4769fd30 [ddc] Add back nullcheck in js_array
Change-Id: I9c32705b97c54b47f03898f0d007a3f07b13e465
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135358
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-02-12 19:01:03 +00:00
Konstantin Shcheglov fa74c546b1 Use default FeatureSet for a file in its unlinked unit key hash.
BUG=https://github.com/dart-lang/sdk/issues/40609

Change-Id: I4f333c802d1ba086354701aa41a75dadca8099a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-12 18:57:57 +00:00
Joshua Litt e34299101c Add back null check to _StreamIterator constructor in NNBD.
This check is necessary to make 'for await (var i in null) {} ' throw at runtime.

Change-Id: Id68c3d422671decbe4cb3e3326d9597ad7153d84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134871
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-02-12 18:55:47 +00:00
Alexander Markov c96f1928f6 Revert "[vm/nnbd] Enable type testing stubs in NNBD weak mode"
This reverts commit bffc9d101e.

Reason for revert: timeouts in internal builds (b/149301517).

Original change's description:
> [vm/nnbd] Enable type testing stubs in NNBD weak mode
> 
> According to the current NNBD spec we should use legacy subtyping rules
> when running in weak mode (disregarding nullability and accepting 'null'
> in type casts). So we can reuse exactly the same type testing stubs as
> we used before (in NNBD weak mode).
> 
> Change-Id: I387660fc2c8b36eb993239de9e34cc2bf9f7bb93
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135381
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>

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

Change-Id: I60c2aa74d35c42b6d6149ad3ddec59361c3de41f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135481
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-02-12 18:53:01 +00:00
Konstantin Shcheglov 08778f9045 In legacy libraries apply LEGACY_ERASURE to concrete members.
This fixes with unforked SDK:
* language_2/abstract/equal_test
* language_2/abstract/object_method_test

Change-Id: I8d183f5a15eef29c590fe56f40e813d56ba6ad54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135359
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-12 18:12:57 +00:00
Joshua Litt ad5ee10e69 [dart2js] Migrate a number of trivial libraries to nnbd fork.
Change-Id: I3108823590b41d16a8d0baa25a6760499b2d2f6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135355
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-12 16:43:37 +00:00
Anna Gringauze 30213c4188 Fix expression compiler tests on windows
Recent change
[Implementation of evaluation to JS in frontend server]
(25559399ed)
introduced a failure in windows tests due to
using string concatenation passed to Uri.parse.

Use Uri.resolve instead of string concatenation
to create file Uri in expression_compiler_test.dart

Fixes #40592

Change-Id: Ibccb34333eac33f12b4eecd772707f1edb8bed89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135356
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2020-02-12 16:20:27 +00:00
pq 5fd18be9c5 track analysis errors
Adds analysis error tracking and fixes the enum declaration to not produce a warning.

I'm not happy with `assertNoAnalysisErrors` and would like something more configurable and context-aware but haven't thought it fully through.

Maybe something like:

```
assertNoErrors(
  except: ['unused_import'],
);
```

(And maybe a file and line number?)

Alternatively, we could add ignores to the test sources:

```
import 'a.dart'; // ignore: unused_import
```

and maybe special case the line we're completing on:

```
f(^);
```


Still mulling it all over but your thoughts are welcome!


Change-Id: I1d0c5fbd72c80dde13ae98cb76c3728ab00a12f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135440
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-12 15:42:57 +00:00
William Hesse 31de73f074 [infra] Publish results messages to pub/sub at a slower rate
We have seen scaling issues when processing many pub/sub messages
in cloud functions simultaneously, so we will limit the results messages
from a builder to 1 every 2 seconds.

Change-Id: I31fd9da24d2d5c3bc0afe30b3b165ee65494f29d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135312
Reviewed-by: Alexander Thomas <athom@google.com>
2020-02-12 15:25:25 +00:00
Jens Johansen 81d4ac07d4 [CFE] Use package config v2
Change-Id: I32da9e8b2c1040db1521af4345f8e952c22bd30d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130864
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-12 10:07:25 +00:00
Johnni Winther ed2df21191 [cfe] Decouple MemberBuilder from ClassMember
Change-Id: Ia9d3a3ffa51781cfef1af0451902fe97620d2517
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135303
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-02-12 09:57:55 +00:00
Johnni Winther 776b984115 [cfe] Correctly register parameters as initialized
Change-Id: I43fe9d251a5b79f909dbfb7689f0a37faee0c54c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135307
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-02-12 08:18:25 +00:00
Dmitry Stefantsov 6a2c350a3e [cfe] Fix isSubtypeOf for FutureOrs
Previously it was assumed both A <: B implies FutureOr<A> <: FutureOr<B>
and FutureOr<A> <: FutureOr<B> implies A <: B.  This CL fixes the
implementation.

Closes #38905.

Bug: http://dartbug.com/38905
Change-Id: I2c8d105659b310e3ab5db261ebdc81cbfa456ae1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135301
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-02-12 07:55:37 +00:00
Devon Carew 0299903f3e [nnbd preview] restore navigation in the code editor
Change-Id: I4f3678c8edc5ce606d727ce964806689bcf4a38f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135383
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-12 01:12:05 +00:00
Alexander Markov bffc9d101e [vm/nnbd] Enable type testing stubs in NNBD weak mode
According to the current NNBD spec we should use legacy subtyping rules
when running in weak mode (disregarding nullability and accepting 'null'
in type casts). So we can reuse exactly the same type testing stubs as
we used before (in NNBD weak mode).

Change-Id: I387660fc2c8b36eb993239de9e34cc2bf9f7bb93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135381
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2020-02-12 01:10:05 +00:00
Siva Annamalai e7403c149a Revert "[vm] Aggressive write-barrier elimination."
This reverts commit e5a22713b1.

Reason for revert: We are seeing some crashes on the bot see https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-linux-debug-x64/8684

Original change's description:
> [vm] Aggressive write-barrier elimination.
> 
> Flutter Gallery code size total:
> -0.88% on ARM64
> -0.98% on ARM
> 
> Fixes https://github.com/dart-lang/sdk/issues/39164.
> 
> Change-Id: I8e65b1209ef1150bb73f3474506ebc97d7ab3685
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132003
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Samir Jindel <sjindel@google.com>

TBR=kustermann@google.com,rmacnak@google.com,sjindel@google.com

Change-Id: Ia93b43a423ee982aea550eb9fc24d34509db3dce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135421
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-02-12 00:53:05 +00:00
Konstantin Shcheglov 7575235e3b Test that function types use mutual subtyping for type parameter bounds.
For https://github.com/dart-lang/language/issues/807

Change-Id: Ife86fa35fda20347437391d742a4432518d7898a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135350
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-12 00:29:05 +00:00
Paul Berry 95aade379b Skip test step "check nnbd sdk" on Windows.
The golden file used by this test includes paths that don't match the
paths emitted during analysis on Windows.  After discussion with
Konstantin, Nicholas, and Siggi, we agreed that we don't need to run
this test on Windows.

Change-Id: Ib39b58752c2a5967fde55936c5ca5490bfe94f86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135121
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-12 00:00:55 +00:00
asiva a6001fae29 Turn on first set of legacy testing for the VM NNBD bots.
This turns on lib_2, corelib_2m language_2 and ffi_2

Change-Id: I0bf018cde6bfd8fafcf3df5bd40f5560be3cb93e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135361
Reviewed-by: Alexander Thomas <athom@google.com>
2020-02-11 23:57:50 +00:00