Commit graph

73648 commits

Author SHA1 Message Date
David Morgan 1d3fbbed7c Revert "Fix duration.toString() to conform the description"
This reverts commit 038e981f89.

Reason for revert: Breaks some tests; visible changes to some web UIs.

Original change's description:
> Fix duration.toString() to conform the description
> 
> Duration.toString() should return in a format of "HH:MM:SS.mmmmmm".
> But when `hours` is less than 10, toString() doesn't have the leading
> zero, which is "H:MM:SS.mmmmmm".
> 
> The corresponding co19 issue: https://github.com/dart-lang/co19/issues/733
> 
> Bug: https://github.com/dart-lang/sdk/issues/41737
> Change-Id: I2264171b2b37e89056695f7f821125a5f78d87fb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151163
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>

TBR=lrn@google.com,zichangguo@google.com

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

Bug: https://github.com/dart-lang/sdk/issues/41737
Change-Id: I4d7ef5de9807e8e2b2a77c2171d1693b7527f671
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151848
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-06-22 10:29:15 +00:00
Tess Strickland ed0eeaebca [vm/aot] Move precompiled position handling to CodeSourceMap classes.
Since CodeSourceMaps are not serialized when non-symbolic stack traces
are enabled, use a different CSM encoding in this mode. Here, we write
out the line number as before and then the column as a separately
written integer.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try
Change-Id: If9aec2f52551d04eb45626744957e625bcc17d3d
Bug: https://github.com/dart-lang/sdk/issues/42397
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151824
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2020-06-22 09:29:45 +00:00
Karl Klose dbefbc3753 [infra] Empty SDK commit to validate recipe changes
TBR=athom@google.com

Change-Id: I119d97af610b2ca28517717fb1fb29760ab41c49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151845
Reviewed-by: Karl Klose <karlklose@google.com>
2020-06-22 04:54:21 +00:00
Brian Wilkerson 32d403b472 Add a fix to insert the keyword late
Change-Id: I40612fd2710a1189137d8ba676c1b66b4943d677
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151037
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-06-21 17:33:10 +00:00
Brian Wilkerson 52dd48651b Convert the remaining quick assists to use CorrectionProducer
Change-Id: I0accafaf3f076d99bb265d2e6d8815cf2720a7a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151871
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-06-21 15:43:42 +00:00
Kevin Moore 762113758d Enable v1.9 pedantic lints...
...except for `omit_local_variable_types`

Change-Id: Ifd9ac78fedf99786a07b2cee5a3891378a49ef5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151885
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-06-20 14:31:09 +00:00
Siva Annamalai d46a696957 Revert "Reland : [VM/Runtime] Cleanup package config initialization code"
This reverts commit 03777dba31.

Reason for revert: Failures in couple of bots

Original change's description:
> Reland : [VM/Runtime] Cleanup package config initialization code
> 
> - Use _Init function for initialization of package config
> - Remove DartUtils::SetWorkingDirectory, SingleArgDart_Invoke,
> 
>   DartUtils::SetupPackageConfig
> - Rename Loader::InitForSnapshot to Loader::Init
> - Remove _setPackagesConfig, _setWorkingDirectory from builtin library
> - Rename _setPackagesMap to _setPackagesConfig
> Change-Id: I1e4a25e79706d7764247c9fbfcc8e8ce3231343c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151633
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

TBR=aam@google.com,asiva@google.com

Change-Id: Ibea8c35fe310ac7708f00bb9ffd58715b6924cb5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151869
Reviewed-by: Siva Annamalai <asiva@google.com>
Auto-Submit: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-06-20 08:02:53 +00:00
Johnni Winther 7517a0903b [cfe] Mark late setters as isGenericCovariantImpl
Closes #42407

Change-Id: Icbca37955f0e2c67ac44dd912516048d33ccac39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151842
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-06-20 06:57:29 +00:00
Zach Anderson 1a8190db49 Add --track-widget-creation to kernel_front_end.dart
Change-Id: I2ec8dbbee978a68c4e10ddb38501a4e4d2b5e004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151868
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-06-20 06:54:39 +00:00
Stephen Adams 5316f32a64 [benchmark] BigIntParsePrint: Hoist value in all loops
Hoist 'one' in all versions of benchmark for uniformity.

