Commit graph

70328 commits

Author SHA1 Message Date
Joshua Litt
166edab750 [dart2js] Migrate developer patch file to nnbd.
Note: This is mostly just the DDC developer patch file.
Change-Id: I98277304b2fbe8fa939dc7e6fb4bd9e0c199b2b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135535
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-13 18:37:38 +00:00
asiva
0838c9ebc2 Enable co19_2 legacy tests in the NNBD bots.
Change-Id: I9ddcf7314e9f1f1b59e29320b53addd594733297
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135501
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-02-13 16:45:08 +00:00
pq
d42b7bc15a partition imported/not-imported suggestion sets / de-dup
Change-Id: Iba72b3599e9153e9fac3dd883d7bdb272c25fa65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135622
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-02-13 15:57:28 +00:00
Aske Simon Christensen
6a7d4e22b5 [vm/aot] Include entries for null in the dispatch table to avoid check.
NullCheck pc descriptors are added to all dispatch table calls where the
receiver may be null (and the selector is not one implemented by null).

All null entries in the table go to the NullError runtime entry, which
reads the NullCheck pc descriptor to get the name of the called member
for the error message.

Change-Id: I9d2847d0ccdfdb735b06e879916920ec299f39bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134294
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-13 15:32:48 +00:00
Aske Simon Christensen
27e64c309e [vm/aot] Optimize selector offsets for smaller instruction sequences.
The instruction sequences for dispatch table calls have three versions,
depending on the selector offset relative to where the dispatch table
register is pointing:
- Optimal: Zero offset
- Small:   A small range of positive and negative offsets
- Large:   Larger positive offsets
The exact limits for small offsets depend on the target architecture.

This commit changes the dispatch table layout algorithm to favor
offsets corresponding to smaller instruction sequences for selectors
with many callsites.

As a result, == (which is by far the most abundantly called selector)
gets the zero offset, and most commonly used selectors (such as [],
iterator, current and moveNext) usually get small offsets on ARM and
ARM64 targets (where the range of small offsets is reasonably large).

Change-Id: I4be9ef8e709c71681b5743084f280ce1673bc0ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132663
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-13 15:32:48 +00:00
Aske Simon Christensen
1c2d378068 [vm/aot] Use TFA to eliminate unused selectors in dispatch table.
For each selector, count the number of calls to the selector that are
both reachable and polymorphic according to the TFA. Only include
selectors in the table with non-zero counts.

This reduces the dispatch table size by 30% in dart2js and by 49% in
Flutter Gallery (312k memory use reduction on ARM64).

Call counts are transferred in a dedicated metadata block with
per-selector information. This mechanism also prepares for transferring
other per-selector information in the future.

Change-Id: Iba15aa4d6c50e67e53c3fd8e542123d3fc98bd07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132603
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-13 15:32:48 +00:00
Aske Simon Christensen
022b362e84 [vm/aot/tfa] Add missing visitor methods for call site instrumentation.
Some visitor methods were missing in the TFA transformation, causing
some call sites (such as PropertySet) to not be instrumented with
metadata communicating the analysis results.

Visiting all instance call sites (including PropertySet) is also needed
by table dispatch to collect correct summary information on selectors.

Change-Id: I488d5cd10700666dab05bd5c5304010aa90b1943
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135319
Reviewed-by: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-13 15:32:48 +00:00
Brian Wilkerson
e75c9192a1 Start converting dartdoc style in analysis_server
Change-Id: I013659a0f34dafce4c091dc534e2ab8ef0469217
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135491
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-13 15:00:03 +00:00
Brian Wilkerson
16033f922d Enable prefer_contains in analysis_server
Change-Id: Idac9828eb452f685452a33e6946ece2ba0d197f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135583
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-13 14:52:08 +00:00
Brian Wilkerson
1cc9413926 Add dartfix support for prefer_contains
Change-Id: I0f3c8a6198560ed36d465ebd08c40ed438a79bf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135490
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-13 14:51:59 +00:00
Samir Jindel
bcc0900e6a [vm] AOT blobs snapshots are obsolete. Remove dead code.
Change-Id: I35cf4befbe66b92197dcd659172f90be3de30f8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134840
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-02-13 14:16:49 +00:00
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