Commit graph

27148 commits

Author SHA1 Message Date
Johnni Winther 5997ea4d73 [cfe] Make buildSimpleRead and buildAssignment abstract
+ remove _makeSimpleRead and _makeSimpleWrite
+ directly implement some of buildIfNullAssignment, buildCompoundAssignment and buildPostfixIncrement

Change-Id: I5a209c3a570af7773486799a0473f802e27afb54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117323
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-20 18:30:45 +00:00
Johnni Winther 68b1a2e7bd [cfe] Refactor super index access
Change-Id: Ie431d93b2ecc48fe5c35288f1146934ac278a81c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117322
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-20 18:30:45 +00:00
Johnni Winther 1e24146dab [cfe] Refactor this indexed access
Change-Id: Iaaac1aba9f421ec1d5176350b1d007ce355ca297
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117151
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-20 18:30:45 +00:00
Konstantin Shcheglov 2cebdaae2c Update MockSdk to support unsafe_html lint.
The linter is a moving target, so since I last tried to use analyzer's
MockSdk, linter got new dependencies.

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

Change-Id: I97955158befd61146416c8c1069768ae1d58b018
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118323
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-20 17:41:25 +00:00
Konstantin Shcheglov db035f39cf Remove some uses of 'type' and substitute2() it types.
We also now don't try to share parts of strict FunctionType(s).
So, I'm removing the corresponding tests.
If we decid that we need this, the correct place to do this is
the type algebra.

Change-Id: I4f7d9df892f8606af8f0403358e56d4a07bdd025
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118321
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-20 16:56:15 +00:00
Jens Johansen 99713209c4 [CFE] Fix issue with cached calculations and recording dependencies
Before this CL we would miss some dependencies when recording
dependencies because we cache certain calculations that upon calculation
can mark things as needed.

Change-Id: If9ff872021b0fb77cbcc787112bb91f3ade71243
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118281
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-20 11:21:14 +00:00
Johnni Winther 70a1e8e090 [cfe] Fix handling of access on type variables with dynamic bound
Change-Id: Ibff097e5f18bee169191b94633455547460debb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118280
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-20 10:48:14 +00:00
Jens Johansen 36c3eccc11 [CFE] Fix issue with exports and recording dependencies
Before this CL we would miss some dependencies when recording
dependencies because we don't finalize exports of dill libraries we have
already finalized.
This was a previous speed-optimization that worked fine before recording
dependencies, but - as outlines above - doesn't work together with
recording dependencies.

Change-Id: I3d9abe949e2b614e9bcd03711e7b92f586373ec5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118043
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-20 07:24:34 +00:00
pq 7367b6f192 fix for MISSING_CONST_FINAL_VAR_OR_TYPE
Change-Id: Ic332128c5981d0a120f169c948bf794d57f3c709
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118202
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-20 01:26:44 +00:00
Vijay Menon 0051da7f55 [nnbd] change modular nnbd test to enable non-nullable for sdk
Change-Id: Ic585a885c75f54a21d3ae62fa81bb6e14cadd178
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118162
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-09-20 00:47:44 +00:00
Konstantin Shcheglov 65078b5ee8 Stop using DynamicElementImpl/NeverElementImpl.type getter/setter.
R=paulberry@google.com

Change-Id: I928c3e81aaf10d1a5c01cce1f878996b86a45c2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118108
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-20 00:00:19 +00:00
Konstantin Shcheglov 07922810b2 Remove writes to TypeParameterElement.type.
There is still a couple of write in type_algebra, should be changed
together with using nullability prefixes there.

R=paulberry@google.com

Change-Id: I090eae3dbd709c8bc76da6038a940f12fd9726f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118106
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-19 23:52:44 +00:00
Konstantin Shcheglov 8d2045f336 Remove ResolutionEraser.
R=paulberry@google.com

Change-Id: I94d314c623725cc3157d8b543d9169642a5a432d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118104
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-19 23:52:14 +00:00
Sam Rawlins 97346ff476 Initial migration i13n HTML output
Change-Id: If614fa0719d8ffdaa7a41cca6d0df249772c2437
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117928
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-09-19 22:56:44 +00:00
Konstantin Shcheglov 9cea50c0ca Use Substitution for type arguments validation.
Change-Id: Ieb5e2be796acc3afe535c59e1e4c8b016ecdfb2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118161
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-19 21:55:44 +00:00
Paul Berry dcd5cd13fb Prepare to publish analyzer version 0.38.3.
Change-Id: I338f5a5ae9f3384ecb1d3e9ae5d3231e0288552d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118160
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-19 20:42:17 +00:00
Mayank Patke 34253ce388 [dart2js] New RTI: Treat JavaScriptFunction as subtype of all function
types.

Change-Id: Ibf97fe3d42e78f7f533c6057f03d31db0dba1ad1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117661
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-09-19 19:42:38 +00:00
pq f8f54c883b check for existing asserts before suggesting to add one
Change-Id: Id17bf2e2dedd44c88aa4a95f4e2123a70113399e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118102
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-19 19:07:07 +00:00
Konstantin Shcheglov 892386ad22 Don't use ClassElement.type many places in analyzer.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Ia1683cdc3af2343500e8a65c67532150a56a10d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117980
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-09-19 17:24:10 +00:00
Johnni Winther 9ed45651a9 [cfe] Refactor super expressions
Change-Id: I9bc0c6cd86316248108440bc367239316bdbc5ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117150
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-19 17:17:10 +00:00
Johnni Winther 5081eb15ee [cfe] Refactor handling of static if-null assignment
Change-Id: Id29b92bc3c2463a3c36ed25c13e0de84fa355ab5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117149
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-19 17:17:10 +00:00
Johnni Winther f018ce0355 [cfe] Refactor handling of static get/set/compound
Change-Id: I63a4834bb43ab533f3195e745105137534d83bc9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117148
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-19 17:17:10 +00:00
Johnni Winther dc211c3f9d [cfe] Refactoring handling of compound index set
Change-Id: If5ba12c571c77643e57669ef85f8235496d4b06b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117141
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-19 17:17:10 +00:00
Johnni Winther 604f443285 [cfe] Refactor handling of if-null index assignment
Change-Id: I0fc9c4564321144ea4215fe21bd11f671f9f9054
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116960
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-19 17:17:10 +00:00
Johnni Winther 54c2dd737f [cfe] Refactor handling of index and index-set
Change-Id: I28336e1e01ba2f2f98d77c941b740242207bbc86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116780
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-19 17:17:10 +00:00
Johnni Winther c7a083ee5a [cfe] Refactor handling of ++/--
Change-Id: Ib63b095ba52b92653c3253286d0ecc1d18a469ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116760
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-19 17:17:10 +00:00
Johnni Winther c2f35df918 [cfe] Refactor handling of compound local/property assignment
Change-Id: I8a42ab364ef263b13b7a2314777d04dbb1de8038
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116520
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-19 17:17:10 +00:00
Johnni Winther 40d75d733b [cfe] Refactor if-null and null-aware property access
Change-Id: I19a50b7d56b63c96f24daf8aaf975e0748e29cf8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116340
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-19 17:17:10 +00:00
Sam Rawlins 342b48bd27 Remove unused import
Change-Id: I962a0a93abb57e4f84602442df7bce4444a8aec8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118101
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-19 17:13:50 +00:00
Konstantin Shcheglov 396fec7cfb Use DriverResolutionTest directly, without ResolutionTest mixins.
Change-Id: I1c894e726a7645a94266ac9d62bc48c8fca7330b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118100
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-19 17:07:30 +00:00
danrubel 000de948fa add test for 38091
Fixed by earlier parser recovery improvement.

