Commit graph

31460 commits

Author SHA1 Message Date
Clement Skau 0ce83987d6 Reland "[SDK] Adds an SDK hash to kernels and the VM."
Note: This is a reland of https://dart-review.googlesource.com/c/sdk/+/150343

Adds a new SDK hash to kernels and the VM which is optionally checked
to verify kernels are built for the same SDK as the VM.
This helps catch incompatibilities that are currently causing
subtle bugs and (not so subtle) crashes.

The SDK hash is encoded in kernels as a new field in components.
The hash is derived from the 10 byte git short hash.

This new check can be disabled via:
  tools/gn.py ... --no-verify-sdk-hash

This CL bumps the min. (and max.) supported kernel format version,
making the VM backwards incompatible from this point back.

This also bumps the min. and current ABI version.

Bug: https://github.com/dart-lang/sdk/issues/41802
Change-Id: I2f85945045a603eb9dcfd1f2c0d0d024bd84a956
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152802
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-07 06:08:20 +00:00
Konstantin Shcheglov 3b25d6ff69 Add DynamicType, NeverType, and VoidType to API.
R=brianwilkerson@google.com

Change-Id: Icf917d999878b3c4d7b1d9425eb8a3c79921ba6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-07 00:22:40 +00:00
Konstantin Shcheglov 11632ff4d4 Add buildSdkSummary() to analyzer API.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/build/issues/2745#issuecomment-654441549
Change-Id: I144dd99be5e5a210e27f3b5b5b54951659479511
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153384
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-06 23:03:09 +00:00
Jaime Wren 431b57cbbb Add an additional category into completion_metrics.dart: parameter references
Change-Id: Ifed40f0eb0472894be92a41f105a6dfb36bcbb36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153367
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-07-06 22:39:39 +00:00
Brian Wilkerson 0d44449aaa Add unawaited to package:meta
Change-Id: I09df4989591327bd4d148e73a5887b900902576c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152680
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-07-06 21:57:52 +00:00
Sigmund Cherem be0f94b218 [dart2js] include dart:_js_annotations into the platform file by default
Change-Id: I7d93347cc41e344213a5c62f72638d4d2fd18728
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153366
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-07-06 21:41:02 +00:00
Jacob MacDonald d9d4e5ccb3 copy package config changes to the modular_suite_nnbd.dart
Change-Id: Ib2c645c0d94adb60693be85b266d23b811982e70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153364
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-07-06 20:53:11 +00:00
Nicholas Shahan 9547628ecf [ddc] Compare types with new DartTypeEquivalence
Avoids an assertion failure in the front end.

Change-Id: I7994fa611f82011857750cc60af64a2c89c96bf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152923
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-07-06 19:39:31 +00:00
Jacob MacDonald f42889fbb8 create package_config.json files in ddc modular test suite
Copies the same changes as were added for dart2js here https://dart-review.googlesource.com/c/sdk/+/152361/9/pkg/compiler/tool/modular_test_suite.dart

Change-Id: I785b275c62c3d3afb9f37c0b0c8c4e4369b4ccf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153362
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-07-06 19:33:11 +00:00
Mark Zhou b4c60e6e1c [dart2js] Removing switch class restrictions.
From the spec: `It is no longer required that the [case expression] evaluate to instances of the same class.`

Fixes #42409

Change-Id: Ieecd96cb75d683658ffc767d973b0ff2f5e6d834
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153060
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-07-06 19:12:51 +00:00
Konstantin Shcheglov 1478b2b71c Prepare to publish analyzer 0.39.12
R=brianwilkerson@google.com

Change-Id: Iea5b9186f6fe89f93b6a95fe2aa2b0045f8a4930
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-06 17:47:21 +00:00
Jaime Wren 1a60f94fd0 Add two failing tests in the local_reference_contributor_test.dart, after some for(var foo ...) ^, the completion is in the implicit statement which is in the scope of the foo declaration.
I imagine that similar tests could/ should be written for other such ASTs.

