Commit graph

79008 commits

Author SHA1 Message Date
Robert Nystrom c8b3fb1e71 Roll dart_style to the new 2.0.1.
The reverts the change to flatted nested conditional expressions since
audience reaction to that was pretty negative.

See: https://github.com/dart-lang/dart_style/pull/1019
Change-Id: Ie9e4460f75c5b7e99e5a6d60e9c38b50ba0bc44a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194883
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-04-10 00:37:53 +00:00
asiva 6eaa34bad2 [VM/Runtime] - Fix product build warning
TEST=regular CQ tests

Change-Id: I2fe553de81b853997ae16654fe2a745c7f1d2950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194820
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-10 00:03:23 +00:00
Brian Wilkerson 08c5b9f8ff Migrate more completion support
Change-Id: Ia55132ef8f4cd6e80dfc4fe16689e8b4e50cf387
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194821
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-04-09 22:40:03 +00:00
Nicholas Shahan 4e25e499c8 [ddc] Add library URIs to cast failure messages
When the two types have the same name but are from different libraries
showing the library URI will help users understand the failure better.

Change-Id: I5ab4412e676272111d41f688ef2d1cc83afbe627
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194116
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-04-09 22:24:43 +00:00
Kallen Tu 0b175ed534 [cfe] Const constructors enabled with const functions.
Change-Id: Ic0597bf7ec69811ec822539ef5df1e24ef1b9884
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194560
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2021-04-09 21:10:53 +00:00
Mayank Patke c745c6d26a Revert "[dart2js] Implement Cell lowering for uninitialized static fields."
This reverts commit da42b0d323.

Reason for revert: g3 failures

Original change's description:
> [dart2js] Implement Cell lowering for uninitialized static fields.
>
> Change-Id: If0cd7c95a8e52de19893892acae662619075d87b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193835
> Commit-Queue: Mayank Patke <fishythefish@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

TBR=johnniwinther@google.com,sra@google.com,fishythefish@google.com

Change-Id: Ic90ebf140b2105f06afa43ae7d332c01887cd8d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194900
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2021-04-09 20:42:45 +00:00
Mayank Patke da42b0d323 [dart2js] Implement Cell lowering for uninitialized static fields.
Change-Id: If0cd7c95a8e52de19893892acae662619075d87b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193835
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-04-09 19:46:23 +00:00
Srujan Gaddam bd58cea90b [dart:html] Fix getContext3d nullability
Closes https://github.com/dart-lang/sdk/issues/45572

getContext3d should return a nullable value since getContext can
return a nullable.

Change-Id: Iaefff781976656db3765d526ec95305f2acfeecf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194503
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2021-04-09 19:03:43 +00:00
Konstantin Shcheglov 8fb98b25c1 Migrate several lib/src/services/correction/dart/
Change-Id: I0db19c94d26c7c604d71663e2f2c944286898c0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194546
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-09 17:15:45 +00:00
Daco Harkes 189c36b82a [vm] Native effects
Adds a way to express native effects in Dart expressions in kernel.

This CL adds a `void _nativeEffect(Object)` to `dart:internal`.
The semantics of `_nativeEffect` are to not execute its arguments and
return `null`.

This CL uses this `_nativeEffect` to make sure that we never execute
the struct constructor invocations used to simulate the native behavior
of FFI trampolines.

Closes: https://github.com/dart-lang/sdk/issues/45607

TEST=tests/ffi(_2)/native_effect_test.dart

Change-Id: Ie06de145e49f8b1cae9e148c2d5d97d5cd8e6878
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64-try,vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,dart-sdk-linux-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194421
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-04-09 16:45:13 +00:00
Aske Simon Christensen ea50eeb4be [vm/aot] Set type context for fields in signature shaker.
Fixes https://github.com/dart-lang/sdk/issues/45642

TEST=Regression test added.
Change-Id: Ib14b27674810ac22aad21c19647e68e7ad32ceaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194762
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-04-09 16:14:23 +00:00
Danny Tuppeny ea9c6484f1 [analyzer] Fix path format in test for windows
Change-Id: I20ddb29e18303ad38a29a98c8ace00ced858b120
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194763
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-09 14:11:28 +00:00
Alexander Thomas 37700c4314 [co19] Roll co19_2 to f7f583366396cb1457e58c9bfb6d6e53dc21d741
2021-03-29 sgrekhov@unipro.ru Fixes 1052. Typos in tests fixed
2021-03-29 sgrekhov@unipro.ru Fixes 1051. Fix invalid use of null in different expressions

Change-Id: Ibdf603c1ff556a328bdeb7e0af2a323bbcb6bf07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194720
Reviewed-by: William Hesse <whesse@google.com>
2021-04-09 11:49:32 +00:00
Martin Kustermann 3f7614f56f [gardening] Skip service tests that require expression evaluation in AppJIT
In AppJIT mode we run from a snapshot and won't have an incremental
compiler available. That also means expression evaluation is not
supported.