Fix https://github.com/dart-lang/sdk/issues/38091

Change-Id: I9fa4c3870965c1f03bae9f11da6eaf1e65bfabf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115904
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-09-19 16:56:50 +00:00
Vijay Menon 596bd5b61c [dartdevc] Add modular NNBD test
Change-Id: I61cdd4a1f03232f1f8bab8b029e50b34bf7a1648
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117760
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-09-19 16:53:50 +00:00
Konstantin Shcheglov f6883ff726 Don't use ClassElement.type in summary2.
R=paulberry@google.com

Change-Id: Ic5fb44026aadf68b6cdf9a61cc7d3865817d8bd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117982
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-19 16:16:20 +00:00
Konstantin Shcheglov 9da8472e2d Don't use ClassElement.type in nnbd_migration.
R=paulberry@google.com

Change-Id: I656b913e809c0174eab93226e62e2392a7142cf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117981
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-19 16:15:40 +00:00
Konstantin Shcheglov f7472249a2 Remove EnumMemberBuilder.
R=paulberry@google.com

Change-Id: If92fc95598cc2530b882d270efb97664fce4176a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117983
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-19 16:08:16 +00:00
Paul Berry 605384dbe7 Migration: Add nullability_migration_impl_test.dart to test_all
Change-Id: I8fb3d642744bf3a7c7889e2cfa71733db6c489ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118060
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-19 16:02:16 +00:00
Aske Simon Christensen 6e4794a584 [kernel] Clone all co-defined type parameters before visiting them.
Fixes https://github.com/dart-lang/sdk/issues/38384

Change-Id: I8292e91549c14e1ebac4ea4ab497ff16e6a8a81f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118047
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-19 15:19:06 +00:00
Paul Berry 23def0da02 Migration: add support for assert initializers.
Change-Id: I581550e4359a256f846c05d4c4cec60082b4ab01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-19 13:16:06 +00:00
Paul Berry 8ffe04bcf7 Migration: integrate flow analysis for "is" checks.
Fixes #38340.

Change-Id: I881f71f4dbbdc75b33433bca15445b0677ef04d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117775
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-19 13:16:06 +00:00
Paul Berry a85b7cef95 Migration: Add support for for-each loop variables.
Change-Id: If5536394a99e4706c3916d360e7ac051e18a97f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117772
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-19 13:16:06 +00:00
Aske Simon Christensen 3fa2bbf202 [cfe] Fix incorrect const contexts.
Fixes https://github.com/dart-lang/sdk/issues/36533

Change-Id: Id157edb09ee5bf16003b33b16ecf6edc900b38f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117324
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-09-19 12:01:21 +00:00
Dmitry Stefantsov 515a597710 [cfe] Remove Class.rawType
Bug: http://dartbug.com/38224
Change-Id: If0af5487b1d43125738575ee3e0fcd747db54fa9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117546
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-19 10:42:10 +00:00
Jens Johansen 37111633be [DDK] SDK should not contain full paths
If nothing else, it introduces nondeterminism to include the full path.

Change-Id: I6a1e116125cb25fde57db1bb0570b4e10a009b55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117723
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-19 07:37:52 +00:00
Jens Johansen 740c72e251 [kernel] Mark class as non-dirty after computeCanonicalNames is run
Change-Id: I8ef374145c58cd0da45eb074d1fb10c8cb14e358
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117724
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-19 07:37:40 +00:00
Alexander Markov 3135eb569d [vm/bytecode] Fix initial scope in field initializers
Fixes language_2/async_await_test with bytecode in
dartk-reload-linux-release-x64 configuration.

Change-Id: I6e7c7ae89cea2be8e1948a7ea0314c679387aa06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117930
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-19 01:46:34 +00:00
Konstantin Shcheglov 1345fb80ac Use TypeParameterElement instead of TypeParameterType in inference.
Change-Id: I416dc03c01742cc0552eb73d5e3c7093a280e06a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-19 00:35:54 +00:00
Paul Berry 430ff6d649 Migration: fix "matching" functionality of edge testing infrastructure.
Change-Id: I6318f89ba962329a1d3f4b0af2b0352981d6c9fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117840
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-19 00:26:14 +00:00
Nate Bosch f1bff1b512 Add option to run ddb with observatory
- Add arg parsing for both `--observe` and `--vm-service-port` for the
  cases where we need to specify a port other than the default. We need
  both since we can't treat the same name as either a flag or an option
  based on whether a value was given, which is the behavior of the VM.
- Follow the `debug` paths when any of `--debug`, `--observe`, or
  `--vm-service-port` is used.
- Whenever using observatory always use `--pause-isolates-on-start`
  since the process would otherwise finish before getting a chance to
  use it.

Change-Id: I30c3f9136ba9a7e8bea4220f88026b13963efc21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117595
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-09-19 00:25:46 +00:00
pq ad7374fcdb assist to insert null checks
(still WIP)

Change-Id: Icca46e4a9fbca43f00151d99cb24935e18c97294
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117589
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-18 22:32:15 +00:00
Nate Bosch 27c127db86 Use Process.start in ddb
Allows us to use `inheritStdio` and see output as it comes in rather
than waiting until the entire process has finished to see the output.

Refactor to support https://dart-review.googlesource.com/c/sdk/+/117595

Change-Id: Ic940d11b6b24c12aa23052c224d72c5365486ae5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117860
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2019-09-18 22:11:25 +00:00
Paul Berry 93793a4ee8 Migration: add tests to document missing required keyword functionality.
See #38461 and #38462.

Change-Id: I94da796e0d21578c9838ae0eb9c477f4a21e054e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117771
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-18 20:46:25 +00:00
Konstantin Shcheglov b988928c33 Declare type system fields as Dart2TypeSystem where we cast them.
R=brianwilkerson@google.com

Change-Id: I88fea5ee5ba278dbdaf350ff1db7407d2d8625d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117821
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-18 20:13:19 +00:00
Brian Wilkerson 771ee9f9ba Pass the output directory to dartfix and install a listener when output should be generated
Change-Id: Ie73287f212246493a6f95aa39f56bf60c0b23f4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117769
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-18 20:03:00 +00:00
Paul Berry 4d9792668c Flow anaylsis: fix definite assignment tracking for for-each loop vars
Change-Id: Ia0dfd94070e28832c5ffc6fb892626d9036042a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117820
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-18 19:21:39 +00:00
Kallen Tu b699852e6d Add 'out'/'inout' keywords for variance.
Under the `variance` flag, `out` and `inout` will be treated as keywords.

Change-Id: I73ba6871a9f0d410a7b3818833a1f50a5f75fba6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117203
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-09-18 18:35:59 +00:00
Konstantin Shcheglov a1fdfb8fc8 Move ClassElement.thisType to API.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Ib1b85e01159e93adbab8b3e186f30e939d462739
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117766
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-18 18:02:48 +00:00
Konstantin Shcheglov 4102e63f37 Deprecate TypeProvider.listType/mapType
R=brianwilkerson@google.com

Change-Id: I7cef0b752be4ef6a7e4bc5394e14cd64ecb67ab5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117765
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-18 17:55:03 +00:00
Sam Rawlins f1afb34924 Move strict-raw-type tests; add tests for extensions
Bug: https://github.com/dart-lang/sdk/issues/38105
Change-Id: I50794f6c4fdfe6852b06adacb24a0620bd44b2f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117642
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-18 17:54:43 +00:00
Konstantin Shcheglov 4fcef04d61 Deprecate TypeProvider.iterableType/streamType
R=paulberry@google.com

