Commit graph

73680 commits

Author SHA1 Message Date
Jonas Termansen
912ae8230f [benchmark] Migrate Example benchmark to be null safe.
Analyzer lints are fixed while here.

TBR=whesse@google.com

Change-Id: I4e43d9b356608c5cb885f008fb232ea2390b9dd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151840
Reviewed-by: William Hesse <whesse@google.com>
2020-06-23 08:41:19 +00:00
Michael Thomsen
b54a95b0bb Add a new dartdev compile verb.
Supports compiling to snapshots, JS, native executables, and kernel:

$ dart help compile
Compile Dart to various formats

Usage: dart compile <subcommand> [arguments]
-h, --help    Print this usage information.

Available subcommands:
  aot      Compile Dart to an AOT snapshot
  exe      Compile Dart to a self-contained executable
  jit      Compile Dart to a JIT snapshot
  js       Compile Dart to JavaScript
  kernel   Compile Dart to Kernel intermediate format

Change-Id: I1143f8dd0eec6f87a8271144f92dedc1fcf82923
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146806
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-06-23 08:33:17 +00:00
Vyacheslav Egorov
f008738abd [vm/tests] Fix NNBD version of vm/dart/v8_snapshot_profile_writer_test
Dart type inference does not propagate type sideways in the argument lists[1],
so we have to explicitly provide fold with a type argument, otherwise
it is inferred as `Object?`, which does not work in this case.


[1] https://github.com/dart-lang/language/issues/731

Change-Id: I2ee0bda2cd6c37c64018efd48ea14c469f76ba3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152003
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2020-06-23 08:15:17 +00:00
David Morgan
6bdf55f31f Revert "[vm, service, observatory] Bang Bang (My Type System Shot Me Down)."
This reverts commit 65e3c9d3b1.

Reason for revert: package:logging, package:stack_trace and package:usage need to be migrated first.

Original change's description:
> [vm, service, observatory] Bang Bang (My Type System Shot Me Down).
> 
> Port the service tests and Observatory to Dart 3.
> 
> Changes from the original landing:
> 
>  - The old tests are copied to observatory_2 / service_2 so the service can still be tested when running a legacy mode program
>  - The test harness is taught about 'service_2'
>  - Observatory's package is added to front end's opt-in list
>  - Fixed some places in the bot configuration matrix so ensure 'service' runs on legacy bots and 'service_2' on weak-mode bots
> 
> The ported tests themselves are not changed.
> 
> Change-Id: I1d7e5cc61cdc044e1985e851bea7fd8a18f7d810
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149720
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

TBR=bkonyi@google.com,rmacnak@google.com

Change-Id: I43b72f149d8d7e9fe06006cdd8593fed1726aa3a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152004
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-06-23 08:06:00 +00:00
Martin Kustermann
177511aa17 [benchmarks] Disable literal_only_boolean_expressions/unnecessary_await_in_return analyzer hints
The literal_only_boolean_expressions analyzer hint flags this code:

   while (true) {
     ...
     if (cond) break;
     ...
   }

=> This is very common code.

The unnecessary_await_in_return analyzer hint flags this code:

    Future foo() async {
      ...
      return await foo();
    }

=> Addressing this hint by removing the `await` changes semantics,
performance characteristics and async stack traces.

Change-Id: I3c126123bfba7386b01033084e954267af21ba13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152001
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-06-23 06:02:07 +00:00
Martin Kustermann
0a6a4a24ba [benchmarks] Migrate Calls benchmark to NNBD
Mostly just satisfying new analyzer lints.

Change-Id: Ib3d0f5d216659fcbab6c6f5a3db6383dc965f73d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151523
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2020-06-23 05:41:57 +00:00
Ryan Macnak
d2628a7106 Trigger bots.
Change-Id: Ida14a41afde8808e17ed99cacde4325bc5ca79e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152101
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-06-23 04:11:14 +00:00
Ryan Macnak
65e3c9d3b1 [vm, service, observatory] Bang Bang (My Type System Shot Me Down).
Port the service tests and Observatory to Dart 3.

Changes from the original landing:

 - The old tests are copied to observatory_2 / service_2 so the service can still be tested when running a legacy mode program
 - The test harness is taught about 'service_2'
 - Observatory's package is added to front end's opt-in list
 - Fixed some places in the bot configuration matrix so ensure 'service' runs on legacy bots and 'service_2' on weak-mode bots

The ported tests themselves are not changed.

Change-Id: I1d7e5cc61cdc044e1985e851bea7fd8a18f7d810
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149720
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-06-23 02:12:46 +00:00
Nicholas Shahan
7f268aba04 [ddc] Allow DDC to compile SDK from dill
This is the first step to removing all of the the sdks precompiled
to JS modules from the sdk download.