Change-Id: Iea059af339e5dec34a937ed2c28fe55fdb072fc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-07-06 17:06:10 +00:00
Devon Carew 68bcf1b28a [dartdev] add --enable-experiment support to 'dart test'
Bug: https://github.com/dart-lang/sdk/issues/42339
Change-Id: Ic50493b1e9af5ae626358bee1c0c145f58bb7c2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153323
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-07-06 16:38:11 +00:00
Danny Tuppeny 34ad5a5908 Don't reuse LSP error code that triggers shutdown for refactor errors
Bug: https://github.com/dart-lang/sdk/issues/42573
Change-Id: I615563ed636cf48b4fe84e7588f49bb7137a4f53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Danny Tuppeny <danny@tuppeny.com>
2020-07-06 14:35:43 +00:00
Johnni Winther 5d1fbe0497 [cfe] Handle unforseen type parameter intersections
Closes #42089

Change-Id: Ifb0dc0073e004051ae40aed51db24b0d4b10f50d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152646
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-06 10:09:00 +00:00
Jens Johansen 878e2cacdd [CFE] Don't issue an initialization error when trying to initialize when not having a platform
This CL would have reduced the number of errors given in
https://github.com/dart-lang/sdk/issues/42378
Namely the
"Warning: Tried to initialize from a previous compilation (build/cache.dill), but couldn't."
part wouldn't have been issued.

Change-Id: I3e7f2f0115a13a23522643b6f4c9ad8c57bc0d5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153141
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-07-06 07:40:00 +00:00
Johnni Winther 34f5c9d0b4 [cfe] Implement new async return rules
Closes #41800
Closes #41900
Closes #42134
Closes #42282
Closes #42236
Closes #42169

Change-Id: Ia994bc07fba4e2342fcb59d44fc77608198a328b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152150
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-07-06 07:04:40 +00:00
Johnni Winther 3a4aad6b87 [cfe] Use test description uri for expectation file location
Previously the first file in the `Component.uriToSource` was used which
didn't work nicely with multifile tests.

Text outline expectations were already using the test description uri.

Change-Id: I0d4a7493cd1fa61beffba41f1ea859ca5e8ad08c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151825
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-07-06 07:02:30 +00:00
Brian Wilkerson fa650e46dd Implement the verbose option for dart analyze
Change-Id: I2186a83ad295ad99a2df09a72f08c2b6f531e982
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153321
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-06 04:05:40 +00:00
Ben Konyi c40ebbc65e [ DartDev ] Ignore SIGINT in DartDev process
If a user program installs custom signal handling for SIGINT,
the DartDev instance may exit before its child, potentially causing
confusing behavior and 'zombie' children. By ignoring these signals in
DartDev, the DartDev instance will only exit once its child process
exits.

Fixes https://github.com/dart-lang/sdk/issues/42092

Change-Id: I04bf6d1f375b8bb3a4f7022f2c79ddde3bd5f414
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149643
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-07-06 03:02:00 +00:00
Sam Rawlins bda4994482 Analyzer: Finish using ///-style comments.
This ignores the Lint on a few files where it is undesired.

Change-Id: I5e4244607da0ef60678cebb89a433e44cb1e753f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-07-06 00:54:10 +00:00
Sam Rawlins 42d2996773 Analyzer: Move NON_BOOL_* tests to diagnostics/
Change-Id: I5bc58d78bf4f15e860759176d2e6abc670666e46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-07-06 00:49:10 +00:00
Konstantin Shcheglov 69aba23371 Move TypeSystemImpl to src/dart/element/type_system.dart
R=brianwilkerson@google.com

Change-Id: I0d9acad041c1038f6f2be6c09855488287ba5e97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-05 16:44:59 +00:00
Devon Carew a677c245f1 [dartdev] introduce a hidden --diagnostics flag
Change-Id: I129b350ef993f718fc2baecfa4af05b825d4e953
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-07-04 00:45:22 +00:00
Alexander Markov c5ea3e85a0 [vm/nnbd] Further specialize invocations of List.filled factory
If 'growable' argument of List.filled factory invocation is known at
compile time we can replace it with more specialized constructors
creating growable or fixed-size lists. This results in a more accurate
inferred type and more efficient code which uses the created list.

Fixes https://github.com/dart-lang/sdk/issues/42551

Change-Id: I427e1bdb8a0f2a83410a9533050d19cbca2d27d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153064
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-07-03 23:19:02 +00:00
Konstantin Shcheglov d1c9b09042 Set uri for implicit dart:core import.
R=brianwilkerson@google.com