Change-Id: Iab8038cf0ed413de7c05da4f69015c1d1309aa35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117684
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-18 17:29:58 +00:00
Brian Wilkerson 74af5f3496 Add a representation of the information captured from an nnbd migration
Change-Id: Ia201c59ebb31709278ec4efaf7432af757716cf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117764
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-18 17:22:23 +00:00
Vijay Menon bd28bad820 [dartdevc] add modular tests for old ddc
Change-Id: Iff068cc4e737e9a6993c6f724fc0b6853ed1d5fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113621
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-09-18 17:21:53 +00:00
Alexander Markov 9f4f0acb9e [vm/bytecode] Generate dependencies in front-end server in bytecode mode
When bytecode component is created without AST, Component.uriToSource
mapping is also dropped. Front-end server relies on Component.uriToSource
in order to generated dependencies file and send list of compiled source
to flutter tools. This change fixes listing of dependencies in bytecode mode
without AST.

Change-Id: I7c2b6f48571ec3ca42de330bdc1feef3ba7425d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117596
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-18 17:01:03 +00:00
Paul Berry 998a421128 Migration: expose fix reasons through the instrumentation interface.
Change-Id: I0f8ba9aa58d098b431fad338d46a2f14d87e43b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117686
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-18 15:52:50 +00:00
Paul Berry a5683dfb62 Migration: add a repro for an issue with field formal parameters.
See #38453.

Change-Id: I7ecf1c020437b7e332e7646cc40e947f38a081bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117687
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-18 15:45:22 +00:00
Brian Wilkerson dce98a23d1 Fix a typo in a diagnostic message (issue 38449)
Change-Id: Ie4f27420d5f1b203501581a7cb71640cce84c46d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117762
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-18 15:44:46 +00:00
Konstantin Shcheglov d4f1b8f8db Deprecate TypeProvider.futureType/futureOrType
R=paulberry@google.com

Change-Id: Idde7d82b217b5921c0770d9b69f6934a1e1fc493
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117682
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-18 15:37:21 +00:00
Brian Wilkerson 546440074a Stop reporting diagnostics on synthetic identifiers (issue 38448)
Change-Id: Ief9b77a48526454db430bc131d3c1dbd04234dc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117761
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-18 15:36:41 +00:00
Brian Wilkerson f3b54fae0a Information for the migration result pages
Change-Id: I237efbbd1ed50963b28dce738c2a365c244b3a88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117587
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-18 15:20:50 +00:00
Samir Jindel 205b90f0de Take 3 for '[vm/ffi] Implement FFI callbacks on AOT for ELF and Asm snapshots (excl. blobs).'
Fixes the changes to assembly snapshot writer in SIMARM_X64 mode. This unfortunately can't be tested until the ELF loader is available.

Take 2 is in patchset 1.

Change-Id: Ib8b067dd4f09dcba3b142705e9cb4dfbf4e3eb53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117726
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-09-18 14:56:27 +00:00
Dmitry Stefantsov a56b4ee790 [cfe] Thread nullability from source for function types
Closes #38216.

Bug: http://dartbug.com/38216
Change-Id: I33def8e24555099a74fae04d658cbde7af08d7c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117727
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-18 13:58:43 +00:00
Vijay Menon ce6f40bccc [dartdevc] fix for const / overridden fields
Fixes https://github.com/dart-lang/sdk/issues/37839

Change-Id: Ibe7b151e8e5fdd4d83cf5b69d49c7b3d17a1cefe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113136
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2019-09-18 13:19:05 +00:00
Dmitry Stefantsov 97b561a8de [cfe] Update CoreTypes to handle raw types with it
Change-Id: Ic931ff639600cc7bae03a8b51301005952d726c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117320
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-18 09:52:00 +00:00
Dmitry Stefantsov 0281f9c425 [cfe] Add members to construct nullability in Library and LibraryBuilder
Change-Id: Iaaa9cf0c5a5789e6b303d646c5ed7fb6eed15b9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117155
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-18 09:52:00 +00:00
Mayank Patke 4f1b0fdd0f [dart2js] (New RTI) Check all subtypes for trivial substitutions only when necessary.
Change-Id: Ic434db1efa58d361b92acfed0cf33a119e394837
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113520
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-09-18 00:47:36 +00:00
Konstantin Shcheglov 12c1b43365 Substitute bounds of fresh type parameters using all fresh type parameters.
R=brianwilkerson@google.com, paulberry@google.com

Bug: https://github.com/dart-lang/sdk/issues/38365
Change-Id: I7603126bb7a5578b9ce2c74a7b130a591be0d4b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117640
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-18 00:21:16 +00:00
Konstantin Shcheglov 1a812bb6bb Deprecate TypeProvider.setType
R=brianwilkerson@google.com

Change-Id: I522066c919b5eef9640243c8b08435756d9481f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117597
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-18 00:20:46 +00:00
asiva 4b6ab33cfa [SDK] Reland: Remove dart:profiler library which has been deprecated since Dart 1.2
and remove all references to it in tests and the SDK build scripts.

Change-Id: I728770c460042596ddd14efecdc52bcf0580f592
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117584
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2019-09-17 23:19:20 +00:00
Nate Bosch 765651b079 Fix some diagnostics in ddb tool
Renaming to `ddb.dart` exposes these in the analysis server.

Change-Id: I03485debcc2a0d6f8d2feca9418f910ade7cf10a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117590
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2019-09-17 21:12:12 +00:00
Paul Berry 37016a7397 Migration: use virtual dispatch to compute nullability fix descriptions.
Change-Id: Iffc75fa0f11f4d735f7bc5c46a8853ac1bb6ac45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117580
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-17 20:00:31 +00:00
Konstantin Shcheglov e32706ec05 Remove '--use-summary2' from DAS.
R=brianwilkerson@google.com

Change-Id: I22d99ae50e19d5e1b624a0d807cead676411f58d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117586
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-17 19:28:01 +00:00
Brian Wilkerson f342d07b0d Report an error if an extension override is used in a cascade (issue 38417)
Change-Id: I578d0b9663f4bc85a9b3d9726457682953809a72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117461
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-17 19:13:31 +00:00
Alexander Aprelev b0fa0aebb7 [build] Ensure kernel service trains on the source.
This is follow-up to https://dart-review.googlesource.com/c/sdk/+/117286.

Fixes dartbug.com/38427.

Change-Id: I8e3227addf459577e5126e9c48d1cb95b170157a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117464
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-09-17 17:18:09 +00:00
pq d4fd853523 fix for unused_element
Change-Id: Id72c792dff73a08a10f03f494bf3adc39b91b872
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117521
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-17 17:04:09 +00:00
Konstantin Shcheglov 4adbc8f1e6 Use single TypeSystem.inferGenericFunctionOrType(), avoid using full generic DartType.
Use instead separate components - return type, parameters.

R=brianwilkerson@google.com

Change-Id: Ie6728383683a507d5abcebe7766b7e3bf2216ed9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-17 15:56:52 +00:00
Paul Berry 7f90b562be Migration: clean up nomenclature of graph edge "sources".
Instead of having a set of sources, of which one is the primary
source, we now have a set of upstream nodes, of which one is the
source node.

