Commit graph

70344 commits

Author SHA1 Message Date
Mayank Patke
1591ddcf1e [dart2js] Normalize DartTypes.
Change-Id: I2c3ddbecf9f9bbaac8f940398a7d5949c441fca4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134941
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-14 01:59:12 +00:00
Mayank Patke
573f470615 [dart2js] Represent nullability as a field.
Change-Id: I12f4c7acfa294b0e92d3f94f7099ffa2aa9cc0a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134792
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-14 01:59:12 +00:00
Siva Annamalai
fcf88fe6fa Revert "[vm/concurrency] Remove redundant isolates list, ensure shutdown procedure waits until the isolates actually got deleted"
This reverts commit 40eaf81834.

Reason for revert: This CL seems to cause an OOM error in Flutter tests, the Flutter HHH bot also shows failures starting with this CL. Please see https://github.com/dart-lang/sdk/issues/40627 which has an ASAN dump indicating a double free.

Original change's description:
> [vm/concurrency] Remove redundant isolates list, ensure shutdown procedure waits until the isolates actually got deleted
> 
> Issue https://github.com/dart-lang/sdk/issues/36097
> 
> Change-Id: If24affbb838eff8d80e5d448eac7455b3ffcb3a1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135062
> Commit-Queue: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Alexander Aprelev <aam@google.com>

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

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

Change-Id: I7329a9cccc788e7ae2794639e0c76071fd4d9aa2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135792
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-02-14 00:29:38 +00:00
Joshua Litt
c894118574 [dart2js] Migrate js patch file to NNBD.
Change-Id: I51296bd310c5ce902483253656acf07263d9244b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135486
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-14 00:03:27 +00:00
Robert Nystrom
0d34bf5571 Remove another one of the unittest-like libraries.
This one was literally only used for a single test. :-/

Change-Id: I316e17ecaf9a839b3c6f27ec86971a67ab52bbfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135782
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-02-13 23:36:13 +00:00
Robert Nystrom
40d544bc26 Always count non-core libs when tracking migration progress.
Now that they're farther along, there's little need to keep them
separate.

Change-Id: I3dedcf34b97cf5f0645fe429b357a459850d65d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135740
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-02-13 23:05:29 +00:00
pq
9e2d9ecd92 tests for missing getter/setter available suggestions
See: https://github.com/dart-lang/sdk/issues/40626

Change-Id: I3e35b5d7bf849c1afd20b5bd512b7e8b201e2200
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135783
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-13 22:46:39 +00:00
Brian Wilkerson
63c8bb7e46 Collect information about the AST structure at completion points
There might be a better way to get this information, but if we have a
constructor invocation the identifier is resolved to a class element
rather than a constructor element. This is an attempt to be able to tell
the difference between those two cases.

Change-Id: I6086d53c108686a42162108f764758bb97cffc3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135761
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-13 21:46:18 +00:00
Konstantin Shcheglov
c7b501625e Validate not only errors, but also warnings.
Change-Id: I2c03711061ccd40d1609cf9148f3169b4df847d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135600
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-13 21:31:59 +00:00
pq
867d6537df enum constant and named cons test cases
Verifies that our client algorithm addresses issues seen in IntelliJ (https://github.com/dart-lang/sdk/issues/40620) and worked around in VSCode (ea7443dab3)

Change-Id: I2029d89559625ff666c947186d90484794f6b38b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-02-13 21:24:48 +00:00
Jaime Wren
01e079eff1 The initial dartdev pub * command - pass on all arguments from the 'dartdev pub *' invocation directly to 'pub *'.
Change-Id: Ife14cfad7634c03c41b19db68f2cb6c4b26be0cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134600
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-02-13 20:43:38 +00:00
Paul Berry
4bde1f1851 Migration: test to make sure exact nullability isn't applied too much.
This is a regression test that would have caught the mistake in
https://dart-review.googlesource.com/c/sdk/+/135351 (see that CL for
additional details).

Change-Id: Ideaf83df6deae3f6688fc89cfd8b3568344c5d4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135660
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-13 20:23:18 +00:00
Konstantin Shcheglov
ed705e8c84 Move DEAD_NULL_COALESCE reporting to ErrorVerifier.
So, it is reported even when hints are disabled.

Change-Id: Id2df8faa5421fac00e01755a70aedf3d3f570f10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135492
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-13 19:42:48 +00:00
Joshua Litt
93bb4b0f1b [dart2js] Migrate a couple of trivial libraries to nnbd.
Change-Id: I5940b3ec3d322cabd41b68ccc128054041891b88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135485
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-13 19:40:40 +00:00
Brian Wilkerson
b03ef5b3fe Convert more doc comments in analysis_server
Change-Id: I333d0af4444226a8152e840c4d9015fb4c30bd32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135700
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-13 19:29:28 +00:00
Paul Berry
4ca3d267ee Run legacy co19 tests in analyzer-asserts-weak configuration.
This will allow us to see whether any legacy co19 tests are expected
to fail when we unfork the SDK.

Change-Id: If3c1b86a86094e4754e0cff44238edd6d0c5f752
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135623
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-13 19:08:58 +00:00
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