Change-Id: Ie354df1cd541480f4deb3a4d29c7068990072f6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-03 22:54:02 +00:00
Konstantin Shcheglov eb7d35ea18 Add overrideKnownFeaturesAsync() for DartDoc testing.
R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: I66c03b06e5ac57dbd288242f7bb873d982fe2a30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-03 17:20:22 +00:00
Konstantin Shcheglov 326f7b4a8f Remove DartSdk.useSummary.
Initial:  https://dart-review.googlesource.com/c/sdk/+/149495
Reverted: https://dart-review.googlesource.com/c/sdk/+/149687
Change-Id: Ibd3f1af1aef83adc35f77cfbda66e07c5ae99922
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153241
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-03 15:56:41 +00:00
Konstantin Shcheglov 9cfdc02e58 Stop depending on exports from generated/resolver.dart
We cannot remove them completely just yet, there are users in google3.
But this CL will allow experimenting internally to track these users
and update them similarly.

R=brianwilkerson@google.com, devoncarew@google.com

Change-Id: Ic588b2873f9d5202783c8991f58e86bab28bd47e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-03 15:55:41 +00:00
Vyacheslav Egorov 69ec1a9965 [vm/aot] Add machine readable precompiler trace
This CL adds --trace-precompiler-to option which generates a machine readable
precompiler trace (list of all compiled functions and their dependencies).

It also expands package:vm_snapshot_analysis with tools for reading and
analysing this trace.

For example snapshot_analysis explain dynamic-calls command allows
to list all dynamic calls sorted by their impact on the size of the AOT
snapshot.

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

Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: Ie49143f4da375067991991e2ad20a41ec67bb1c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152851
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-03 09:29:10 +00:00
Konstantin Shcheglov 4301899ed5 Track more Cider operation performance.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: I95f2a36434556256dd5d55395cfc1bfca056763b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153068
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-02 23:33:59 +00:00
Brian Wilkerson cffeac78f9 Mark recently published codes as being published
Change-Id: I9d4ce65e1f95ccf7fbcdb3007bed81e5b4b0ac0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153220
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-02 19:22:09 +00:00
Sam Rawlins f19ed288ed Analyzer: Move INVALID_ASSIGNMENT tests to diagnostics
Change-Id: I111c64bb743dfb531e05be8594cab72c36866274
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153181
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2020-07-02 16:29:49 +00:00
Vyacheslav Egorov 28a3cd2039 [vm_snapshot_analysis] Add buildComparisonTreemap
This helper method compares two size profiles and returns result
as a treemap.

Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: I82e5617bc367a2b89d3685ce7f7babc01492b531
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152908
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2020-07-02 11:35:49 +00:00
Jaime Wren 8afe9875a6 Some incremental changes in the new relevance algorithm to improve the completion quality
Change-Id: I8a0a9e35c16bc497f54cd082241fa0b6d2cba7f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153065
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-07-02 04:17:09 +00:00
Sigmund Cherem b83d06e4f8 Fix order of async callback arguments
This was noticed when running the benchmarks/Calls/dart/Calls.dart with
sound-null-safety.

The only fix that was needed is to swap the argument order, but I also changed
to add the type promotion to make these errors stand out statically.

Change-Id: If47b04596d2da9d30961705fd858f2f2ba2b12c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153062
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-07-01 23:06:24 +00:00
Konstantin Shcheglov 45201d6b12 Move checkAborted() from CompletionRanking to DartCompletionManager.
I don't understand why it falls into the runZonedGuarded() error handler instead of being caught by `on AbortCompletion`.
It seems somehow related to the fact that we throw AbortCompletion inside an async function, but before any `await`.
IIRC we now execute this portion immediately, and actually return a Future instance only when we reach the first `await`.
Maybe this somehow affects the try/catch.

R=brianwilkerson@google.com

Change-Id: I192b5d410d9372205473b6032ef43c7c9880f9ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152906
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-07-01 21:51:54 +00:00
Paul Berry b514f45ac7 Migration: allow tests to override preview server's use of ipv4.
This is necessary for some Google internal testing environments that
are ipv6-only.