Change-Id: I580a4d91ee2d242eabe0e614b196951840d7cc7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-17 15:53:02 +00:00
Paul Berry 9bb9c05f92 Rename EdgeInfo.hard to EdgeInfo.isHard
Change-Id: Iff38a9f5fa13b1447cbdbddcd9ef1061a82b6a66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117465
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-17 15:53:02 +00:00
Paul Berry 478e3cfe87 Migration: test and fix a few more instrumentation corner cases.
Change-Id: I09f6837cd6c3c64c45887a164a3fffd3bec5f6a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117462
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-17 15:53:02 +00:00
Kenzie Schmoll 9753a397bf Allow responses with no "type" field to succeed for ServiceExtensionConsumers.
Change-Id: If7f239c67e54330e77e805dd2375bbfba1dbd76c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117441
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Kenzie Schmoll <kenzieschmoll@google.com>
2019-09-17 14:42:31 +00:00
Brian Wilkerson e00c8f3cb7 Add a command-line option to dartfix to specify the output directory
Change-Id: I5cc1b73427f95554bf2f20aa54923d9c3808e1f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117463
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-17 13:46:27 +00:00
pq f309ca5faa improvements to remove_unused_local_variable
Change-Id: Ia787f1ef0d0587b6ba0c91615dc0baaef1b5d0bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-17 02:27:18 +00:00
Brian Wilkerson dd83ded1e9 Add output directory field to dartfix API
Change-Id: Ia2dc3e4d3a458f43e9f2b0c1a25418f10931920c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117442
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2019-09-16 22:51:21 +00:00
Konstantin Shcheglov 93980b75ce Add TypeProvider.xyzType2() for platform classes with type parameters.
R=brianwilkerson@google.com

Change-Id: I8a25ec94f8cf7cb7b252d8ecbcc0c1bb15ae6bae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117444
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-16 22:50:52 +00:00
Mike Fairhurst 1222a97e46 [nnbd_migration] principle is check types non-null, component types nullable
Change-Id: Ie02341d0f92ae9f72404b5ffd5b3f81e929f4906
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117213
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-16 22:33:06 +00:00
Brian Wilkerson 114fdbc50b Fix the messages associated with the invalid_override diagnostic
Change-Id: I3d5fe5f3aee6eab6ab538fa795a6d511132a2454
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117284
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-16 22:25:41 +00:00
Sam Rawlins eb208b1074 Move inference-failure-on-collection-literal tests
Change-Id: I10143d9deab89f5c3c5e8365ae5d99ca5b1c9094
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117293
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-16 22:25:02 +00:00
pq 74fb313c78 nodeInList utility
Change-Id: I213dcb281c8484bc2f44a2046dbbe54e92e5d645
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117422
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-16 21:56:21 +00:00
Alexander Markov 631e547c2f [vm/bytecode] Setup initial scope before the first CheckStack
Sometimes we need to stop at the first CheckStack and scan call stack in
the debugger, so debugger needs to know initial context level on function
entry, even before setting up initial context.

This change moves the first scope declaration before the first CheckStack.
Parameters which are not captured are also declared in the initial scope.
After creating an initial context we may add the 2nd scope, along with
captured parameters.

Fixes flaky crashes due to context level mismatch in
service/async_generator_breakpoint_test/1 with bytecode in debug mode.

Change-Id: I11ce1407ee58954b167e51a25302272b05365386
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117296
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-16 21:21:54 +00:00
Konstantin Shcheglov 6a9d792454 Move NullabilitySuffix to API.
R=brianwilkerson@google.com

Change-Id: I58547075d3472e6708e6b5ff1c6d89f768aba66a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-16 21:14:11 +00:00
Paul Berry 4ae145e173 Migration: Introduce an instrumentation interface.
This interface is a callback interface that allows the client to
receive detailed information about the decisions made by the migration
tool, and the source code locations associated with those decisions.
The idea is that a client of this interface can put together a report
to the user to help them understand the behavior of the migration
tool.

The instrumentation interface mostly exposes internals of the
migration engine through some safe, non-destructive interfaces.  The
interface itself is documented in the new file
pkg/nnbd_migration/lib/instrumentation.dart.  For examples of what
information the client can expect to receive through the
instrumentation interface, see the new file
pkg/nnbd_migration/test/instrumentation_test.dart.

Change-Id: I079551922bff75e0e8d290819f31533c29d7b62f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117285
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-16 20:57:41 +00:00
Sam Rawlins 90b44e77d8 Report strict-inference issues with function return types
Change-Id: I249a3a7b2b6698c784b1fea67679b0b810414161
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117201
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-16 20:43:41 +00:00
Konstantin Shcheglov 405ff47ebe Add ClassElement.isDartCoreObject, use instead of 'classElement.type.isObject'.
R=brianwilkerson@google.com

Change-Id: I1354e111debca5145f6fc54959c391e65a21cf05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117298
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-16 19:57:42 +00:00
Keerti Parthasarathy 3290912366 Remove code reference to Never
Change-Id: Ib5d44ad53c58086005d57ed1885a190bb0057624
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117295
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2019-09-16 19:47:30 +00:00
Ben Konyi 07cd62af19 [ package:vm_service ] 2.0.0 Release: Added named parameters to VM service object constructors
This change is considered breaking as the constructor parameters for non-optional
fields are marked as @required.

General cleanups (unnecessary 'new', single line methods) in this CL as well.

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

Change-Id: I1d6a4b3a6cca6646b6bc3ebb1fb8322060ea7c52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117211
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2019-09-16 19:28:37 +00:00
Konstantin Shcheglov e978b32a7e Stop using '.type' in analysis_server.
R=brianwilkerson@google.com

Change-Id: I0cff6d1b46e56651d7ed2d60e0bf76bb7272f5de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117294
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-16 19:05:13 +00:00
Paul Berry b53b425195 Migration: change EdgeOrigin classes to store AST nodes rather than offsets.
This will allow richer information to be passed back to the client
about how the nullability graph relates to the source code.

Also in this CL: eliminate the _CompoundOperatorInfo class, since
everything it tracked was already available from the
AssignmentExpression AST node.

Change-Id: I3f2a37d7cbef2c69358b5f68667f8ff8afafc517
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117283
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-16 18:31:08 +00:00
Paul Berry 233189e598 Migration: clean up EdgeOrigin class hierarchy.
This CL combines the EdgeOrigin and EdgeOriginWithLocation classes, so
that all EdgeOrigin objects are associated with source locations.  And
it separates the EdgeOrigin and PotentialModification roles of the
ExpressionChecks class into two separate classes.

This will enable a follow-up CL that switches the EdgeOrigin class
over to track source locations via AST nodes rather than offsets,
which will in turn allow rich information to be delivered to the
client about how the nullability graph relates to source code.

Change-Id: I736f60f93681fbbfbd5f9ee9a5589f99f819b9aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117282
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-16 18:31:08 +00:00
Paul Berry 74db01f1c2 Migration: Remove edge origins from GraphEdge data structure.
This will pave the way for a follow-up CL that stores AST nodes in
EdgeOrigin objects without bloating memory usage; that in turn will
prepare for an instrumentation interface that allows the migration
client to gather useful details about how the nullability graph
relates to the source code.

Change-Id: I3689ee68de7c9969776564db4678e8c1e0344519
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117281
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-16 18:31:08 +00:00
pq ec1b9615b1 fix for unused_field
Change-Id: I7ea76765eba72290459f333a86349bda5af1370c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117340
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-16 18:20:49 +00:00
Paul Berry c5c2c1bcca Migration: Fix assignment of FutureOr<T> to FutureOr<U>.
This should address ~12 exceptions whose stack trace includes the line:

_AssignmentChecker._checkAssignment_recursion (package:nnbd_migration/src/edge_builder.dart:2153:16)

Change-Id: I8375cfcc4e11b5c12c75e465d9de0af060b860dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117160
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-09-16 16:57:50 +00:00
Konstantin Shcheglov f470695875 Stop using ClassElement/TypeParameterElement.type in tests.
There are 4 references to `type` left in tests, because it looks
that these tests validate peculiarities of the `type` getter itself.
I will remove them later, when the production code is off `type`.

R=brianwilkerson@google.com