Change-Id: Id2aaa9b18903ff33e3057c01e13ff332fc8979ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151180
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-06-20 06:01:39 +00:00
asiva 03777dba31 Reland : [VM/Runtime] Cleanup package config initialization code
- Use _Init function for initialization of package config
- Remove DartUtils::SetWorkingDirectory, SingleArgDart_Invoke,

  DartUtils::SetupPackageConfig
- Rename Loader::InitForSnapshot to Loader::Init
- Remove _setPackagesConfig, _setWorkingDirectory from builtin library
- Rename _setPackagesMap to _setPackagesConfig
Change-Id: I1e4a25e79706d7764247c9fbfcc8e8ce3231343c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151633
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-06-20 05:50:49 +00:00
Stephen Adams 8e2c51e8fd [dart2js] final locals may be assigned
A 'final' local can be assigned via definite assignment or via a
'late' initializer.

Fixed: 42422
Change-Id: I5e03ca534fb18fcb928db99daa6654c8942c9bff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151867
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-06-20 05:15:29 +00:00
asiva bbc8aedada [VM/Runtime] - Fix for issue https://github.com/dart-lang/sdk/issues/42421
Set global null safety flag based on the snapshot instead of trying to
detect it per isolate (was causing issues with the vm isolate loading).
Should fix https://github.com/dart-lang/sdk/issues/42421

Bug:42421
Change-Id: I9143560b76fedcb991e96522cbf5d820fde99f7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151866
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-06-20 04:18:59 +00:00
Anna Gringauze c909e16ee2 Added module information to metadata and use by frontend_sever
- created class representing module metadata, added metadata to JsCode
  class
- added module information to metadata, such as module name, load
  function name
- added import and file uris for libraries
- added experimental-emit-debug-metadata flag to frontend_server
- added frontend server tests to check for saved metadata

Related: https://github.com/dart-lang/sdk/issues/41852
Closes: https://github.com/dart-lang/sdk/issues/40774
Change-Id: Iecbbf1e4eea1919e01f002f45363d30707cb1590
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150181
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
2020-06-20 00:40:35 +00:00
Nicholas Shahan 40b95458a5 [ddc] Normalize T to Never when T extends Never
In generic function types when a type parameter T's bound is Never in
the current environment T should be normalized to Never where it
appears in the function type signature.

For example when S is never in:

`T Function<T extends S>()` --> `Never Function<T extends Never>()`

Passes the new generic_function_type_object_normalization_test.

Change-Id: I6ce2328bc81cd0df7bbc69fd8e59a45f707e9318
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150290
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-06-19 23:40:37 +00:00
Zichang Guo 34ab9f84ab [dart:io] HttpClientConnection is destroyed for "CONNECT" request
If "CONNECT" is used in HttpClientRequest, it is supposed to create a
tunnel and reuse the socket. The socket should remain open instead of
being closed.

Bug: https://github.com/dart-lang/sdk/issues/37808
Change-Id: Ic765bdc6fe4d3e21b3117e882b38e3abae15ceda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148684
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-06-19 23:18:07 +00:00
Mayank Patke f2f3a256b4 [dart2js] Add support for Never as a type literal.
Change-Id: Ia543f33619ce46e42a6ac5d0b2d19f44b32525b2
Bug: https://github.com/dart-lang/sdk/issues/42344
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151461
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-06-19 23:17:47 +00:00
Mayank Patke 6c593ac117 [dart2js] Visit type parameter bounds in the scope visitor.
Change-Id: Ief8cc2a88ef0833a10969237fa02cfdec869116d
Bug: https://github.com/dart-lang/sdk/issues/42344
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151460
Reviewed-by: Stephen Adams <sra@google.com>
2020-06-19 23:17:47 +00:00
Robert Nystrom a2cc089472 Migrate language_2/type_promotion to NNBD.
Change-Id: Iff60de7b9fbe9371c71c098a9a36e43d2dc7f134
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151810
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-06-19 23:09:27 +00:00
Konstantin Shcheglov 8fd04408f0 Add CiderCompletionComputer.warmUp()
R=brianwilkerson@google.com, keertip@google.com

Change-Id: I4fce7250d7f7b85ea47bf119ddfd6ef25fb28efe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151888
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-19 22:59:17 +00:00
Zichang Guo 038e981f89 Fix duration.toString() to conform the description
Duration.toString() should return in a format of "HH:MM:SS.mmmmmm".
But when `hours` is less than 10, toString() doesn't have the leading
zero, which is "H:MM:SS.mmmmmm".