The specific test that was failing was

  service_2/evaluate_activation_in_method_class_test/service

though this CL skips all evaluation tests.

The CL also align the service and service_2 status files more.

TEST=Only updates status file to skips tests.

Change-Id: I8dbb3aeeb686370d898c59da3729f5e0c52df411
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194685
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-04-09 09:58:43 +00:00
Konstantin Shcheglov 424e670576 Reland "Mark AstTestFactory as internal."
This is a reland of 553bfea531

Original change's description:
> Mark AstTestFactory as internal.
>
> I want to continue disallowing users to create AST nodes.
>
> Change-Id: I6597fcf4fbb767cde35320e3b8777873faf5c5bd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194600
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

Change-Id: I097fc5f665880666829eeb982f7fa3b450bb203e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194681
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2021-04-09 09:46:38 +00:00
Martin Kustermann 9722d3bb1e [gardening] Mark ffi test as slow in debug mode
TEST=Fixes flaky (turned into consistent) timeout of ffi test

Change-Id: Ic2444c797621e1f09153a68282c075fb874c2921
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194683
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-04-09 09:39:51 +00:00
Johnni Winther 282a3ab70b [cfe] Handle ParserRecovery in beginTypeVariable
Closes #45329

Change-Id: I7e153e41891332bd8ea85849b993066de342eed5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194682
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-04-09 09:38:31 +00:00
Ivan Inozemtsev 9ce236a6cf Revert "Mark AstTestFactory as internal."
This reverts commit 553bfea531.

Reason for revert: b/184903321

Original change's description:
> Mark AstTestFactory as internal.
>
> I want to continue disallowing users to create AST nodes.
>
> Change-Id: I6597fcf4fbb767cde35320e3b8777873faf5c5bd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194600
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

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

Change-Id: I6c9e0f5d7863ac7481612d95a7fd414dec743b76
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194680
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
2021-04-09 06:01:27 +00:00
Karl Klose c17da0065c [infra] Firestore: Resolve whole paths to avoid encoding of ':'
Change-Id: Icdc53787210a953c94ef9cd6fec69fe79b06c22e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194401
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2021-04-09 04:43:31 +00:00
Brian Wilkerson e461f937db Migrate most of the completion contributors
Change-Id: I2802422c59801134af342eed1d43367b8175b099
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194543
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-09 04:14:21 +00:00
Paul Berry 1f43993294 Flow analysis tests: remove _TryStatement._bodyNode.
Now that we store the body of a try statement as a separate Statement
object, we can use it directly; it's not necessary to create a
synthetic node for it.  This is more similar to what the analyzer and
CFE do.

Change-Id: I7c9a62aa917e966f0dd176f90b72865a38addd65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194545
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-04-09 03:42:01 +00:00
Paul Berry ad4faa0e86 Flow analysis: in tests, stop storing type of this. property gets.
This makes the flow analysis tests more similar to the anaylzer and
CFE implementations, which look up the type of a `this.` property get
at the time it is analyzed, rather than storing it in the AST node.

Change-Id: Idee2a9c3ba0acbd2752db511c1aabfdff075b363
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194544
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-04-09 03:42:01 +00:00
Konstantin Shcheglov 553bfea531 Mark AstTestFactory as internal.
I want to continue disallowing users to create AST nodes.

Change-Id: I6597fcf4fbb767cde35320e3b8777873faf5c5bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194600
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-09 02:59:11 +00:00
Konstantin Shcheglov 579ae24fcd Prepare to publish analyzer_plugin 0.6.0
Change-Id: Ibffb027251f1a6033e80f09dc1cb130d34262c70
Bug: https://github.com/dart-lang/sdk/issues/45236#issuecomment-815514046
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194542
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-09 00:47:00 +00:00
Ryan Macnak 1d369b5000 [vm, compiler] Support unboxed parameters for integer intrinsics.
TEST=ci
Change-Id: I7f29471043c049ef1acf7cd4bcb0890db6d33aa4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192728
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-04-09 00:30:10 +00:00
Paul Berry 0d64396707 Flow analysis: Rework visit methods in flow analysis tests.
Two changes:

- Eliminate the `_Visitable` class, which was no longer used.

- Stop passing flow analysis as an argument to the _visit methods;
  instead access it through the Harness class.  This paves the way for
  future changes that will generalize this code for testing things
  other than flow analysis.