Change-Id: I4b8a590e561fe3d3103500b097c13d989514976e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-16 15:53:29 +00:00
Jens Johansen dd1969a43a [pkg/vm] Train kernel service differently
When the kernel service is asked to train ("--train") one gives it a script
to train on (by compiling the script).
In our build scripts that is dart2js - a relatively big application that
exercise many parts of the compilation pipeline. That is all fine and good,
but some parts are only executed once (e.g. creating the UriTranslator etc).
In an attempt to train these parts more this change additionally
compiles a simple hello world script 10 times whenever it's asked to
train on anything.

On my desktop there is no statistical significant change in runtime of
a hello world script, but on a ODROID-C2 system where I trained it
manually on dart2js before and after this change I get these runtime
changes:

        -0.0269167 +/- 0.00493467
        -3.65054% +/- 0.669259%

i.e. ~26 ms faster (from a median of 0.735 seconds to 0.708 seconds).

This CL furthermore changes the way we print via the kernel service in
verbose mode, as the current way generally prints ~5M integers to a
text buffer, then uses the first 256 characters of that and prints it to
terminal. This is here changed to only print the first ~256 characters
thus making the verbose enabled runtime more similar to the verbose
disabled runtime.

Change-Id: Id53b059025adc3517e99e56eaef438a6093b674a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117300
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-16 13:41:59 +00:00
Aske Simon Christensen 41ad840e48 [dart2js] Fix constant folding of overflowing truncating divide
Change-Id: I2f18ba780166ca1177999ebd856230d36bbf4d15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116980
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-09-16 13:10:59 +00:00
Aske Simon Christensen 7799f424f4 [CFE] Encapsulate int operations in separate classes for VM and JS
This refactoring achieves the following:

- Collect the integer operation semantics into one place instead of
having it sprinkled all over the constant evaluator with many
"if (targetingJavaScript)" tests.

- Avoid emitting the internal JavaScriptIntConstant node, which is
serialized as normal DoubleConstant nodes, thus achieving parity
between direct consumers and consumers seeing output that has been
serialized.

- Implement the JavaScript semantics for unsigned right shift.

- Fix truncating divide with a result outside int64 range incorrectly
clamping the result for JS targets.

- Fix positive hex constants >= 2^63 through int.fromEnvironment
producing negative values in dart2js.

- Clarify in Kernel documentation how numeric constants are represented
on VM vs JS targets.

Change-Id: If30bb2c2c77c54eff120b611b059c2ec726c99a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116525
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-09-16 13:10:59 +00:00
Aske Simon Christensen eb1a375749 [CFE] Consolidate double special cases for == and identical.
Change-Id: I2d8da0bbb443bdf3ee5c3a6f53786a80509d2d9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116321
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-09-16 13:10:59 +00:00
Johnni Winther 7b60ae1a0d [cfe] Fix infer expression
Fixes bug introduced https://dart-review.googlesource.com/c/sdk/+/116203
Calls to inferExpression that pass an expression directly needs to handle
the returned replacement expression directly.

Change-Id: I74f7707921d6f08df3d4bee48085a8d72731acee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117154
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-09-16 12:29:49 +00:00
Jens Johansen a8f433820b [fasta] Add test for split dill
We've long had the ability to load a combined dill file both in the dart
code and in the VM.
Largely this has been untested though - this CL adds a test.

Change-Id: I7cf03911d716999c2bdb407b256a064d84a385ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117152
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-16 09:06:04 +00:00
Konstantin Shcheglov aa318ee261 Add Class/TypeParameter/FunctionTypeAliasElement.instantiate() methods.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I4d8d065683d65e83484543798963c1bc3935422d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117209
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-14 19:06:25 +00:00
pq 4575e4df37 fix for UNUSED_LOCAL_VARIABLE
see: https://github.com/dart-lang/sdk/issues/38361

Change-Id: I5329067d6f132393efd9194886713c30e1dafbfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117205
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-14 13:45:44 +00:00
Alexander Markov 3e1154cb5b [vm/bytecode] Move CheckStack after function type arguments handling
When generating deopt info in SIMDBC mode (DeoptInfoBuilder::AddCopy,
DeoptInfoBuilder::ToCpuRegisterSource) kSpecialDbcRegister source
locations are not supported.

In order to avoid such deopt info, this change moves CheckStack bytecode
instruction after function type arguments handling is finished (function
type arguments handling uses arguments descriptor which resides in
kArgsDescriptorsReg special DBC register). This placement of CheckStack is
also more aligned with what AST-based flow graph builder generates.

Fixes lib_2/math/min_max_test with bytecode in dartk-reload-mac-release-simdbc64
configuration.

Change-Id: I7d9863b8290a78a6e24e5806cc5053d55c93ce5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117221
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-13 23:03:55 +00:00
Nicholas Shahan 8d7daafdaf [dart_internal] Bump SDK upper-bound to <2.7.0
Change-Id: I5c43563149010d9715e32370a5f983d45d09039c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117164
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-09-13 22:01:16 +00:00
Mike Fairhurst 330fccbc0d Implement extension override in summary2
Change-Id: I0c7028eaa53ae070d521cda86a885435e4345089
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117124
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-09-13 21:23:03 +00:00
Konstantin Shcheglov 08518a6d5e Stop using ClassElement.type and InterfacecType.instantiate in TypeSystem tests.
R=brianwilkerson@google.com

Change-Id: If455bac28edae6d37b418f956ec862211b763495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117167
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-13 21:09:53 +00:00
Sam Rawlins d53086e005 Fix strict-inference failure on ctor call to allow upwards dynamic
The tests highlight the change:

    class C<T> {
      C([T t]);
    }

    // This used to be a strict-inference failure, but is no longer.
    var upwardsInfersDynamic = C(42 as dynamic);

Additionally, strict-inference no longer takes @optionalTypeArgs into account.

strict-inference spec: https://github.com/dart-lang/language/blob/master/resources/type-system/strict-inference.md

Bug: https://github.com/dart-lang/sdk/issues/33749
Change-Id: Iac07d9d15ce2146108753cae25890a559288a318
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111740
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-13 20:34:19 +00:00
Brian Wilkerson e8413cd08d Add a fix to allow unqualified references to static members to be qualified.
Change-Id: Iecc08f6ed05509ff170c3276c89bfbaf1406a437
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117165
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-13 18:11:36 +00:00
Kallen Tu f20f619050 Add 'variance' experimental flag.
Generated flag code

Change-Id: I61e6b8fd0a21c511c93afb9b334dc8c17eb69272
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117041
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2019-09-13 16:11:16 +00:00
Brian Wilkerson 139889e2b9 Fix a couple of diagnostic messages and re-order several constants to restore alphabetic ordering
Change-Id: Ifb853a1ae6b9b22e2f8e65c304b43ba2b8b895d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117161
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-13 15:58:42 +00:00
Konstantin Shcheglov daa22105fd More clean up for TypeSystem tests.
R=brianwilkerson@google.com

Change-Id: I269af4969d855610c6b94c3752278d968118748d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117123
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-13 15:56:22 +00:00
Sam Rawlins 3129ad9585 Only report a non-const initializer for const variables; fixes #35985
Bug: https://github.com/dart-lang/sdk/issues/35985
Change-Id: Iec21a08db57580af910be5a655bd439ecab15123
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117001
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-09-13 15:39:52 +00:00
Paul Berry f8f7a5a6c1 Migration: add a test case documenting the need for definite assignment integration
See #38344.

Change-Id: Icaef1c645843746fd88f33b910dd940ae893e67e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116884
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-13 14:51:32 +00:00
Paul Berry 366b4056e6 Migration: add a test case documenting a problem with back-propagation of non-nullability
See #38341.