The corresponding co19 issue: https://github.com/dart-lang/co19/issues/733

Bug: https://github.com/dart-lang/sdk/issues/41737
Change-Id: I2264171b2b37e89056695f7f821125a5f78d87fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151163
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-06-19 22:52:30 +00:00
Brian Wilkerson 9fcac032b6 Convert more quick assists to be correction producers
Change-Id: I6cc0343cc9af390923a7d4a66a95e1c15aeb47f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151887
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-19 22:23:47 +00:00
Ryan Macnak 6cc943957b [vm] Compute a partitioning of the program into loading units.
The partitioning has the property that for every reference from loading unit S to unit T, either
 - the reference is through a deferred prefix, or
 - T is guarenteed to be loaded before S

The partitioning is constructed by cutting the dominator tree of the library import graph at deferred imports. It is suboptimal if there are deferred imports to multiple libraries in a connected component, but the expected use case involves loading units with a single deferred entry.

Bug: https://github.com/dart-lang/sdk/issues/41974
Change-Id: I3c49044ae19112525f197b077b36e4ce874b81ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151470
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-06-19 21:35:47 +00:00
Stephen Adams 7425b3de51 [dart2js] Remove more dead code.
Change-Id: Iff5b3921f40981c8122d7720ce80a5f01731aa47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151883
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-06-19 21:20:07 +00:00
Brian Wilkerson 197308560a Add documentation for more diagnostics
Change-Id: Ib63182c67dfa0bef475871aa2104811c3a44dac6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151882
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-06-19 20:46:32 +00:00
Zichang Guo 242ce279db [dart:io] Fix Content-Length header being accidentally dropped
If the Content-Length has been set by contentLength setter, manually
setting the header to the same value will lead to the header being
dropped, since _contentLength is not updated in set() method. The method
set() will erase the header and add back the header with new value. As
_contentLength is not updated, when it adds back the new header, it
looks at _contentLength (Which is not reset) and skips the addition (
_contentLength is the same as the new value, we had the header already).

Bug: https://github.com/dart-lang/sdk/issues/42369
Change-Id: I3fba7cc332bdff0ba56e602ac810fbaeb85d2606
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151427
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-06-19 20:42:07 +00:00
Jaime Wren e12a515be0 Use the new analysis we now have with implied types to included types at locations such as 'var i = ^' for purposes of code completion.
Change-Id: Ie78a51a5c3c65818bec66496e51716f9406899c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151807
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-06-19 20:38:28 +00:00
Konstantin Shcheglov 67173ade40 Record performance for analysis operations.
R=brianwilkerson@google.com, keertip@google.com

Change-Id: Ib85680d37f36c9a34f61b8d215a68ed2bd71f8d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151884
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-19 20:15:35 +00:00
Filip Filmar 5d02a18d2f Revert "[vm] Replaces fuchsia.deprecatedtimezone"
This reverts commit 16f09f20b3.

Reason for revert: Trigger finger.  Shouldn't have been merged.

