Commit graph

78964 commits

Author SHA1 Message Date
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
Ben Konyi d18d3d837f [ dart:developer ] Add serverWebSocketUri to ServiceProtocolInfo
Adds a convenience getter to ServiceProtocolInfo which transforms the VM
Service HTTP URI into a valid web socket URI that can be used to connect
to the VM service.

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

TEST=runtime/observatory/tests/service/developer_server_control_test.dart

Change-Id: Ib15de1f1a9b26ac5cf45f55a53014761a6fa7900
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194209
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-04-07 20:02:17 +00:00
Mayank Patke 8f832e2c6b [dart2js] Implement Cell lowering for uninitialized locals.
Change-Id: I7233e1484cc19e5f24d215bfd2c1e34c8f12961b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193588
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-04-07 19:43:07 +00:00
Mayank Patke c089922d2a Reland "[dart2js] Implement Cell abstraction for late lowering."
This is a reland of b647020318

Original change's description:
> [dart2js] Implement Cell abstraction for late lowering.
>
> Change-Id: Ib5fe8ed8e43513283a4e05f216e068241e8d63da
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193587
> Commit-Queue: Mayank Patke <fishythefish@google.com>
> Reviewed-by: Stephen Adams <sra@google.com>

Change-Id: I75501a556819463dab09842be11790b5f4ef1c7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193890
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-04-07 19:43:07 +00:00
Joshua Litt d0f55d0e42 [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>
2021-04-07 18:30:47 +00:00
Nicholas Shahan aaa66ed77e [ddc] Fix sourcemap on debugger statements
Add test file exercising the lack of distinct sourcemaps.

Change-Id: I35e099b2a91d5b6516adaa3cb034ab0b84262fed
Fixes: https://github.com/dart-lang/sdk/issues/45544
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194019
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-04-07 18:04:27 +00:00
Ben Konyi 81c87c5f2b [ VM ] Skip gen_snapshot_include_resolved_urls_test on simarm configs
Test requires knowledge of gen_snapshot location.

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

Fixed: 45605
Change-Id: Ia9fc018797d006d08efb8c17a8e0e980d20fb1df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194280
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-04-07 17:09:06 +00:00
Brian Wilkerson abd80dc17d Migrate some tests in server
Change-Id: Ic7b3c155529dc241f3cd3ec4cc79ee60fb4295b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194208
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-07 17:08:57 +00:00
Joshua Litt 617e05ee49 [dart2js] Update deferred loading test to golden pre and final fragments.
Change-Id: If452f1bf1e36c3dcf5947beff6ff07be01674217
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194202
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-04-07 16:48:17 +00:00
Jens Johansen 69f6378ed5 [CFE] Make unit_test_suites log better message when test starts to pass
In for instance https://dart-review.googlesource.com/c/sdk/+/193961/5
we had an instance of something good happening (a crashing-ish test
that started to pass) but where the author was told no (red bot) and
not given a path to make the bot happy (bad messaging).

Specifically tests failed and the best log one got was

```
To re-run this test, run:
    dart pkg/front_end/test/unit_test_suites.dart -p pkg/front_end/test/fasta/textual_outline/general/constants/js_semantics/issue45376
```

which isn't very helpful.

If running it locally a little more information is given via stdout,
but having to do that isn't great (and the little extra information
still wasn't great).

This CL updates the messaging to - hopefully - give a path to make the
bot happy. The messaging will now - directly from the log
on the bot - be

```
FAILED: pkg/front_end/test/fasta/textual_outline/general/constants/js_semantics/issue45376: Pass

To re-run this test, run:

   dart pkg/front_end/test/unit_test_suites.dart -p pkg/front_end/test/fasta/textual_outline/general/constants/js_semantics/issue45376

The test passed, but wasn't expected to. You should update the status file for this test.
There's a status entry looking something like

  general/constants/js_semantics/issue45376: FormatterCrash

which should be removed.

The status file is file:///[wherever]/sdk/pkg/front_end/testcases/textual_outline.status.
```

which
a) gives the extra information previously only available via stdout when
   running locally (the first line).
b) Gives an explanation as to why it failed
   ("The test passed, but wasn't expected to.").