Change-Id: I94e9208e9eec6f16c03160efa1f676e57d47a59f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194541
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-04-09 00:23:40 +00:00
Konstantin Shcheglov bbbe5bfc87 Migrate several lib/src/services/correction/dart/
Change-Id: I8c50c6e7664a7bd8ee7b0d881d9adeaf9c544f61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-08 21:17:10 +00:00
Paul Berry 9674ab8921 Flow analysis: expose typeOperations getter.
There's no harm in making the TypeOperations object available to
clients, and it will make it easier in the future to create other
shared analysis based on flow analysis.

Change-Id: Id6b603ab2a7baa64d423c87bf031ff6a12874840
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194501
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-04-08 20:17:20 +00:00
Sam Rawlins bc5d362959 analysis_server: Standardize on package:path/path.dart import prefix.
One file used 'pkg_path' which really threw me; I'd never seen it before. Two
more used 'pathos'. All other files in the package use 'as path', except a few
spots which do not use a prefix.

Change-Id: I94577c1783162c52c7f8dc3c6bf02e9a0b9159df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-04-08 20:02:50 +00:00
Brian Wilkerson beea8076cd Migrate more of server
Change-Id: I6342016847257ae95314e97b2f31186c43f10e6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194481
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-08 19:05:30 +00:00
Sam Rawlins a75fdd4d98 Remove unnecessary imports from analyzer_plugin, analysis_server, analyzer_cli, test_runner
Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: I52753bf0ac8112e0a2e6864ca2bd3289e63d5cf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-04-08 19:02:31 +00:00
Danny Tuppeny e8d53cff92 [analyzer] Improve handling of loose files and context rebuilds
Change-Id: Ifd047a29953503a70216ce29b3fe4cdbfc4132df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192926
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-08 17:49:35 +00:00
Joshua Litt 28aa79ddd7 Reland "[dart2js] Add support for bundling fragments."
This is a reland of d0f55d0e42

Original change's description:
> [dart2js] Add support for bundling fragments.
>
> Also changes the default to bundling rather than interleaving fragments.
>
> Change-Id: Id79d03a8a8b5be7465b8535f6c9c47dfad120c9c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191484
> Commit-Queue: Joshua Litt <joshualitt@google.com>
> Reviewed-by: Stephen Adams <sra@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

Change-Id: I0347ddb6dd93eb57f0abc259fc477ec3a9d7231b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194323
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-04-08 17:46:50 +00:00
Daco Harkes 9d5846b86e [vm/ffi] Support Unions backend
This Splits the NativeCompoundType into NativeStructType and
NativeUnionType.

The calling conventions themselves did not have to be updated at all,
they rely on the 'queries' on NativeTypes.

Some interesting corner cases in the native calling conventions are:
1. Arm64 and arm hardfp still regard unions as homogeneous floats, even
   if the union members are different sizes.
2. Unions can be larger than their members if their largest member has
   a smaller alignment than a smaller member.
3. When a specific range in a struct contains floating points in one
   member, but integers in another, the integers take precedence.

Bug: https://github.com/dart-lang/sdk/issues/38491

tools/build.py run_ffi_unit_tests && tools/test.py ffi_unit
TEST=runtime/vm/compiler/ffi/native_calling_convention_test.cc
TEST=runtime/vm/compiler/ffi/native_type_test.cc
These tests are exercised on vm-precomp-ffi-qemu-linux-release-arm-try.

Change-Id: Ib97769457d1ad0fce47601e9e4a3008bd837167f
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194422
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-04-08 17:41:30 +00:00
Stephen Adams 2f327a61e3 Redo "[dart2js] Avoid premature interceptor optimizations"
This reverts commit fc349bdbb5.

Change-Id: Idb991651abdd8a60a1a2ef838f7396ad6c892223
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194207
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-04-08 17:01:10 +00:00
Lasse R.H. Nielsen 6af4987dc6 Change VM DateTime to-local-time computation to not fail for <1h changes.
The DateTime conversion to local time amounts to solving an
equation, finding an offset where the current local time is that offset.

The current approach doesn't actually do that, it just tries to simulate
the JS approach, with a tweak to avoid DST change issues, but that tweak
assumes that all time zone adjustments are one hour changes.

This CL should work correctly for time zone changes of up to one hour,
but might still fail for changes of more than one hour.
It works by trying more offsets, which obviously has a performance cost,
which depends on how efficient the operation system is at providing
the local time zone for a specific milliseconds-since-epoch.

Change-Id: I80dc6e62e0639d9966d3c5a06430787d8acc4ff1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182041
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-04-08 16:51:00 +00:00
Konstantin Shcheglov 3131d5a6c5 Migrate CorrectionProducer and two producers.
I decided against landing https://dart-review.googlesource.com/c/sdk/+/194321
It gets too bulky.

So, we will migrate producers, and only then tests, and will know
our null safety mistakes.