Original change's description:
> [vm] Replaces fuchsia.deprecatedtimezone
> 
> (prior attempt was rolled back as it caused downstream tests to time
> out.  See prior attempt at: See:
> https://dart-review.googlesource.com/c/sdk/+/149206)
> 
> The FIDL library fuchsia.deprecatedtimezone is going away.  There are
> different and better ways to obtain the same functionality.  This change
> removes the dependency on fuchsia.deprecatedtimezone from the Dart SDK.
> 
> Adds inspect metrics that allow whitebox testing of the runners.  Here's
> a sample `fx iquery` excerpt from a running device, showing both a dart
> and a flutter runner exposing the same OS diagnostic metrics.
> 
> ```
> /hub/c/dart_jit_runner.cmx/70981/out/diagnostics:
>   /hub/c/dart_jit_runner.cmx/70981/out/diagnostics#os:
>     dst_status = 0
>     get_profile_status = 0
>     timezone_content_status = 0
>     tz_data_close_status = 0
>     tz_data_status = 0
> /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics:
>   /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics#os:
>     dst_status = 0
>     get_profile_status = 0
>     timezone_content_status = 0
>     tz_data_close_status = 0
>     tz_data_status = 0
> ```
> 
> Under nominal operation, all of the above values should be equal to 0.
> Nonzero values indicate an error.
> 
> This functionality is guarded by Fuchsia integration tests at
> //src/tests/intl.
> 
> Tested:
>   (compile locally for Fuchsia and deploy)
>   fx test //src/tests/intl
> 
> See:
>   - https://github.com/dart-lang/sdk/issues/42245
>   - https://github.com/dart-lang/sdk/issues/39650
> 
> Fixes #39650
> 
> Change-Id: I97f6e17e57000f6eec71246aee670bca65b7e1d1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150662
> Commit-Queue: Filip Filmar <fmil@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>

TBR=kustermann@google.com,kaushikiska@google.com,fmil@google.com

Change-Id: I7e3f8b9724e30653ca5fccaf912e940edcbcf974
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151861
Reviewed-by: Filip Filmar <fmil@google.com>
Commit-Queue: Filip Filmar <fmil@google.com>
2020-06-19 19:21:15 +00:00
Filip Filmar 16f09f20b3 [vm] Replaces fuchsia.deprecatedtimezone
(prior attempt was rolled back as it caused downstream tests to time
out.  See prior attempt at: See:
https://dart-review.googlesource.com/c/sdk/+/149206)

The FIDL library fuchsia.deprecatedtimezone is going away.  There are
different and better ways to obtain the same functionality.  This change
removes the dependency on fuchsia.deprecatedtimezone from the Dart SDK.

Adds inspect metrics that allow whitebox testing of the runners.  Here's
a sample `fx iquery` excerpt from a running device, showing both a dart
and a flutter runner exposing the same OS diagnostic metrics.

```
/hub/c/dart_jit_runner.cmx/70981/out/diagnostics:
  /hub/c/dart_jit_runner.cmx/70981/out/diagnostics#os:
    dst_status = 0
    get_profile_status = 0
    timezone_content_status = 0
    tz_data_close_status = 0
    tz_data_status = 0
/hub/c/flutter_jit_runner.cmx/29567/out/diagnostics:
  /hub/c/flutter_jit_runner.cmx/29567/out/diagnostics#os:
    dst_status = 0
    get_profile_status = 0
    timezone_content_status = 0
    tz_data_close_status = 0
    tz_data_status = 0
```

Under nominal operation, all of the above values should be equal to 0.
Nonzero values indicate an error.

This functionality is guarded by Fuchsia integration tests at
//src/tests/intl.

Tested:
  (compile locally for Fuchsia and deploy)
  fx test //src/tests/intl

See:
  - https://github.com/dart-lang/sdk/issues/42245
  - https://github.com/dart-lang/sdk/issues/39650

Fixes #39650

Change-Id: I97f6e17e57000f6eec71246aee670bca65b7e1d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150662
Commit-Queue: Filip Filmar <fmil@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-19 19:15:03 +00:00
Alexander Aprelev 94fcf226fc [vm/sigprof] Disable checking of sigprof on mac.
Fixes https://github.com/dart-lang/sdk/issues/41239

Change-Id: I397f70c7d9977bbf8ce33ce649c7d82e02fd26a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151880
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2020-06-19 18:42:33 +00:00
Mark Zhou 2e50075597 [dartdevc] Clear all constant containers after a hot restart.
Change-Id: I4b30c88ac4bf0be0c3487e4370b710bc4cfd63ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151808
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-06-19 18:29:23 +00:00
David Morgan 50fbe74ac3 Upgrade stack_trace from 1.9.3 to 07569831f17844ef90214a179db211954a7f7324 (1.9.5-dev in pubspec.yaml).
Change-Id: Ica27386447b9d19b31bcd0eafb1e00f213ca3c2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151841
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-06-19 18:13:23 +00:00
Regis Crelier 7e72c9ae7e Roll benchmarks-internal to 29176ec025667ab7acb9dbb93b3e7d429c6c2c6f
Change-Id: I6958edb197ebb2a0390fe9883dddb93d9446f1ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151860
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-06-19 18:05:23 +00:00
Stephen Adams acf41746f5 [dart2js] More old-rti cleanup
Change-Id: Ia1bb661a255a9e3ea48b79ff33532d0d66e8e80e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151803
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-06-19 17:49:33 +00:00
Konstantin Shcheglov 69843a8f04 Record performance with CiderOperationPerformance hierarchy.
This does not include breakdown for resolution yet.

I wonder if this more general information could replace specialized
CiderCompletionPerformance fields 'resolution', 'suggestions', etc.
WDYT?

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

Change-Id: I4685dc2a8de8028ce84cc2640943f45c8cf047e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151811
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2020-06-19 17:33:03 +00:00
Konstantin Shcheglov d4d1935140 Support for --packages in build mode.
Bug: https://buganizer.corp.google.com/issues/159290352
Change-Id: I160938eacf996fbc708f42f161ddc36becb71c92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151781
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-06-19 17:03:03 +00:00
Alexander Markov ea50b03cbe [vm/nnbd] Fix incorrect non-nullable types in core libraries
VM calls certain functions from core libraries implicitly and in
certain cases such functions can take null as argument.
This change fixes parameters which were declared with non-nullable
types, but in fact they should take null.

These incorrectly declared parameters trigger non-null assertions in
weak mode.

Change-Id: Ia80fa28e437b25427f13f9e672a069fa722e966a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151784
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-06-19 16:58:53 +00:00
Jaime Wren f0f5cad10e Update the pubspec.yaml file in pkg/dartdev/
Change-Id: Iad0af73fc25b571fdcae9f21c4da00441ee4416e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151802
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-06-19 16:37:23 +00:00
Stephen Adams d8b7ec5163 [dart2js] Share large strings
On a per output-unit basis, repeated large strings are shared via a
`string$` pool.

TODOs:

- don't do it with strings passed to JS() code (they might need
  to be property accesses).

- tweak thresholds, using different thresholds for slow/run-once code.

Change-Id: Ib14245d9d428e52fb2ca23f34fa533de97fa2208
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136304
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-06-19 16:34:13 +00:00
Alexander Markov 48fbdf8408 [vm/compiler] Fix vm/cc/Inliner_List_generate on simarm and dartkb
Fixes https://github.com/dart-lang/sdk/issues/42402

Change-Id: Id0403c1974d71f21f6f5dcfad8ffebe4f41f2e91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151782
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-06-19 16:02:43 +00:00
Johnni Winther bcace93c4f [cfe] Add test for issue 42407
Change-Id: Idf4362be94d42f36afa4e7a471e412a8f3b00c0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151821
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-06-19 14:50:05 +00:00
Alexander Thomas 2716c73110 [co19] Roll co19 to f3466a4fc3d201e2ca4da7214560718344aea87c
2020-06-19 sgrekhov@unipro.ru Generics and Functions test fixed after tryjobs run
2020-06-19 irina.arkhipets@gmail.com Needless reviewer tags removed.
2020-06-19 irina.arkhipets@gmail.com Fixed issue 750: Language\Statements\If tests adopted for nnbd
2020-06-18 irina.arkhipets@gmail.com Fixed issue 749: Language\Statements\For tests adopted for null-safety.
2020-06-18 irina.arkhipets@gmail.com Fixed issue 748: Language\Statements\For\For_Loop tests adopted for null-safety.
2020-06-18 irina.arkhipets@gmail.com Fixed issue 747: Language\Statements\For\For_in tests adopted for null-safety.
2020-06-18 irina.arkhipets@gmail.com Fixed issue 746: Language\Statements\Expression_Statements tests adopted for null-safety.
2020-06-18 irina.arkhipets@gmail.com Fixed issue 735: typo in compile tag corrected
2020-06-18 irina.arkhipets@gmail.com Fixed issue 745: Language\Libraries_and_Scripts tests adopted for null-safety.
2020-06-18 irina.arkhipets@gmail.com Fixed issue 744: Language\Statements\Continue tests adopted for null-safety.
2020-06-18 irina.arkhipets@gmail.com Fixed issue 743: Language\Statements\Break tests adopted for null-safety.
2020-06-18 irina.arkhipets@gmail.com Fixed issue 742 Language\Statements\Assert tests adopted for null-safety.
2020-06-18 irina.arkhipets@gmail.com Test library corrected according to the Dart SDK Issue 42393.
2020-06-18 irina.arkhipets@gmail.com Fixed issue 740: Language\Libraries_and_Scripts tests adopted for null-safety.
2020-06-18 irina.arkhipets@gmail.com Fixed issue 739: Language\Libraries_and_Scripts\URIs tests adopted for null-safety.
2020-06-18 irina.arkhipets@gmail.com Fixed issue 738: Language\Libraries_and_Scripts\Scripts tests adopted for null-safety.
2020-06-18 irina.arkhipets@gmail.com Fixed issue 724: Language\Libraries_and_Scripts\Parts tests adopted for null-safety.
2020-06-18 sgrekhov@unipro.ru Fixes 737. Language\Reference\Lexical_Rules\Comments migrated to null safety
2020-06-18 irina.arkhipets@gmail.com Fixed issue 735: Compile error tags corrected for cycle error.
2020-06-18 sgrekhov@unipro.ru Change Language tests according to the issues resolution
2020-06-17 sgrekhov@unipro.ru Fixes 736. Language\Reference\Operator_Precedence migrated to null safety
2020-06-17 sgrekhov@unipro.ru Fix Language tests after tryjobs run.
2020-06-16 sgrekhov@unipro.ru Fixes 734. Language\Reference\Lexical_Rules migrated to null safety
2020-06-16 sgrekhov@unipro.ru Fixes 732. Language\Overview\Scoping migrated to null safety
2020-06-16 sgrekhov@unipro.ru Classes/Constructors tests fixed to not to fail on NNBD
2020-06-15 sgrekhov@unipro.ru Fixes 731. Language\Overview\Privacy tests migrated to null-safety
2020-06-15 sgrekhov@unipro.ru 730. Fix mixin super invocation test
2020-06-11 sgrekhov@unipro.ru Fixes 730. LanguageFeatures/Super-mixins migrated to null safety

Change-Id: Id33ff14a06e2c3037cfb64385aec2aaaabe779fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151823
Reviewed-by: William Hesse <whesse@google.com>
2020-06-19 14:26:46 +00:00
Tess Strickland 3e40abbc09 [vm/aot] Reland "Keep column information when possible for precompiled mode."
Changes:

Doing this always in precompiled mode meant increased data segment sizes
when CodeSourceMaps are stored, since encoded line/column information is
larger in the LEB-like encoding used. Now we only store column
information when we produce non-symbolic stacks, since the increased
space needed to store the columns is instead in DWARF sections and can
be stripped or elided.

Original description:

Previously, we passed line number information to the stack trace printer
and to DWARF by changing the non-special positions in the CodeSourceMap
to line numbers in precompiled mode. However, doing this lost column
information.

We get the column information back in the majority of cases by encoding
the line number and column information when neither is too large to pack
together into 30 bits. (Here, 20 bits for line and 10 bits for column.)
Otherwise, we just store the line information as before, though due to
using a bit to encode whether column info exists, it's reduced to 30
bits. If the line info is too big for that, we just return kNoSourcePos.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm_x64-try
Change-Id: Ia8baee71468da6100a170fa305d03059ffd17f78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151822
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-19 13:50:03 +00:00
Martin Kustermann a1416976c0 [benchmarks] Disable omit_local_variable_types analyzer hint
This hint flags code such as
   int time = watch.elapsedMillisecond;
and encourages using `var` everywhere:
   var time = watch.elapsedMillisecond;

Though if the type is not obvious to a developer, we should be allowed
to write it.

Furthermore it copies the rules from
`package:pedantic/analysis_options-1.9.0.yaml` to avoid being
automatically opted-in to new rules when a new package:pedantic
gets rolled into the SDK.

Change-Id: I45c72584885c608a56745685e9068ba83dfbed47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151526
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-06-19 13:43:23 +00:00
Sam Rawlins 9239061138 Analyzer: Improve message of implicit_this_reference_in_initializer
Fixes https://github.com/dart-lang/sdk/issues/37293

Change-Id: I4b621171dcaf618e97c62acd110ce7c911e6c9e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151425
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-06-19 13:40:43 +00:00
Regis Crelier bcb3a71601 Roll benchmarks-internal to 4fa1b8ae571aaf1762346a3e0e893aca643af030
Change-Id: Ib2e696bacbc87575a9737f45644d824b7e1144a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151804
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-06-19 11:22:25 +00:00
Johnni Winther be96c24560 [cfe] Only check required named parameters in opt-in overrides
Closes #42387

Change-Id: I60a0c7b47f2f8c71d67f79a854648b96a301ba45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151740
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-06-19 07:19:05 +00:00
Robert Nystrom 67618b0542 Migrate language_2/null_aware to NNBD.
Change-Id: I4466165b3ce2b79325a29db2a4d40d7f98f86007
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149885
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-06-19 01:38:55 +00:00
Robert Nystrom 7dff15917e Migrate language_2/type_object to NNBD.
Change-Id: I20caf30534b610f7a51dcdd581c9a4210e068005
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151629
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-06-19 01:18:44 +00:00