Commit graph

72410 commits

Author SHA1 Message Date
Johnni Winther 3f18d37333 [cfe] Implement NNBD_TOP_MERGE update
Change-Id: I6b204b5d7def6a9d1dd4709e47f95eb102741489
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144763
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-27 16:28:08 +00:00
Johnni Winther 3c0e9642d2 [cfe] Ensure default type on generic forwarding stubs/method signatures
Change-Id: Iad6246c55f45953bffe2c3de4a2e30a32db347d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144820
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-27 16:25:18 +00:00
Jaime Wren 7dd9945622 Bug fix in combinator_contributor.dart, don't suggest names already shown or hidden by the existing combinators (in the same directive).
Change-Id: I8de3670d4026ed2b6eda4c24223580e22015864b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144806
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-27 16:18:09 +00:00
Martin Kustermann 87ce4a504f [vm] Fix test to use Uri.file() instead of Uri.parse()
This is a follow-up to

  https://dart-review.googlesource.com/c/sdk/+/144766

Change-Id: Ibff4b307b0293b34a5afdf3d8c508cb8ee66c663
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144944
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
2020-04-27 15:28:38 +00:00
Johnni Winther b8343d071d [cfe] Support Never and Never? in function literal parameter type inference
Closes #41415

Change-Id: Ia98c916da00e663ba909d6c38c6d9dc70d740bb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143812
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-27 15:11:08 +00:00
Johnni Winther e9ca413263 [cfe] Handle nullable access to extension members
Closes #41349
Closes #41495

Change-Id: I1893502592af1615184b5dd294e1835b51959a07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144761
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-27 13:47:08 +00:00
Jonas Finnemann Jensen be32ed440c Update oauth2 to version 1.6.0
Change-Id: I007bf18131d81eee39c2aadf1373b63b6721514c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144767
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
2020-04-27 13:06:38 +00:00
Martin Kustermann b112aa0d8b [vm] Make VM support .dart_tool/package_config.json
This CL makes the VM add support for .dart_tool/package_config.json via
  * the --packages=<file> command line parameter
  * the `packageConfig: <file>` parameter to `Isolate.spawnUri`

It also allows now `package:*` uris being used in `Isolate.spawnUri`

The CL also removes the unused `packageRoot` parameter from the Dart to
C++ interface as well as in various places in C++.

The CL also aligns the implementations between sdk and sdk_nnbd more.

Issue https://github.com/dart-lang/sdk/issues/41649
Issue https://github.com/dart-lang/sdk/issues/41245
Issue https://github.com/dart-lang/sdk/issues/41246

Change-Id: I642dfb89f82b3f2c1613e443850bf0b4fb91f4a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144766
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-04-27 12:54:38 +00:00
David Morgan d5310cb2d6 Upgrade package:pool from 1.3.6 (1.3.6 in pubpsec.yaml) to 86fbb2cde9bbc66c8d159909d2f65a5981ea5b50 (1.4.1-dev in pubspec.yaml).
R=nbosch@google.com

Change-Id: If1bc0f6e86c6b9a626888c1afccb67f9eeae7e9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144723
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-04-27 09:58:48 +00:00
David Morgan 5eab0282ea Upgrade package:mustache from 5e81b12215566dbe2473b2afd01a8a8aedd56ad9 (1.1.0 in pubpsec.yaml) to 664737ecad027e6b96d0d1e627257efa0e46fcb1 (1.1.1 in pubspec.yaml).
R=nbosch@google.com

Change-Id: I7cb71cd22a4858d3946bb08bd4f185855a9544a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144721
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-04-27 09:35:08 +00:00
David Morgan 625712728d Upgrade package:source_maps from 8af7cc1a1c3a193c1fba5993ce22a546a319c40e (0.10.7 in pubpsec.yaml) to 87b4fd9027378bbd51b02e9d7df794eee8a82b7a (0.10.9 in pubspec.yaml).
R=nbosch@google.com