Enables build_runner to produce a JS file on demand from a .dill
file bundled in the sdk download. At this time, only the SDK can
be compiled from a .dill file.

Update build targets to run bin/dartdevc.dart instead of
tool/compile_dartdevc_sdk.dart.

Will delete tool/compile_dartdevc_sdk.dart after we cleanup all
of the uses outside of the SDK.

Change-Id: Id6002675419e8e502912cb3f5b626a0d13461df5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151025
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-06-23 01:08:06 +00:00
John Ryan
2d22e4ca26 Set informative-region text color.
Text is now white on a light-blue background.

Change-Id: Iac613c49fc8db6241ba013341fb29045f89048e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152042
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: John Ryan <ryjohn@google.com>
2020-06-23 00:21:26 +00:00
William Hesse
78617979b2 Migrate Isolate benchmarks to null safety
Change-Id: I420a60c58d9f727cf8d9cca99c211331ce8e3b57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151844
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-22 23:45:55 +00:00
Stephen Adams
9030ade7e2 [dart2js] Remove HIs and HIsViaInterceptor
Change-Id: Ieb0dc5bd0e48e40132ec3469bbc2204aa9556986
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152041
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-06-22 23:25:46 +00:00
Vyacheslav Egorov
04a35987b0 [vm/tool] Add legend to snapshot_analysis compare/summary output.
Issue https://github.com/dart-lang/sdk/issues/41249

Change-Id: I9939ebc6bbebb32284dd55692d65482fc3ae3f2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151387
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-06-22 21:50:36 +00:00
Vyacheslav Egorov
88ad237f96 [vm/tool] Support V8 profiles in snapshot_analysis treemap
Issue https://github.com/dart-lang/sdk/issues/41249

Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: Ic5a3b4054f3eda6dfc5f9bf48dca97dd6a6deac6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151386
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-06-22 21:44:36 +00:00
Vyacheslav Egorov
4aaf13adfd [vm/tool] Improvements to snapshot_analysis summary command.
It now supports filtering by name and displaying additional
histogram bucketed by object type.

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

Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: I5b0dcdbea0fc0b4af36ac5a6331057406087a409
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151385
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-06-22 21:44:36 +00:00
Vyacheslav Egorov
91c80bb798 [vm/tool] Support reading V8 profiles in snapshot_analysis tool.
We reconstruct ProgramInfo tree structure from the snapshot
by applying a simple graph algorithm, which takes parts of the
snapshot with clear ownership (e.g. library, class, function objects)
and then attempts to attribute the rest of the snapshot to these
clearly owned objects based on reachability.

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

Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-try,pkg-win-release-try,pkg-mac-release-try
Change-Id: I17c0f8323ee9092a2214b18bd948ff51fa2ccc49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151384
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-06-22 21:38:16 +00:00
Joshua Litt
77db092507 [dart2js] Stop running dart2js_2 suite when running unittests.
Change-Id: Icb16045bade65712dc2a8e18e960696077582f8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152040
Auto-Submit: Joshua Litt <joshualitt@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-06-22 21:28:31 +00:00
Regis Crelier
03af7314cc Roll benchmarks-internal to dff8b1878dcb8bb861937bd5bea07d03dcf08251
Change-Id: Ia64f88fca697864539ed490fa69a08b438e53713
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151984
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2020-06-22 21:24:37 +00:00
Robert Nystrom
7e756d6f86 Migrate language_2/type_variable to NNBD.
Change-Id: Iee96b1e254f17ee0b1b7b309cc807bf874a1491e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151982
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-06-22 21:20:26 +00:00
Jaime Wren
03483c1dab Update the isRunningOnBot() check in telemetry.dart for Travis, check for env.containsKey('BOT'), instead of env['BOT'] == true
This should fix bot failures such as https://travis-ci.org/github/flutter/devtools/builds/700932057

Change-Id: Ie65455d3f7de825f6691669174ec05f8bac6925e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152020
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
2020-06-22 20:49:46 +00:00
Martin Kustermann
142e15c2af [vm/compiler] Use unboxed index/length for GenericCheckBoundInstr on 64-bit architectures
flutter-release:

  * flutter_app_so_size: -0.47%
  * flutter_app_so_brotli_size: -0.48%
  * flutter_app_so_gzip_size: -0.57%

flutter-release-sizeopt:

  * flutter_app_so_size: -0.45%
  * flutter_app_so_brotli_size: -0.64%
  * flutter_app_so_gzip_size: -0.65%

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