Change-Id: I74cfc40a1db60e3dce10352ac3945a23fe591e95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116882
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-13 14:51:32 +00:00
Jens Johansen f35f9e8e24 [kernel] Don't lazy load classes when dills are concatenated
We have two layers of laziness.
Lazy loading functions (the old one) disables itself when loading a
concatenated dill file.
Lazy loading class content (the new one) forgot to do that while not
being geared towards it either.
This means that it - when loading lazily - can look into the wrong
string table, the wrong link table etc.
This CL brings the laziness for classes on par with the laziness for
functions in that it is now disabled when loading a concatenated dill
file.

Change-Id: If3449d5aff34287221a14fb7e940779d93b1e7b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117145
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-13 12:52:52 +00:00
Johnni Winther 2a12c63631 [cfe] Use SuperPropertySet for super assignment
Change-Id: I82afdb7558186aa744a09c4ee68ac6335a7c55f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116280
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-13 07:38:25 +00:00
Johnni Winther 4b72fffaaf [cfe] Use VariableSet for variable assignment
Change-Id: Ia94f9e1a3548e615fef111256aa2419cc1fd8c75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116209
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-13 07:38:25 +00:00
Johnni Winther 2153a06b82 [cfe] Use PropertySet for property assignment
Change-Id: If16d2b9ca8bb1134d181c27ea524b8008e2f52ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116207
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-13 07:38:25 +00:00
Johnni Winther 4fd7bf7356 [cfe] Split inference of super property get from instance property get
Change-Id: I457d6a4326c879ee68113760cd86dc0250e4cfde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116205
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-13 07:38:25 +00:00
Johnni Winther f8f37c131b [cfe] Split inference of super method invocation from instance method invocation
Change-Id: I6d8344da4bb49de0712b2c9f410c3f691ade7150
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116204
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-13 07:38:25 +00:00
Johnni Winther 7d2ebd3ce9 [cfe] Introduce InternalExpression
Create Cascade, DeferredCheck, LoadLibraryTearOff,
NullAwareMethodInvocation and NullAwareMethodPropertyGet as internal
only expressions.

Change-Id: Ie9e12a2fd87ae47f632076429eebd5a21717a062
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116203
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-13 07:38:25 +00:00
Johnni Winther 2c6f779a76 [cfe] Remove legacyMode
Change-Id: I9384631af94feaf1a345958ff23e6d35c2ba4049
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116202
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-13 07:38:25 +00:00
Johnni Winther 392cd3b26f [cfe] Delete InferredTypeVisitor
and TypeInferrer.readInferredType/storeInferredType

Change-Id: Iea2a97649adc3097df8abb1cf0aeb6e89b7d7f62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116063
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-13 07:38:25 +00:00
Johnni Winther 71534fe18c [cfe] Make *Impl classes
Change Judgment classes that are 1-to-1 extensions of kernel nodes into
*Impl classes that do not implement *Judgment.

Change-Id: Ia49b131cfb30e7e5c0d5f26a8a43e6dd6d05d2ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116062
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-13 07:38:25 +00:00
Johnni Winther 15ccf4c703 [cfe] Remove unneeded Judgments
Removes StatementJudgment, ExpressionJudgment, and InitializerJudgment
classes that are identical to existing nodes.

Change-Id: If67c1972387bb158bfe775cdf091cae4eadd47c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116061
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-13 07:38:25 +00:00
Johnni Winther 7985b187ab [cfe] Remove ExpressionJudgment.inferredType
Change-Id: I16df27c4dc9616370c946ddb7d4027110df38c7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116060
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-09-13 07:38:25 +00:00
Robert Nystrom 7516af7237 Add support for test requirements.
This gives us a way to specify that a test is only meaningful for
certain NNBD modes and should be skipped on other configurations. My
hope is we can extend this for other platform capabilities and then
eventually use this to express "skips" instead of relying on status
files for them.

Change-Id: I99548c326ee6fbe6db64e28e7f7f07d2fc1fd23c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117080
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-09-13 00:27:30 +00:00
Alexander Markov 1cd6518897 Revert "[vm/bytecode] Workaround for incorrect type parameters in function types"
This reverts commit 98837e6e43.