c) A path to make the bot green ("You should update the status file for
   this test. [...] should be removed").

Hopefully this will make it easier to deal with in the future when
something good happens.

Change-Id: I838699abce580334c956d8b4753884fd600802ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194242
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-04-07 12:25:27 +00:00
Paul Berry 363da90385 Fix "why not promoted" functionality for compound indexed assignment.
Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: I40c6087a0db2c67106f9ce138b79a8a5769b37de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193834
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-04-07 11:39:12 +00:00
Paul Berry b13dea3e1e Reland "Flow analysis: track property get targets."
This is a reland of bc6cdf54fd

Original change's description:
> Flow analysis: track property get targets.
>
> These targets are needed for "why not promoted" error messages, and
> it's easier to have flow analysis keep track of them than to have the
> analyzer and CFE try to reconstruct them at the time of reporting the
> error.
>
> Bug: https://github.com/dart-lang/sdk/issues/44898
> Change-Id: Ia8ef4a7ce13cc30860e59b7369e6230d233e252d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193832
> Commit-Queue: Paul Berry <paulberry@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>

Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: Ib5e6a0eafb381f3a9c8770c6c1c3e55581e44b01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194105
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-04-07 11:39:12 +00:00
Lasse Reichstein Holst Nielsen 4b59bf54b2 Fix bug introduced in refactoring.
A constant was renamed to conform to the style guide, and that made it
have the same name as a local variable, and it was shadowed inside that function.

Rename another constant while we're here.

Fixes #45432.

Bug: http://dartbug.com/45432
Change-Id: Ie7e83bb77fea25a93a006bde78431ec35007a82a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192920
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-04-07 11:33:07 +00:00
Johnni Winther 5f57456528 [cfe] Support experimental flags and language versions in message_suite.dart
Change-Id: I150a93834783219c73f9dc4961eb83a48a7ea7e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194067
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-04-07 11:31:07 +00:00
Daco Harkes d27f166b75 [vm/ffi] Tree shaking of Struct sub classes
This CL enables tree shaking of `Struct` sub classes by simulating the
native behavior in Dart code.

We call the struct constructors in let expressions where FFI trampolines
are created which allocate these struct objects in native code. This way
TFA is instructed about the native behavior. The VM recognizes these
constructor calls as dead code and removes them.

For more info see go/dart-ffi-struct-treeshaking.

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

This CL fixes the types on the generated #fromTypedDataBase constructors.

Also, this CL also cleans up the struct naming:
* _addressOf   -> _typedDataBase
* _fromPointer -> _fromTypedDataBase
* #pointer     -> #typedDataBase

These cleanups are not split into a separate CL to prevent updating
the .expect files multiple times.

Finally, this CL enables running a single transformer test through:
`dart pkg/vm/test/transformations/type_flow/transformer_test.dart name`

TEST=pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart
TEST=tests/ffi(_2)/function_callbacks_structs_by_value_generated_test.dart
TEST=tests/ffi(_2)/function_structs_by_value_generated_test.dart

Change-Id: I418d0d73bc86b234dfe5b7b04ae726c33d2b8aeb
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/+/193661
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-04-07 11:02:27 +00:00
Alexander Thomas 4a6a92e8e5 [co19] Roll co19 to 812ab751c41fe8d706fd1e4aae62d2dea2887ac2
2021-04-07 irina.arkhipets@gmail.com Fixes #535: more nnbd tests for constant evaluation added.
2021-04-07 sgrekhov@unipro.ru Fixes #1068. Remove excessive - in a SharedOptions
2021-04-05 irina.arkhipets@gmail.com Fixes #535: more nnbd tests for constant evaluation added.
2021-04-05 irina.arkhipets@gmail.com Fixes #996: more tests added.
2021-04-05 irina.arkhipets@gmail.com Fixes #996: more tests added.
2021-04-05 irina.arkhipets@gmail.com Fixes #1067: added checks for old and new dart versions.
2021-04-05 irina.arkhipets@gmail.com Fixes #1066: added @dart=2.12 to the initial version of the test, new test which checks recent dart behavior added.
2021-04-05 irina.arkhipets@gmail.com Fixes #1057: Expected result doe the tests with mailformed types updated.
2021-04-02 sgrekhov@unipro.ru Fixes #1062. Remove unnecessary assignment
2021-04-01 irina.arkhipets@gmail.com Fixes #1057: Expected result doe the tests with mailformed types updated.
2021-04-01 sgrekhov@unipro.ru Expected error code is fixed for Windows
2021-04-01 sgrekhov@unipro.ru Fixes #1060. Expected error message position updated
2021-04-01 sgrekhov@unipro.ru Fixes #1059. Expected error message updated
2021-04-01 sgrekhov@unipro.ru Fixes #1024. Adjust expected results for web platforms
2021-04-01 sgrekhov@unipro.ru #993. More Array tests added
2021-03-31 58489007+franklinyow@users.noreply.github.com Update LICENSE
2021-03-31 sgrekhov@unipro.ru #993. Array tests added
2021-03-31 irina.arkhipets@gmail.com Issue #1053: Missing Issue tag added, test expectation updated.
2021-03-30 irina.arkhipets@gmail.com Fixes #1054: Updated expectations for mailformed raw type variables.
2021-03-30 irina.arkhipets@gmail.com Fixes #1050: Updated expectations for mailformed raw type variables.
2021-03-30 irina.arkhipets@gmail.com Fixes #1050: Got rid of mailformed row type variable usage in i-2-b- tests.
2021-03-29 sgrekhov@unipro.ru Fixes #1043. Remove static warning as an expected result
2021-03-29 irina.arkhipets@gmail.com Fixes #1049: Correct expectation adjusted
2021-03-29 sgrekhov@unipro.ru Fixes #1048. Move tests to correct folder and change the description
2021-03-29 irina.arkhipets@gmail.com Fixes #1046: Test adjusted to work with the generic metadata feature enabled.
2021-03-29 sgrekhov@unipro.ru Fixes #1047. Change expected result to not to fail on JavaScript configurations
2021-03-29 sgrekhov@unipro.ru Fixes #1044. Change expected result to not to fail on JavaScript configurations
2021-03-26 irina.arkhipets@gmail.com Fixes #1029: Missing Issue tag added to the test.
2021-03-26 sgrekhov@unipro.ru Fixes #1042. Add check that produces different results for triple and double shifts
2021-03-26 sgrekhov@unipro.ru Fixes #1042. Fix built-in_types_t11.dart to expect correct results
2021-03-25 sgrekhov@unipro.ru Fixes #1019. Don't use type aliases in legacy libraries
2021-03-25 irina.arkhipets@gmail.com Fixes #1039: Old-style aliases corrected.
2021-03-25 sgrekhov@unipro.ru Fixes #988. Expect static type warning in a right way
2021-03-24 irina.arkhipets@gmail.com Issues #1029: Static expectation corrected.
2021-03-24 irina.arkhipets@gmail.com Issues #1035: Issue tag for the bug 45443 added.
2021-03-24 irina.arkhipets@gmail.com Merge branch 'master' of https://github.com/dart-lang/co19
2021-03-24 sgrekhov@unipro.ru #1023. Change SplayTreeMap and SplayTreeSet tests according to the new behavior
2021-03-23 sgrekhov@unipro.ru #1021. Remove expecting errors on web configurations for some negative numbers
2021-03-23 sgrekhov@unipro.ru Fixes #1034. Missed experimental flag added
2021-03-23 sgrekhov@unipro.ru #1033. Perform runtime check on big values for non-JavaScript configurations only
2021-03-23 irina.arkhipets@gmail.com Issues #1029: co19/Language/Generics/Superbounded_types/typedef3_A01_t06/02 corrected and does not expect a compile error now.

Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I5fae01c7b48aba502da04638430f4f6de79ac745
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194241
Reviewed-by: William Hesse <whesse@google.com>
2021-04-07 10:51:56 +00:00
Franklin Yow 03101c0c2b Update LICENSE
Changes to comply to internal review

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

TEST=CL contains no code changes.

No-Try: true
GitOrigin-RevId: 65796784e5fdfddaa021b5c55ad435b1db419700
Change-Id: I085a948f16dc9a0de128ed0bd456ae69adf6c124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193888
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-04-07 10:28:38 +00:00
Johnni Winther 05c70ab355 [cfe] Update tests after language version change
In response to #45461

Change-Id: I5bc6234cf6c6ca620e322697aeb0a0c2a04d4ffd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194066
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-04-07 09:44:07 +00:00
Johnni Winther 9d80c4db57 [kernel,vm] Migrate vm transformations in package:kernel
TEST=existing

Change-Id: I86dfda23fa32ecb924fa6c202e7142cb8a258dc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192145
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-04-07 08:30:47 +00:00
Johnni Winther a26a140d88 [kernel,vm] Change async transformer to extend RemovingTransformer
Since some of the async transformers return `null`, signaling that they
remove nodes, they must extend the RemovingTransformer in order to
migrate to null safety where arbitrary node removal is not possible.

Change-Id: I8e20e2c61ce23699fe32c7450aacdd15467da5f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191923
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2021-04-07 08:30:47 +00:00
Konstantin Shcheglov 9db78a3b49 Migrate lib/src/services/kythe/kythe_visitors.dart
R=brianwilkerson@google.com

Change-Id: I9cf4eef071d72d2bf68043a0a7ab919cb65d3da9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194206
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-07 07:50:57 +00:00
Konstantin Shcheglov c5769f6604 Migrate lib/src/search/workspace_symbols.dart
R=brianwilkerson@google.com

Change-Id: I14e70698e91db02f3e49ced438668d0d903bf349
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194203
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-07 07:08:17 +00:00
Tess Strickland bc924667f4 [vm/compiler] Add artificial nodes for dropped parent functions.
Fixes https://github.com/dart-lang/sdk/issues/45483

TEST=pkg/vm_snapshot_analysis/test/instruction_sizes_test

Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-mac-release-try,pkg-win-release-try
Change-Id: I9e347bd38ec339b22d2ecefcce1b276d8ce3e3e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193303
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-04-07 04:48:46 +00:00
Konstantin Shcheglov 625bfe5cae Migrate package:telemetry
Change-Id: I1d06861b5838a12b807d47cfbb53b0537a68d52f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194205
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-07 03:40:29 +00:00
Leaf Petersen 0fa7878d56 Second batch of private name tests.
Additional tests for private classes exported via a public typedef.

Change-Id: I443b1e32efa6140f319e9acc8c498bb9f5e3d27d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193828
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2021-04-07 01:09:09 +00:00
Konstantin Shcheglov d8da40ec52 Migrate lib/src/protocol_server.dart and related.
Change-Id: Ibb1e5a53aa8ad67fa43b315880c491093b051e20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194201
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-07 00:26:59 +00:00
Alexander Markov cbada0ac1c [vm] Fix UB in materialization of Float32List
This is the follow-up to https://dart-review.googlesource.com/c/sdk/+/193831.
This change fixes undefined behavior corresponding to read from
the member of the union that wasn't most recently written.

TEST=ci

Change-Id: I5a74a75f8dca3526068880bfd3a848b611d6cbf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193887
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-04-07 00:12:09 +00:00
Ben Konyi 1cbf7761dd [ CLI ] Add test for dart format --set-exit-if-changed
Fixes https://github.com/dart-lang/sdk/issues/44582

Change-Id: I78033a4182a3e587730743e5dad2a1e7358a3fc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194119
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-04-06 23:46:09 +00:00
Brian Wilkerson e066070f14 Migrate a couple of individual libraries
Change-Id: Ibb26391f59fa576a6a9a1cd29a70edbe8e4d3f15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194200
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-06 23:45:59 +00:00
Brian Wilkerson cf8761d37a The subset of data-driven fixes that can be committed at this point
Change-Id: I76e115efbbef1649d53d01ffdff3473446330f0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194117
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-06 23:36:43 +00:00
Konstantin Shcheglov 43b5d134b3 Migrate lib/src/channel/
R=brianwilkerson@google.com

Change-Id: I2748f92589ef9501325535d79188fdbb103130f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194118
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-06 23:16:43 +00:00
Konstantin Shcheglov ad498f34dc Migrate a few test/tool/completion_metrics/ libraries.
R=brianwilkerson@google.com

Change-Id: I8221b0c2f97ada211b101d31420e60062f30887d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194115
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-06 22:58:53 +00:00
Konstantin Shcheglov 1469f984fc Migrate lib/src/services/search/
Change-Id: I52b2fb72952c0abacb897607d6969bedbfd027b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194114
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-06 22:58:25 +00:00
Ben Konyi 2a62fc49a3 [ VM / gen_snapshot ] Include resolved script URLs in non-PRODUCT AOT snapshots
Required for https://github.com/dart-lang/sdk/issues/37553

TEST=runtime/tests/vm/dart/gen_snapshot_include_resolved_urls_test.dart

Change-Id: I0a2f6293566e5e5436df92d21e6bd38bb58c7654
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193520
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-04-06 22:30:48 +00:00
Konstantin Shcheglov 321a0e0246 Migrate lib/src/services/pub/
R=brianwilkerson@google.com

Change-Id: I19cd5bed18c3ae4d9fe163fd3b962550bf1344a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194111
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-06 22:24:42 +00:00
Mark Zhou 8b28475baa [dartdevc] Extending e2e eval tests to multiple module systems.
* Now tests both DDC + AMD module systems
* Porting more tests + purging them from the regular test
* Fixing a bug related to string-typed JS scope objects

Change-Id: I703d3760971ef8c14ef4157a71b364d8d3c22aaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194080
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2021-04-06 22:22:43 +00:00
Ben Konyi 2a2d83e9e9 [ VM / Service ] Add support for enabling/disabling breakpoints
This change adds a `setBreakpointState` RPC which allows for breakpoints
to be enabled or disabled without needing to remove and recreate
breakpoints.

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

TEST=set_breakpoint_state_test.dart

Change-Id: I1a04e6028d4e4560fdb8d3d26420c9a05da06b4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193896
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-06 22:16:06 +00:00
Keerti Parthasarathy 1668734697 Add a method to resolve a library
Change-Id: I0eba5b60bb46fa7dfbceb2b26e0d1d5ec3ae3ebf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194015
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2021-04-06 21:27:43 +00:00
Alexander Markov 707cd928af [vm/ffi] Fix representation of value for 8-bit and 16-bit FFI loads and stores
Previously, FFI store could use kUnboxedUint32 for value being stored
via 8-bit or 16-bit StoreIndexed instruction. However, such
StoreIndexed instructions require kUnboxedIntPtr representation.
Due to the mismatch in the representations, SelectRepresentations
pass inserts a speculative (deoptimizing) IntConverter instruction,
which cases crash in AOT mode. Similar problem exists for FFI loads.

This change corrects representation when unboxing value in the body
of FFI store intrinsics and when boxing the value in FFI loads,
so representation of the value matches representation required by
StoreIndexed / returned by LoadIndexed.

TEST=ffi/regress_flutter79441_test
Fixes https://github.com/flutter/flutter/issues/79441

Change-Id: Ida144e8d2e7a69d6767c9d4447bb20e79d847d48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193824
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-04-06 21:11:23 +00:00
Konstantin Shcheglov 1bf4b0ce2f Migrate benchmark/integration/
R=brianwilkerson@google.com

Change-Id: I0dccc13831ec5aed82d33ee52ffeae1ad38c5b98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194109
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-06 21:10:33 +00:00
Kallen Tu b5d4d26abe [cfe] Const factories when const functions enabled.
Change-Id: Ifd24678c0ac191c5cc6f1d60443ab96f56cbba7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192400
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2021-04-06 19:46:32 +00:00
Alexander Markov a38a2dd343 [vm/aot] Fix retaining of targets of FFI callbacks in precompiler
Account for the fact that a Function could be only reachable via
FfiTrampolineData in the FFI trampoline function.

TEST=ffi_2/function_callbacks_test
Fixes https://github.com/dart-lang/sdk/issues/45510

Change-Id: I2db81c7730ae48d1f1355aa236339e54562ee6c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193893
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-04-06 18:33:17 +00:00
Mark Zhou febf16a3be [dartdevc] Adding expression compiler e2e test sanity checks.
Adding the dartdevc_test target to the pkg-linux-debug bot config since some of its tests require that the sound SDK be built. Also failing more gracefully if the expected dill is not found.

Change-Id: I5d2004a3a13d9f73dcb51afb3c68c0b7c18e614e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194108
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2021-04-06 18:25:12 +00:00
Devon Carew c679047530 Upgrade the 'web-simple' project template to null safety.
Change-Id: I7b90a81a37085d613f6927529ef05e2a3915a32e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194106
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-04-06 16:40:17 +00:00
Konstantin Shcheglov b903d73c9b Migrate allowed status pages.
Change-Id: If81a0e66a22f9219535420041b6cd7efe1aa3341
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194103
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-06 16:17:17 +00:00