Change-Id: I7b358549fc33c9d9a02aef80f30a676c7875f85a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194326
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-08 16:17:50 +00:00
Kallen Tu 6f90c5531e [cfe] Closures and environment changes for const functions.
Change-Id: If844a28192c1eef4dcbb62075ae07e86297f2c92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193920
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2021-04-08 15:09:39 +00:00
Franklin Yow 40441c9685 Update LICENSE
Changes to comply with internal review

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

GitOrigin-RevId: 65ec4580e5b01658ddcb86b6a4c9301a482236ab
Change-Id: Icf2b758f8df81240758b9a0aaf11c3e6756fa574
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194340
Reviewed-by: Alexander Thomas <athom@google.com>
2021-04-08 07:57:10 +00:00
Konstantin Shcheglov d6824468f9 Prepare to publish analyzer 1.4.0 and _fe_analyzer_shared 20.0.0.
Change-Id: Ifdf4371221776da3ede6c28f2938eb51d19f61da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193898
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-08 03:27:54 +00:00
Konstantin Shcheglov 79c321eed4 Add 'sdkPath' to AnalysisContextCollection constructor..
Bug: https://github.com/pq/surveyor/issues/29
Change-Id: Ic6cc28e8e33be50b0cab35ad0f2e236bae04de0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194324
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-04-08 02:07:04 +00:00
Brian Wilkerson b0a358c10b Migrate two more tools in server
Change-Id: I5cd174caa77653cc39a37a8c0464f0f1e93c4a90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-08 01:03:34 +00:00
Ryan Macnak 37616dae79 [vm] Account for the conditional nature of WeakSerializtionReference and WeakProperty references in clustered snapshots.
Fixes missing ref for WeakSerializationReference::target; fixes incorrect treatment of WeakProperties as strong references. Note isolate message snapshots still incorrectly treat WeakProperties as strong references.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/45609
Change-Id: I6dba93bc6f2e94886efde021fdf5c90a0dcb09b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194300
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-04-08 00:54:08 +00:00
Joshua Litt 05a0e79a76 Revert "[dart2js] Add support for bundling fragments."
This reverts commit d0f55d0e42.

Reason for revert: Investigating 5% spike in memory usage

Original change's description:
> [dart2js] Add support for bundling fragments.
>
> Also changes the default to bundling rather than interleaving fragments.
>
> Change-Id: Id79d03a8a8b5be7465b8535f6c9c47dfad120c9c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191484
> Commit-Queue: Joshua Litt <joshualitt@google.com>
> Reviewed-by: Stephen Adams <sra@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

TBR=sra@google.com,sigmund@google.com,joshualitt@google.com

Change-Id: I3d61f14981d9314163974c6a38d5a5e0d76b5a98
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194322
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-04-07 23:53:20 +00:00
Robert Nystrom 9b8584b3ad Don't truncate command output in the test runner.
I'm not sure if the output truncation was ever practically useful. But
it causes problems now that we have a CFE test that wants to validate
that the CFE can produce many errors in one go.

I thought about allowing a test to extend the truncation size, but I
figured the simplest fix was to just not truncate at all and make the
test runner a little simpler. Also did a little clean up on this
ancient code while I was at it.

Fix #44493.

Change-Id: Ie678c80e7114e0fb7f68931335075e3d319fb53a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178940
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-04-07 23:42:38 +00:00
Ryan Macnak fb181e87b9 [vm, service] Fill in more field names in retaining paths.
TEST=manual, runtime/observatory/tests/ui/inspector.dart
Bug: https://github.com/flutter/flutter/issues/79605#issuecomment-814342601
Change-Id: I1532dff15620835805cd2a8e9ddab693864f6eb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194112
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-04-07 23:05:58 +00:00
Kallen Tu 5bcaf448af [cfe] Try-catch, try-finally, throw for const functions.
Change-Id: Id25f78bba9c65e702bcd5051c776782a146e0605
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193780
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2021-04-07 21:40:38 +00:00
Konstantin Shcheglov 2af2f3559d Migrate lib/src/services/correction/util.dart
R=brianwilkerson@google.com

Change-Id: Ie85217c57e26fc2430e916c8b7829d64ffddc4db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194210
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-07 20:52:03 +00:00
Brian Wilkerson a0f7ff92a1 Migrate the first round of completion support
Change-Id: I64ca0b7b6d3040b6e37d328ed62e75059c48ef07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194212
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-07 20:44:58 +00:00
Alexander Markov f4a9cad199 [vm/compiler] Cleanup code duplication around Representation of array elements in LoadIndexed and StoreIndexed
This change removes code duplication between
LoadIndexedInstr::representation() and
StoreIndexedInstr::RequiredInputRepresentation(), multiplied by 4
target architectures.

This change also removes duplicated logic from FFI load and store
intrinsics.

TEST=ci

Change-Id: I9f10cc8c70288ecaea33a337a880c181ecbfcd6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194281
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-04-07 20:43:58 +00:00