Change-Id: Iba7afc5891384fc79c01399ab057e82623d93af8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144724
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-04-27 09:31:28 +00:00
David Morgan 2c9cb2bc59 Upgrade package:yaml from 2.2.0 (2.2.0 in pubpsec.yaml) to 62e9f6b3a933b1f76dd3007d1a5ce0be8e429b2d (2.2.1-dev in pubspec.yaml).
R=nbosch@google.com

Change-Id: I18bd6358a284726a6f96403500bc5b267af0d506
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144729
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-04-27 09:06:08 +00:00
David Morgan 708b221b48 Upgrade package:term_glyph from 1.0.1 (1.0.1 in pubpsec.yaml) to b3da31e9684a99cfe5f192b89914492018b44da7 (1.1.0 in pubspec.yaml).
R=nbosch@google.com

Change-Id: I1dbaeb379c4dcc3428571f97f08a614760ced1ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144727
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-04-27 08:59:14 +00:00
David Morgan 0a7bb4c195 Upgrade package:web_socket_channel from 1.1.0 (1.1.0 in pubpsec.yaml) to 490061ef0e22d3c8460ad2802f9948219365ad6b (1.1.1-dev in pubspec.yaml).
R=nbosch@google.com

Change-Id: Ic599793b6aed483eb92381d31c5add0647d7dcb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144728
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-04-27 08:58:04 +00:00
Clement Skau 430c75b5fa Revert "[VM] Remove unnecessary Closure.clone() from sync*."
This reverts commit ca94ad7112.

Reason for revert: Appears to break dartkb.

Original change's description:
> [VM] Remove unnecessary Closure.clone() from sync*.
> 
> Instead, this CL wraps sync*'s sync_op in an additional function
> that captures local copies of the necessary closure state.
> Notably this state includes the parameters of the original sync* function
> as these also need to be cloned for each instance.
> 
> 
> Note: a large number of .expect files have a small number of changes
> due to the additional wrapper function, as well as some extra plumbing.
> 
> Bug: https://github.com/dart-lang/sdk/issues/37753
> Change-Id: If099dbfe9e5d62979626b852386fd0173fc76de5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136190
> Commit-Queue: Clement Skau <cskau@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>

TBR=vegorov@google.com,cskau@google.com

Change-Id: I89e517196f03622337f909f0fcecbdc77c9dda93
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/37753
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144920
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2020-04-27 07:45:04 +00:00
Clement Skau ca94ad7112 [VM] Remove unnecessary Closure.clone() from sync*.
Instead, this CL wraps sync*'s sync_op in an additional function
that captures local copies of the necessary closure state.
Notably this state includes the parameters of the original sync* function
as these also need to be cloned for each instance.


Note: a large number of .expect files have a small number of changes
due to the additional wrapper function, as well as some extra plumbing.

Bug: https://github.com/dart-lang/sdk/issues/37753
Change-Id: If099dbfe9e5d62979626b852386fd0173fc76de5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136190
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-04-27 07:37:39 +00:00
Siva Annamalai 726d3c7725 Revert "[BUILD] - Initial CL to unfork the NNBD Dart SDK"
This reverts commit cab69e7706.

Reason for revert: It was a temporary submit

Original change's description:
> [BUILD] - Initial CL to unfork the NNBD Dart SDK
> NOTE: This is a trial submit and will be reverted immediately.
> 
> - Flips the flag from --nnbd to --no-nnbd so that by default it builds
>   the NNBD version
> - using the --no-nnbd flag results in the SDK being built in a
>   directory which has the 'Legacy' suffix added to it
>   (e.g: out/DebugX64Legacy)
> - the '--enable-experiment=non-nullable' flag still needs to be passed
>   in during execution so that CFE runs in that mode. This is different
>   from the 'null_safety' flag
> 
> Change-Id: I7d25d9710818af5919c0bb83abe51153172f5886
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144880
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=asiva@google.com