Change-Id: I1385786bd0f9614fabcf5730d96a0d6018c6401e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153063
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-07-01 21:26:04 +00:00
Jaime Wren fffa2bd30c Small change from https://dart-review.googlesource.com/c/sdk/+/153020 that Gerrit did not successfully patch before landing the PR
Change-Id: Iac0907d353d7c39c84bbe5c9364c7888e481b694
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152904
Auto-Submit: Jaime Wren <jwren@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-07-01 19:34:24 +00:00
Jaime Wren b08ade3748 completion_metrics.dart change- add an additional group, local references, when printing out the output
Change-Id: I38601eb748d0247413725b62718bcabdb1e3e6fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-07-01 18:36:14 +00:00
Brian Wilkerson 5d064d2748 Add and use a feature based on the distance to a local variable declaration
Change-Id: Id89e2e9bb417fa62095d4e81f9721a8d3c0893ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152901
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-07-01 18:19:44 +00:00
Jacob MacDonald b743d6cac6 add flutter_test to allowed experiments
Bug: https://github.com/dart-lang/sdk/issues/41538
Change-Id: I494fb4404c17e07c2df0d429570b12ebc072889b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153061
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-07-01 18:15:54 +00:00
Dmitry Stefantsov af124aeb9b [cfe] Fix bug in dart type equivalence regarding typedef types
Change-Id: I0fc7d9227bd63401edfab46777c0ed8f30db5cbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153083
Auto-Submit: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-07-01 17:11:41 +00:00
Brian Wilkerson 8cc3d415e7 Integrate suggested changes from the PR to publish the docs
Please look this over carefully; all of your changes have been integrated,
but not all of the changes are yours. While itegrating your suggestions I
found a few more occurrances of 'is not' and 'are not' that I converted.
I also found a couple of other things that needed to be updated.

Change-Id: Iddaaa22d7e584506bc3c16606166771fd5a75caf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152942
Commit-Queue: Kathy Walrath <kathyw@google.com>
Reviewed-by: Kathy Walrath <kathyw@google.com>
2020-07-01 15:58:11 +00:00
Paul Berry 63feed82e1 Rename FlowModel.removePromotedAll to .conservativeJoin.
This makes the implementation consistent with the spec text in
1ed6bab4cc.

Change-Id: Ie25b928c5aacb45a18e85c6f9196b5b55f083478
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152983
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-07-01 13:46:48 +00:00
Eric Dallo 6d3928554c Add lsp-dart to lsp_spec README
https://emacs-lsp.github.io/lsp-dart

Closes https://github.com/dart-lang/sdk/pull/42514
https://github.com/dart-lang/sdk/pull/42514

GitOrigin-RevId: cfa8edf358669c3ec2324a726a848fbc548bb6a3
Change-Id: Icaa90cdbb462b51fae6c186fe7626ca6168b9599
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152820
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-07-01 13:15:22 +00:00
Johnni Winther 236f3f820d [cfe] Fix flow analysis in initializers
The handling of null shorting in the variable initializer interfered with
the declaration of the variable, making subsequent flow potentially
losing track of promotions.

Closes #42504

Change-Id: Idb17920ffe8746983825714f76160abcca54751b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152760
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-01 08:57:18 +00:00
Johnni Winther 7f1f32904c [cfe] Handle extension on nullable type
.. when the property already exist for the non-nullable type.

Change-Id: Ic083de134ea73592de4d68fb3ecc06ddf8398d65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152331
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-01 07:27:28 +00:00
Erik Ernst 41c9fb6a19 [CFE] Type infer aliased factory invocations.
This CL adds support for type inference on type aliased invocations of
factory constructors, redirected as well as non-redirected, and it adds
some tests using this feature.

Additionally, this CL resolves a couple of issues that arose when the
directory nonfunction_type_aliases was migrated to null-safety (by
means of two single line fixes, in 'usage*_test.dart').

Still missing: The shadow nodes should be eliminated in
_unaliasTypeAliasedConstructorInvocations and
_unaliasTypeAliasedFactoryInvocations, this will be done in a separate
CL.

Change-Id: Ic146bd16a02ca8f79c46b7df7c8dff7712f21189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152740
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-07-01 07:19:08 +00:00
Johnni Winther cd1b375bbb [cfe] Handle ...?null
Closes #42304

Change-Id: Ia0c8eb101373bd5342e24e4303212997e4b2729f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152656
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-01 06:57:28 +00:00