Change-Id: If63b71e5d52f6ddb55fe05668a6480eb00a13303
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150300
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-06-22 19:55:36 +00:00
Jacob MacDonald
e18b937c1f opt meta into null safety
Change-Id: I004665a1b127d21f794ec3470dae0f7799ddfc06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151980
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2020-06-22 18:51:56 +00:00
Alexander Thomas
752278b550 [infra] Update checked-in SDKs to 2.9.0-18.0.dev
Change-Id: I218efac80364fa178779eb27d837d7a829301755
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152000
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-06-22 18:49:26 +00:00
Robert Nystrom
d872aea6a6 Migrate language_2/typedef to NNBD.
Change-Id: I415eb8b53e7808c9a09cbc725a422f432f084f66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151924
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-06-22 18:27:21 +00:00
Jake Macdonald
5f0a94bc12 Revert "Update fixnum to the migrated version and add it to the allowed experiments file"
This reverts commit cb1105af48.

Reason for revert: Broke flutter-engine-linux bot https://ci.chromium.org/p/dart/builders/ci.sandbox/flutter-engine-linux/11048?

Original change's description:
> Update fixnum to the migrated version and add it to the allowed experiments file
> 
> This package is used in benchmarking and we need a migrated version in order
> to run benchmarks with null safety enabled.
> 
> Change-Id: I916331a03006d6b5d3f0d0bb590012376e410c24
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150170
> Commit-Queue: Jake Macdonald <jakemac@google.com>
> Reviewed-by: Stephen Adams <sra@google.com>

TBR=sortie@google.com,jakemac@google.com,sra@google.com

Change-Id: I4536f395a877c245140d53f7a9463f2ed156d012
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151926
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-06-22 18:21:58 +00:00
John Ryan
3c85ade7f9 Migration tool UI improvements
- Update header text and buttons
- Add Roboto font
- Add Roboto Mono font
- Add Material icons font
- Update color scheme
- Move help button to header
- Change "Report a problem" button to "Send Feedback"
- Update button colors

Change-Id: Ia4d8b71ae8ec7a7c04ab8c238ffb0499becc9620
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151663
Commit-Queue: John Ryan <ryjohn@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2020-06-22 18:19:16 +00:00
Mike Fairhurst
ea7e6f29bf [nnbd_migration] Fix #42374: mark types as non-null for assert(is T)
Fixed: 42374
Change-Id: I009cba3d0a3d16e57aec24c62fbb3e0cbfa03c01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151925
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2020-06-22 18:08:36 +00:00
Kevin Moore
fcb6ba0d96 enable more lints for dartdev
Change-Id: Id3a0145076a671c830785b6344035726593e1492
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151940
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-06-22 17:06:16 +00:00
Jacob MacDonald
cb1105af48 Update fixnum to the migrated version and add it to the allowed experiments file
This package is used in benchmarking and we need a migrated version in order
to run benchmarks with null safety enabled.

Change-Id: I916331a03006d6b5d3f0d0bb590012376e410c24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150170
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-06-22 15:50:25 +00:00
Brian Wilkerson
ab73158758 Fix the windows bot and update MockSdk
Fixing the test that's causing the Windows bot to fail required updating
the MockSdk, which cause a lot of other changes. I would have done this
in two separate CLs if I'd known how big this was going to get, but I'm
hoping it isn't too big.

Change-Id: Idee56bab5e73a78ab7857e81177090493aa08b40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151874
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-22 14:34:25 +00:00
Martin Kustermann
0cc64fcc7d [vm/compiler] Ensure list index is integer in inliner
The inliner code is called from AOT/JIT call specializer on functions
where it knows the target. The callsite might be dynamic, in which case
the target function is a dyn:* forwarder (for calls which have one or
more non-implicit arguments).

The dyn:* forwarders inherit the recognized kind from their target. That
means the inliner has to take special care when trying to inline
functions: It can only rely on the static type safety for interface
calls, not for dynamic calls.

This CL fixes an existing bug where the call specializer knows the
target is a list and method recognizer builds custom graph for the list
indexing operator without ensuring that the index is actually an
integer.

The existing test will start failing on a dependent CL:

  tests/language_2/list/double_index_in_loop2_test.dart

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

Change-Id: Ic107fe736c1b6151562880919c39d1c650c119fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151849
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2020-06-22 13:25:35 +00:00
Johnni Winther
cc5df58bd2 [cfe] Refactor return type checking in preparation for nnbd spec change
Change-Id: Ie73726b59b23be4c5e35b207ec72732c8be7dada
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150982
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-06-22 11:33:35 +00:00
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