Change-Id: Ib0f99fc1a42c9c7a8b21f8542f4a35dba9105d5c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144900
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-04-27 05:00:10 +00:00
asiva cab69e7706 [BUILD] - Initial CL to unfork the NNBD Dart SDK
NOTE: This is a trial submit and will be reverted immediately.

- Flips the flag from --nnbd to --no-nnbd so that by default it builds
  the NNBD version
- using the --no-nnbd flag results in the SDK being built in a
  directory which has the 'Legacy' suffix added to it
  (e.g: out/DebugX64Legacy)
- the '--enable-experiment=non-nullable' flag still needs to be passed
  in during execution so that CFE runs in that mode. This is different
  from the 'null_safety' flag

Change-Id: I7d25d9710818af5919c0bb83abe51153172f5886
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144880
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-04-27 04:59:26 +00:00
Konstantin Shcheglov 03429b20cd Use FuzzyMatcher for Cider completion filtering and sorting.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: I1b8360e95327dfd4eaefaa8990105bd4750c2acc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144864
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-27 04:10:09 +00:00
Brian Wilkerson c1edd26d97 Remove the remaining unnecessary awaits from analysis_server
Change-Id: I3d10c244ca711a0978cb2d4a99dbe1f3bedc159c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144863
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-27 04:05:59 +00:00
Konstantin Shcheglov f43437cf80 Fix for avoid_types_as_parameter_names in try/catch.
R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: I5d7e89567ac947274de073b166840753a79814bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144786
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2020-04-27 03:29:09 +00:00
Brian Wilkerson 12dcfe63bb Start removing extraneous awaits from server
Change-Id: I484227773e98d87c915f6dfe6e320dda1a7b8eaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144862
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-26 23:45:29 +00:00
Brian Wilkerson a53d336b9f Convert the remaining methods in BaseProcessor to use subclasses of CorrectionProducer
Change-Id: Ide2c426939f6a0965caaa37a87ebe825b74d9d17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144787
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-26 20:12:49 +00:00
Johnni Winther 6c21ed6314 [cfe] Support class hierarchy changes in ChangedStructureNotifier
Closes #40707

Change-Id: I0a9e0b11d0f597dfed7182dd869382057d04e5dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144821
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-26 19:51:29 +00:00
Stephen Adams aeb22cbfb4 js_runtime strong mode fixes
Fixes in _LinkedHashSet
Fix in int.tryParse

Brings ~150 test to passing

Change-Id: I494c164135e103e31d4ef6a2e4809e464ec3ba63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144783
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-04-25 06:44:57 +00:00
Ryan Macnak 6fe15f6df9 [vm] Represent tagged pointers as C++ value types instead of C++ pointer types.
This works around bugs in UndefinedBehaviorSanitizer and Clang.

Bug: b/28638298
Change-Id: I6be595f9664516019d28017d24559583a1ae3a21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144354
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-04-25 05:21:27 +00:00
Nicholas Shahan 2e438d1baf [ddc] Add temporary fix for typeAcceptsNull()
The CFE is evaluating the constant as if strong mode is always
enabled.

This is a temporary work around and we should be able to access
the mode flag here in a future change.

Change-Id: I28842a692183c8da7aa42086a034f5388af83af5
Issue: https://github.com/dart-lang/sdk/issues/41657
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144815
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-04-25 01:53:27 +00:00
Robert Nystrom 5ed88471ec Migrate language_2/function to NNBD.
Change-Id: I0726fa252736a83a2d80345d71c05aacf8ed0649
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142941
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-04-25 01:53:20 +00:00
Regis Crelier c99da6857f [VM/nnbd] Field initializers may allocate a context storing 'this' when needed.
This fixes these co19 tests in strong mode:
LanguageFeatures/nnbd/late_A05_t01
LanguageFeatures/nnbd/late_A05_t02