Reason for revert: proper fix landed in CFE (https://dart-review.googlesource.com/c/sdk/+/115368),
so reverting this workaround in bytecode generator.


Original change's description:
> [vm/bytecode] Workaround for incorrect type parameters in function types
>
> Fixes crashes on the following tests in bytecode mode:
> co19_2/LanguageFeatures/Extension-methods/generic_parameter_inference_A01_t02
> co19_2/LanguageFeatures/Extension-methods/generic_parameter_inference_A01_t05/01
> co19_2/LanguageFeatures/Extension-methods/generic_parameter_inference_A01_t05/02
> co19_2/LanguageFeatures/Extension-methods/generic_parameter_inference_A01_t05/none
> co19_2/LanguageFeatures/Extension-methods/generic_parameter_inference_A01_t06
>
> Issue: https://github.com/dart-lang/sdk/issues/37536
> Change-Id: Ief39058056fa2b1ad351dd99f630d11d17f8ce59
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116090
> Reviewed-by: Régis Crelier <regis@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>

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

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

Issue: https://github.com/dart-lang/sdk/issues/37536
Change-Id: Id4886c398a7e97d6f183dbca61d7a287439074a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117100
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-13 00:08:00 +00:00
Konstantin Shcheglov c138b505be Update TypeSystem tests to reuse AbstractTypeSystemTest.
R=brianwilkerson@google.com

Change-Id: Ic6e446cf124a52c8663140a995d4a58c3e4c92a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117015
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-12 23:18:07 +00:00
Mike Fairhurst 5beca80bc7 [analyzer] add isNullAware to IndexExpression
Change-Id: I3c3b1b0a38ea81fd573ec005e810eb2b000b3430
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-09-12 21:31:57 +00:00
Mike Fairhurst 2bc48ad1b6 [analyzer] add isNullAware to propertyAccess
Change-Id: Ia785a308e7281d6d17d05b38d52337f611708206
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116685
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-12 21:29:27 +00:00
Mike Fairhurst 68bcc00d10 [analyzer] implement isNullAware for method invocations
Change-Id: I630f94311a55b7a7fce5e47143e333abffe19c9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116681
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-12 21:21:22 +00:00
Brian Wilkerson 7badd807b1 Add a fix to replace an override with the extension name if accessing a static member
Change-Id: I5c7557aaff6af4eeaad196513c3315679fab26f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117011
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-12 19:54:52 +00:00
Konstantin Shcheglov c72a8589d9 Don't use DartType.instantiate() in TypeProviderImpl.
R=brianwilkerson@google.com

Change-Id: I4f5b0edb618d49fa20c5102d896d09b94aeb0653
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117003
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-12 19:43:02 +00:00
Brian Wilkerson 49de78b708 Convert tests so that they will continue to pass when extension methods are enabled by default
Change-Id: I58722f78c19d00842d98ebb238622e88c06468e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117009
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-12 19:12:12 +00:00
pq 9d3de982c6 fix for REMOVE_UNUSED_LABEL
see:  https://github.com/dart-lang/sdk/issues/38361

Change-Id: I45fdba9f12d9fdfd7d431149da97632df97a4653
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117008
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-12 18:59:18 +00:00
Nate Bosch 97925ece63 Delete test_runner/tool/co19.dart
Towards #37318

Removes a script using the deprecated `--checked` flag. No one appears to be
using this tool.

Change-Id: Ib9d30790943845ece2cb5e4af1e4f45da5a28f79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115769
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-09-12 18:43:09 +00:00
Paul Berry 29ce9350d3 Migration: add a test case documenting a problem with "is" checks.
See #38340.

Change-Id: If6517cecb9c97796e0ff93ddebfa4afe51b96c0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116860
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-12 17:53:26 +00:00
Paul Berry 152fbbb1d9 Migration: add a test case documenting an operator== corner case.
See #38339.

Change-Id: I98bf1f2931d57f5973326abef22f0f3bd3e9f911
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116827
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-12 17:53:26 +00:00
Konstantin Shcheglov fc2f744d9e Deprecate 'Source.encoding'.
R=brianwilkerson@google.com

Change-Id: I1a97c9b5a1401a16044df4e37117b2ec7e4e5db2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117002
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-12 16:48:16 +00:00
Brian Wilkerson c74e68e501 Add documentation for more diagnostics
Change-Id: Id2aeb13db0ceb81fc18d67e6ef2778304b36d02b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117000
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-12 16:35:46 +00:00
Konstantin Shcheglov 59008b8692 Skip parts with invalid URIs.
R=brianwilkerson@google.com

Bug: https://buganizer.corp.google.com/issues/140849287
Change-Id: I97da019f5aa6ec4db3b796842aaaa91834fc00b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116894
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-12 15:51:20 +00:00
danrubel 3b1d3de988 update parser to report out of order "?.." operator
Change-Id: I2d90e458d5721d16142752e8ac6a522cc41c2051
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-09-12 14:38:31 +00:00
Dmitry Stefantsov bdf237fa77 [cfe] Add a bit to Library to inticate if it's opted in for NNBD
Closes #37682.

Bug: http://dartbug.com/37682.
Change-Id: Ibe21cd0a1eac25a2883d2e2241d7476ca627edba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114857
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-12 12:15:56 +00:00
Dmitry Stefantsov 94b3a3f2ac [cfe] Don't reuse type parameters of FunctionNode in its functionType
Closes #37536.

Bug: http://dartbug.com/37536.
Change-Id: I7e5d2fc59a0cf53e67c43989cf806ca7dbcc307e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115368
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-12 11:12:52 +00:00
Jens Johansen ce5556ab36 [kernel] Load classes lazily
This CL gives the option to load classes lazily (on by default),
meaning that fields, procedures, constructors and redirecting
factory constructors of classes are not initially read,
but instead read when (or if) needed.

The idea being that many classes aren’t needed, and that
spending time on reading them is thus just a waste of time.

This is especially true in modular compilation where a lot
of modules needs to be given as input as the compilation at
hand might technically rely on it, but in practice only very
few of the classes are actually needed (or very few classes
actually need their members).

The below numbers are comparing a VM without this change and without
the lazy class hierarchy member lists change with
b31566b297 (the base change for those
two changes).

For running a simple hello-world script, on my machine 500 times
and doing statistics on it I can measure the following differences:

With verbose, from kernel_service startup to compile complete:
Difference at 95.0% confidence
        -17.8 +/- 0.555817
        -24.3455% +/- 0.760206%
        (Student's t, pooled s = 4.48379)

With verbose, total runtime measure by `time`
Difference at 95.0% confidence
        -19.346 +/- 0.905217
        -12.0333% +/- 0.563051%
        (Student's t, pooled s = 7.30242)

Without verbose, total runtime measure by `time`
Difference at 95.0% confidence
        -17.862 +/- 0.842905
        -12.0635% +/- 0.569276%
        (Student's t, pooled s = 6.79974)

For running a number of modular compilations I’ve recorded an
improvement in actual runtime in the order of 20-37% depending
on the circumstance. In a real build system, though, the
difference seems to be more in the order of around 5%.

Change-Id: Id329bcf2b01d12c12d7a49f2b8abacd9c2447f05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115703
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-12 08:08:33 +00:00
Jens Johansen 2bfe714d42 [kernel] Make class hierarchy member lists lazy
This should
a) Make it faster in situations where we don't need the member lists
b) Pave (some of) the way for loading dill files more lazy

Change-Id: I877026d5e503aec6b398ba93f5816a187aa11c6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115217
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-12 08:01:52 +00:00
Dmitry Stefantsov a62289451d Update changelog to include the recent breaking change
Link to the breaking change request:
https://github.com/dart-lang/sdk/issues/37985

Change-Id: I0fcb058e953a43a20e7b663f63bb88100f376a6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116762
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-09-12 07:37:17 +00:00
David Morgan 60ca2b840d Revert "Enable visibleForTesting on unnamed constructors"
This reverts commit de7ad46797.

Reason for revert: breaking for google3; need to discuss how to land this kind of change.

Original change's description:
> Enable visibleForTesting on unnamed constructors
> 
> Fixes #37936
> 
> Change-Id: I99023b66d7d53922edecfbab7be41d4c4145ec15
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114591
> Commit-Queue: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

TBR=brianwilkerson@google.com,srawlins@google.com

Change-Id: I9d3688b4dcdff92f94b83e1e557a488abfd963cb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116782
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2019-09-12 07:34:49 +00:00
Alexander Aprelev 0c481a196c Revert Reland '[vm/ffi] Implement FFI callbacks on AOT for ELF and Asm snapshots (excl. blobs).' as it breaks flutter profile execution on ios 32-bit platform.
Fixes https://github.com/flutter/flutter/issues/40114

Change-Id: If8d71e9c19c2e794d29f7ecbacb87457890a2fd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116883
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2019-09-12 00:10:09 +00:00
pq 1d01d91c33 fix for sort_child_properties_last
Change-Id: Ife3f05077fcd48e8f821314b55ba481918ba05c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116822
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-12 00:07:40 +00:00
Konstantin Shcheglov eac977bef0 Issue 38273. Fix for inlining methods ending with a return statement without an expression.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/38273
Change-Id: Ib399379f8aecb1e7737f2efdeb9dbf53f27d4abb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 23:27:40 +00:00
Robert Nystrom 0d1636e0b2 Simplify how the list of TestCases for each TestConfiguration is made.
- Make it synchronous. I did some benchmarking and the async didn't seem
  to make a measurable difference and made the code harder to follow.
- Fix a bunch of small-scale idiom things: "var", names, etc.
- Move TestCase.hash into TestFile since that lets us access it before
  we've created a TestCase.
- Remove dead code.
- Make it clearer which functions work with TestFiles and which with
  TestCases.
- Clarify the code that determines whether or not to enqueue a test.

The last point is the motivating one. Soon, I'll be extending this code
to take NNBD into account when determining which tests to skip, so I
wanted to clean it up some first.

Change-Id: I488ed6c7d2453535968ac43389a2fd8370ead57d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116662
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-09-11 23:05:59 +00:00
Konstantin Shcheglov c6b0ae1fda Fix for indexing FieldFormalParameterMember with unresolved field.
R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/38071
Change-Id: Ifa2f9218357f0f7bb3236f66aee34c8940c8b206
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116865
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 22:45:59 +00:00
Konstantin Shcheglov c99cd5b82e Add more dart:html, enough for angular_analyzer_plugin.
R=brianwilkerson@google.com

Change-Id: Ib45e5464e18839c65878e52f6a3c281416a9c952
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116861
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 22:04:09 +00:00
Konstantin Shcheglov 3e63f06afd Remove CancelableFuture.
We don't use it anymore, and none of our clients does.

R=brianwilkerson@google.com

Change-Id: Iac840c182b47d85595ca80762fa8a207d8545585
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116752
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 22:03:19 +00:00
Brian Wilkerson 25edeb7ae1 Support completing the extension name locally
Change-Id: I49174918ca84f2aaafe4b47200e9396f2191a727
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116802
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 21:42:26 +00:00
Konstantin Shcheglov e8836f5086 Fix sample for UNDEFINED_SETTER.
R=brianwilkerson@google.com

Change-Id: I9c897ee5890d4b951cf157a5da6c21a5505248d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116823
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 21:20:57 +00:00
Konstantin Shcheglov d39b67dbfe Remove more unused classes from engine.dart
R=brianwilkerson@google.com

Change-Id: I8d660025e201ef8a79d377c1923fe9a87bbc80ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116750
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 20:12:49 +00:00
pq e35408df41 update REMOVE_TYPE_ANNOTATION assist error associations
(mainly book-keeping and TODOs)

Change-Id: Ic99828b469e7e78c1ae100fa0a0b15d14c5ecfcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116801
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-11 20:10:39 +00:00
Brian Wilkerson d36f5ed181 Fix diagnostic documentation tests and add support for documenting parser codes
Change-Id: Ie2e360e6e4a344888bb409d20f21c969280bbdf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116742
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-11 19:45:47 +00:00
Konstantin Shcheglov 4f8f592b51 Remove adding prefixes for auto imports.
Adding import prefixes often has false positives.
At this point I think that this feature does more harm than benefit.

R=brianwilkerson@google.com

Bug: https://github.com/dart-lang/sdk/issues/38326
Change-Id: I99e3400aebc062d9de3c298d7ed58520534d061c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116746
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 19:04:47 +00:00
Brian Wilkerson be93b04a7c Introduce a better diagnostic message for unqualified references to static members within extensions
Change-Id: Ie505bf86e510161bf5dece489292388039902f83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116748
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-11 19:02:56 +00:00
Sam Rawlins de7ad46797 Enable visibleForTesting on unnamed constructors
Fixes #37936

Change-Id: I99023b66d7d53922edecfbab7be41d4c4145ec15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114591
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-11 18:20:46 +00:00
Sam Rawlins 80040e5cfe Remove errors for raw types in is or as expressions.
This brings the errors in line with the exceptions described in the spec:

https://github.com/dart-lang/language/blob/master/resources/type-system/strict-raw-types.md#conditions-for-a-raw-type-hint

Change-Id: I045237d937579d4390d3e676dc5e12346b90b480
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116381
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2019-09-11 18:13:46 +00:00
Konstantin Shcheglov dd3d6547de Rewrite property resolution, fix reporting errors when compound assignment without a getter.
Change-Id: Id737ea776866c3d9a52033181759f27e26dc34b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116559
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-11 17:28:53 +00:00
Konstantin Shcheglov 76e6325ae0 Remove unused methods of AnalysisContext.
Change-Id: Ie7f81ac09b51f7a4e70a32f962e6e15c81245820
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116724
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 17:09:47 +00:00
pq 27918cdb29 fix for prefer_inlined_adds
Change-Id: Icd307a2bc7fdb1d3e63fd5144af79dcc430b5ba8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-09-11 16:54:07 +00:00
danrubel 16c7ac92bf move const method error reporting into parser
Change-Id: Ibae4aeb0362138e742f80186ed98a20eb3469ba1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116661
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-09-11 14:48:47 +00:00
Brian Wilkerson 9113fb3ce0 Move the remaining StaticWarningCode tests to their own files
Change-Id: I764c9cbd961bc377d1b158aa0e16b2fb0e77b8cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116722
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-11 13:34:57 +00:00
Brian Wilkerson 1b67cc79da Suggest completions for extensions in parts
Change-Id: I3aceaf24680ee7599a0beccd79dde1f790ec5ad1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116686
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-11 13:34:07 +00:00
Paul Berry f3b2d770ad Migration: rework assignment handling.
This change separates the handling of upcast assignments (which we
handle precisely) from downcast assignments (which we handle on a
"best effort" basis).

Should address ~2 exceptions whose stack trace includes the line

_AssignmentChecker._checkAssignment_recursion (package:nnbd_migration/src/edge_builder.dart:2087:9)

Change-Id: I0026f470a02c266c43d94ad2f08b84b8b3d7d228
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116687
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-09-11 00:25:14 +00:00
Paul Berry 1bbee6119d Migration: handle binary expressions whose LHS has type dynamic.
Should address ~21 exceptions whose stack trace includes the line

EdgeBuilder.visitBinaryExpression (package:nnbd_migration/src/edge_builder.dart:374:14)

Change-Id: I884ac0884e4249028219ca7ba374ec95a0849d7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116683
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 00:25:14 +00:00
Paul Berry 75fd88cf8c Migration: handle dynamic function expression invocations.
Should address ~17 exceptions whose stack trace contains the line:

EdgeBuilder._handleInvocationArguments (package:nnbd_migration/src/edge_builder.dart:1783:21)

Change-Id: I05eb69ac5a1bbda67bd080f5c9db4fd66ee1f8bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116680
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-09-11 00:25:14 +00:00
Paul Berry eeb1716660 Migration: don't forget to visit arguments to dynamic invocations.
Change-Id: Id2a6e09d7d7b5ac68e4a2f15612243c729fa4392
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116557
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-09-11 00:25:14 +00:00
Paul Berry 3cccd7f117 Migration: handle ??= assignments.
This should address ~24 exceptions whose stack trace contains the line:

EdgeBuilder.visitAssignmentExpression (package:nnbd_migration/src/edge_builder.dart:278:7)

Change-Id: I63cbc48422aeb85f49731dc479c8203a9fd6fecf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116554
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 00:25:14 +00:00
Konstantin Shcheglov 6e01ad4d22 Fix for codeOffset/codeLength for enum constants.
R=brianwilkerson@google.com

Change-Id: I5694f96fc0e7863f18c208005ec9984eaf58bacb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116682
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-10 22:52:29 +00:00
Robert Nystrom 3f7805a90e Make the NNBD command-line options less, uh, half-baked.
- Better name than "optedIn".
- Actually hook up the command-line option to the configuration.
- Add tests, which would have caught the previous mistake.
- Don't allow comma-separated values for "--progress" and "--nnbd".
- Remove unused dead "--strong" option.

Change-Id: I57d7cb0d81af50d662dcf3f7f4c9ca1f2b102f2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116544
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2019-09-10 22:39:19 +00:00
Paul Berry 79137ed65f Migration: create flow anaylsis before visiting parameters.
This is necessary in case any parameters are found that trigger flow
analysis methods to be called.

Should address ~24 exceptions whose stack trace contains the line:

EdgeBuilder.visitBooleanLiteral (package:nnbd_migration/src/edge_builder.dart:390:19)

Change-Id: I08dc31a8acdaaf0685516aab872905f620602806
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116488
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-10 22:08:02 +00:00
Paul Berry 1100aab88d Migration: handle this or super in generic classes.
This should address ~21 exceptions whose stack trace includes the line:

new DecoratedType.<anonymous closure> (package:nnbd_migration/src/decorated_type.dart:64:16)

Change-Id: Ic7ce9913c74ff468f8099e3b9f10a7a81eb00721
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-09-10 22:08:02 +00:00
Brian Wilkerson f3911dffb5 Update included element kinds to include extensions
Change-Id: I1eada569734810707df085b8b66e02f1458aabf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-10 21:37:26 +00:00
Brian Wilkerson 90866d3ecc Remove unused import
Change-Id: I011f6591a760d7d82ffc8b9462c5749107e5012f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116552
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-09-10 20:42:20 +00:00
danrubel 30ea777c65 fix parsing of "?.." cascade operator
Fix https://github.com/dart-lang/sdk/issues/37859

Change-Id: Ie29f4fd000199f0099137308603335e36af6ae26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116089
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-09-10 20:36:04 +00:00
Brian Wilkerson 7ffb9de00f Update the version in the extension methods version hint
Change-Id: I465413e0d1252573112bff2e518fc933308e093b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116640
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-09-10 19:48:17 +00:00