Change-Id: I90e9f91eec120d82992e835f79396c2a7770fcbc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144814
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-04-25 01:12:17 +00:00
Brian Wilkerson 78907e46db Another round of cleaning up the code in BaseProcessor
Change-Id: I347d585050023bf26d50913658d8413490e37155
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144812
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-25 00:26:07 +00:00
Konstantin Shcheglov a18e3f6fb4 Issue 41645. Report assigning to Never type variables.
Bug: https://github.com/dart-lang/sdk/issues/41645
Change-Id: I877ef09a4650b40577d2f0af63427432a8396dec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144811
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-25 00:25:59 +00:00
Leaf Petersen 6fd7c57f4e Fix incorrect assert in null safe Future.wait and add regression test.
Closes https://github.com/dart-lang/sdk/issues/41656 .

Change-Id: I4472f34a4011e18f9f5d4db4f7a3dfd3eb6a8366
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144809
Auto-Submit: Leaf Petersen <leafp@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-04-25 00:00:37 +00:00
Paul Berry 299c852b60 Migration: make an API for shutting down the preview server.
This will make it easier to write automated tests of the preview
server.

Change-Id: I4605beaa9ce3a8f43ec358568a53f24b4f05dece
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144801
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-04-24 22:53:17 +00:00
Liam Appelbe 216e3df452 [vm] Handle required params in bytecode mode
Change-Id: I9e6b62969012bf2e0d9fce6bfe894a2367f240c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138664
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-04-24 20:52:27 +00:00
Simon Binder aa529bc684 Support plugin notifications in LSP server
This adds support for analysis domains that plugins contribute to by
sending notifications. I've only implemented folding so far, but most
of this CL is to cache results from plugins and to adapt sending server
capabilities.

Instead of using a NullNotificationManager, the LSP server now uses a
regular NotificationManager, except that results won't be forwarded to
clients. LSP handlers will fetch partial results from plugins and merge
them with data from the server that will be computed when needed.

I've extracted the server capabilities calculation from the init
handlers into ServerCapabilityComputer. It will also contain the
interestingFiles glob from active plugins and re-register capabilities
whenever plugins change.

Change-Id: I9869240cbfa284592e952498933e638b89a2a763
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142981
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-24 20:36:07 +00:00
Jaime Wren 455886420c Bug fix in the override_contributor.dart, don't generate the override completions if the target is in a comment text.
Change-Id: Ifbde00721858c9ad58b9d50cadf7775e37cf235b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144802
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-04-24 20:34:47 +00:00
Mike Fairhurst 8236400594 [nnbd_migration] Change edit links to no longer be generic "post links"
Originally, edit links were implemented as generic "post links," that
had no special handling except to fire a post request.

At this point, this is no longer the case. We at least want to
specialize the error message, and we have TODOs to do more
specialization (targeted reloading of the UI).

Note that 'edit-link' is already a class, it refers to the edits the
migration tool suggests as the migration. Therefore I used the class
'add-hint-link' instead of 'edit-link.'

Lastly, post-links were styled like buttons. But they are not the only
links that should be styled as buttons now, so just use that class
instead of having special styling.

Change-Id: I8241a5ec24e6a290b94a75327c06257abdfc011b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144660
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-04-24 20:14:57 +00:00
Ben Konyi 43c2d2c6d2 Reland "[ DartDev ] Generate dartdev.dart.snapshot for runtime builds and place it in the root of the build output directory"
This reverts commit 60823bdaf6.

Change-Id: I10a8421cb1fc5738bfb56d3c4e68d05bb3b4edd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144680
Reviewed-by: Jaime Wren <jwren@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-04-24 19:59:48 +00:00
Brian Wilkerson 403cfe3b12 Start converting uses of MemberSuggestionBuilder
Change-Id: Ia29834ac6670acde7e8ad0e36d5e0425e65e1951
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144782
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-04-24 19:59:37 +00:00
Konstantin Shcheglov 46a2086e6c Issue 41479. When terminate null shorting at CascadeExpression, don't make it nullable.
Bug: https://github.com/dart-lang/sdk/issues/41479
Change-Id: I2d843846ca2a0232dbea60ad2b71e745ac118588
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144672
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-04-24 18:45:13 +00:00
Brian Wilkerson bade55aa20 Use the context type feature in SuggestionBuilder
Change-Id: I79f9f3f3e46bf240a75eba0d9a5d43d2478fb440
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144781
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-04-24 18:38:08 +00:00
Paul Berry eeed19d6e4 Skip pkg/nnbd_migration/tool tests on dart2js.
These tests are only meant to run on the VM.  They won't work on
dart2js because they require doing I/O to check the status of
generated files.

Change-Id: I3611dd68353827828e9993fa9d042fb086863396
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144800
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-04-24 18:37:08 +00:00
Joshua Litt 32c3a2cde7 [dart2js] Rebase nnbd expectations for 3 tests.
cfe_constant_test
inlining_test
jfield_analysis

Change-Id: Ib2833507f4e19f3d6a1e5055977bccc962b2d791
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144494
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-24 18:30:03 +00:00
Nicholas Shahan 02a34ddfb1 [ddc] Remove type and null checks in dart:_runtime
Only removing checks for common calls within the type system that
we know are always safe.

Added `@notNull` on arguments typed to be non-nullable (in the nnbd
version) to avoid producing the null checks.

Added `Object` type to arguments to match the return type and avoid
casts when returning.

Change-Id: I05de45a8d923497f7340348ef2c0b9f72da5414b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143862
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-04-24 18:29:03 +00:00
Stephen Adams e6e9370102 [js_runtime] sdk_nnbd fixes
Faster type check in _SyncStarIterator.moveNext.
Fix typeAcceptsNull.

Change-Id: If1b88e359884dc544c69f46e509586b1548f6d85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144673
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-24 18:08:20 +00:00
Paul Berry 71ade62d09 Fix invalid downcast in pkg/nnbd_migration
Change-Id: Ie2a61f08a57ed741939c63a9ac7e07cf7f19c74f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144780
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-04-24 17:32:43 +00:00
Ben Konyi c97ed9cc11 [ package:dds / Service ] Add support for service extensions to DDS
With this change, DDS takes responsibility for service extension
registration via the service protocol in addition to handling service
extension request routing.

Service extensions registered through dart:developer will continue to
be handled by the VM service as those extensions live within the main
Dart process (this functionality already worked before this CL).

This change also includes a version bump for package:json_rpc_2 to pull
in a bug fix required for this change.

Change-Id: Idb6050058f7695d34276953be159419a5b1b9711
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144349
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-04-24 17:13:57 +00:00
Konstantin Shcheglov 8bce5840a5 Incrementally invalidate file state and library context for Cider.
Change-Id: I278b990d27a380bded958681e07a47ffcedc8e56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144690
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-24 17:10:53 +00:00
Joshua Litt 8495451a6b [dart2js] fix id testing labels.
Change-Id: I4d40cf9f0b99fa8534d3c6b98deaa4a9a1616231
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144620
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-24 15:30:13 +00:00
Tess Strickland a69cb6d700 [vm] Walk Functions as well as Code objects in DedupInstructions.
Previously, we used the owner field to find the function whose entry
points to fix up after deduplicating instructions/code objects. However,
this means retrieving and checking the owning Function for each Code
object that has one, even if that Code object isn't the current code
object for the owning function. Instead, now we extend the instruction
deduplication visitors to Functions, where visiting a Function means
visiting its active Code object before fixing up the entry point cache.

Since the ProgramWalker also visits Code objects, this means visiting
some Code objects twice (once in the ProgramWalker and once when
visiting the Function for which it is the current code). However, since
the deduplication process is idempotent, the additional visits will not
cause the entry points for the Code object to change further (which
would otherwise invalidate the caches of already visited Functions).
Thus, the order of the visits does not affect the results.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try
Change-Id: Idd12fc94c5fb98f1fc9eb669d09b47822b0eac1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144700
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2020-04-24 11:49:43 +00:00