Commit graph

79288 commits

Author SHA1 Message Date
George Wright f0a8b63402 Revert "Make throwing Zone.uncaughtError handlers propagate the error to their parent zone."
This reverts commit 88a351f3d2.

This broke the Dart SDK -> Flutter Engine roller. Flutter issue at https://github.com/flutter/flutter/issues/80969

Change-Id: Idaf255a730c7b6054e6cd929b6770dbe66860151
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196561
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2021-04-22 22:20:16 +00:00
Kallen Tu 5c36a30de2 [cfe] Instance field get for const functions.
Change-Id: Ie090cbf47d1e5be82e59a3f782dea8b4c1c75c91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196380
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2021-04-22 22:14:01 +00:00
Alexander Markov f49a95fec9 [vm] Reduce Class object size in JIT mode
The following fields in Class objects

  target_instance_size_in_words_
  target_type_arguments_field_offset_in_words_
  target_next_field_offset_in_words_

are only useful when cross-compiling.

This change removes these fields if DART_PRECOMPILER is not defined.

TEST=ci
Change-Id: I45e6e60ad6d0a738e2ac3afd45328209167393ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196222
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-04-22 22:10:06 +00:00
Alexander Aprelev ab9ccf1e4e [vm] Use memory_order type argument provided for Array At/SetAt.
Issue https://github.com/dart-lang/sdk/issues/45170

TEST=ci

Change-Id: I8583a0df77914c4dc69a5b4565124a21a46421cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196562
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-04-22 21:53:56 +00:00
Vyacheslav Egorov f72a31695c [vm_snapshot_analysis] Bump version number
TBR=alexmarkov@google.com
TEST=ci

Change-Id: Id7a6afc3df6d971372712707896d9976ecb038cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196493
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2021-04-22 20:55:46 +00:00
pq 17644eea39 linter 1.4.0
Mitigating PRs:

https://dart-review.googlesource.com/c/sdk/+/196223
https://dart-review.googlesource.com/c/sdk/+/196180

https://github.com/flutter/flutter/pull/80817
https://github.com/flutter/flutter/pull/80901





Change-Id: Ib916d541076e24b9e8db1d6120dbc043d9e40b87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196026
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-22 20:41:26 +00:00
Alexander Markov 9af507e0f5 [vm] Auto-generate InstanceSize definitions for array objects in runtime_api
Previously, compiler::target::Foo::InstanceSize(intptr_t length)
definitions were hand-written and compiler::target::Foo::InstanceSize()
were often defined using the size of UntaggedFoo for array-like objects.
This results in an unnecessary code duplication and discrepancy
between Foo::InstanceSize() which returns 0 and
compiler::target::Foo::InstanceSize() which returns size of the header.

This change adds ARRAY_SIZEOF variant to runtime_offsets_list.h
and switches array-like objects to auto-generated InstanceSize methods.

Also, this change strengthens assertions around host and target
values of InstanceSize() and NextFieldOffset() being the same
unless DART_PRECOMPILER is defined (which may do cross-compilation).

Stronger assertions flushed out a few discrepancies between
runtime_api.h and object.h, which are also fixed in this change.

TEST=ci

Change-Id: I9f67c6a71b9300af5e656fdc70f6a3e341c1d029
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196345
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-04-22 18:21:16 +00:00
Joshua Litt bf02e85330 [dart2js] Use DeferredStatement in existing Finalizers.
Change-Id: Iadc4b2d6f1fa0bebb57ac25012571078b9bfcdb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195189
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-04-22 17:37:46 +00:00
Konstantin Shcheglov ae39dee6fa Fix for invoking a generic method of a generic class from legacy code.
Bug: https://b.corp.google.com/issues/185971662
Change-Id: I71f4f251770e6e371bd6035911ca7c9562610540
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196342
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-22 17:22:56 +00:00
Tess Strickland 6616bb4696 [vm] Mark canonical-ness in written cluster.
Instead of depending on all canonical clusters being written first,
followed by all non-canonical clusters, mark whether a cluster is
canonical or not in its written form. This allows future changes to
interleave canonical and non-canonical clusters as needed.

TEST=Existing tests, as this is purely a refactoring.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-nnbd-linux-debug-x64-try
Change-Id: I0ab835c262e061ffd3dd93be0c8f5358c9b51fc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195994
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-04-22 15:27:46 +00:00
Tess Strickland 927c59104f [vm] Re-tighten requirements that the node type be set before writing.
Fixes the case where the Image name and type was not written
to the v8 snapshot profile in non-precompiled mode.

Adds core-jit snapshot tests to the v8 snapshot profile writer test.

In core-jit and app-aot-elf modes, verify that all bytes in the
snapshot sections are accounted for in the profile.

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

TEST=vm/dart{,_2}/v8_snapshot_profile_writer_test

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try
Change-Id: I88be309cdea6293d768e2fa458492387d70fde22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196323
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-04-22 15:27:38 +00:00
Sergey G. Grekhov 391d5c409b [co19] Status files cleanup
Change-Id: Ia22499d5681213017b09eac818f4f57e1fba2885
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196485
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-04-22 13:40:48 +00:00
Sergey G. Grekhov 2988d39d59 [co19] Enables slow tests on dartdevk and dartdevc
Change-Id: Id44d372ed90c54523c9dde4659b4776923dfcadf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196488
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-04-22 13:40:46 +00:00
Paul Berry e3443b9f53 Flow analysis: implement "why not promoted" for binary/unary operator target.
Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: If464a54bdb63fc661db312df5dc10f108049286a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196240
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-04-22 12:21:46 +00:00
Irina Arkhipets 6645753681 [co19] Tests skipped for analyzer
Change-Id: I8c54082c937b28a74500740a0576f4b29c8989f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196325
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-04-22 10:37:36 +00:00
Emmanuel Pellereau 335f55a601 Revert "Optimize js_util setProperty calls for non-function value types."
This reverts commit 853597a978.

Reason for revert: Breaks google3 (b/186088197)

Original change's description:
> Optimize js_util setProperty calls for non-function value types.
>
> No change in the generated JavaScript for dart2js base on a sample
> foo.dart file and tests/lib/js/js_util/properties_test.dart
>
> Bug: #44533
> Change-Id: Ib6866fa7fca1f13b03c75dd4f1eac904b18811e3
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193838
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Riley Porter <rileyporter@google.com>

TBR=sigmund@google.com,srujzs@google.com,rileyporter@google.com

Change-Id: I3f08d29e2d6a1a7846b8d67fadc314ad947f54cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: #44533
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196484
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2021-04-22 09:27:29 +00:00
Alexander Thomas 9ddfcd745f [infra] Upgrade jsshell to 88.0
* Use cipd for jsshell.
* Add script to update jsshell.
* Add new CIPD namespace, with access rights for some web team members.
* Add a copy of the new package to the old location (b/186078239).

Change-Id: I0169d077af6b0d5119fe8545272ca1df1596558f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196324
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-04-22 08:37:56 +00:00
Karl Klose 86e1eb9101 [infra] Trigger builds to test builder configuration change
TBR=athom@google.com

Change-Id: I3aee004b4b8f18d0e7b03a9f24c82865882f697a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196481
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2021-04-22 06:47:06 +00:00
Karl Klose f38d3deabe [infra] Trigger builds to test recipe changes
TBR=athom@google.com

Change-Id: I53265517c02df3762cb2232e6a9ce2cc2e8c4f84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196480
Reviewed-by: Karl Klose <karlklose@google.com>
2021-04-22 05:06:18 +00:00
Stephen Adams b529afd10a [dart2js] rename setRuntimeTypeInfo to _setArrayType
For a long time now this is used only to put types on JSArray.

Change-Id: I31f15d313d7e131eecac76697a8938c197f83e7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195940
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-04-22 02:06:31 +00:00
Jia Hao Goh 2d632d0eac Ignore return statements for @doNotStore in tests
Bug: #45594
Change-Id: I83574cc456d6259c0627d902c4bbfb2310055caf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196243
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-04-22 00:22:51 +00:00
Ryan Macnak 571908fbec [vm, compiler] Make UnboxedConstant more like Constant.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/45555
Change-Id: Ib396b0281d4e138cc252baacaac18e42057d7bb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194502
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-04-21 22:45:31 +00:00
Paul Berry 1c86b2f5f6 Migration: tolerate relative imports into lib.
Prior to this fix, if the user's package had a relative import from
outside `lib` to inside `lib` (e.g. from `test` to `lib`), the
migration tool would regard the imported file as being reached via a
`file:` URI.  This caused it to get confused and complain that the
user had a dependency on unmigrated code (this happened because the
check for dependency on unmigrated code excluded the user's files via
their canonical URIs, and files inside `lib` use `package:` for their
canonical URIs).

To fix the problem, we modify the check for dependency on unmigrated
code so that it excludes the user's files via their path rather than
their URI.

Note that relative imports into the `lib` directory are discouraged by the style guide*, but it still seems worth fixing this bug since they do crop up in the wild.

*https://dart.dev/guides/language/effective-dart/usage#dont-allow-an-import-path-to-reach-into-or-out-of-lib

Fixes #45780.

Bug: https://github.com/dart-lang/sdk/issues/45780
Change-Id: Iff41ca0059d78bbb812dd6f421be6458e7049895
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196344
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-04-21 22:04:30 +00:00
Brian Wilkerson f32f6afbfd Fix a couple of bugs in the metrics tool
Change-Id: Ib8c17f9e9963996118473c5c32d3d6fb51ce632e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196343
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-21 20:56:11 +00:00
Danny Tuppeny a808d5ca20 [analyzer] Update LSP fix-all tests based on new server implementation
Change-Id: Iccc71d67c77eb2a372293e746ca12984f67a0579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196285
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-21 19:48:00 +00:00
Riley Porter 853597a978 Optimize js_util setProperty calls for non-function value types.
No change in the generated JavaScript for dart2js base on a sample
foo.dart file and tests/lib/js/js_util/properties_test.dart

Bug: #44533
Change-Id: Ib6866fa7fca1f13b03c75dd4f1eac904b18811e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193838
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2021-04-21 19:01:11 +00:00
Ben Konyi 14554239bf [ package:dds ] Fix issue where streamListen could be sent multiple
times to the VM service for the same stream

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

Change-Id: I8742363b54fd5c8c07331636150af8e68c11b832
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196224
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Gary Roumanis <grouma@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-04-21 17:25:30 +00:00
Ben Konyi 493560a419 [ VM ] Disable sdk_break_with_mixin_test on AOT bots
Fixes https://github.com/dart-lang/sdk/issues/45781

TEST=N/A

Change-Id: I3a624078183eaa2bc283bd9f2363b65dfdf781d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196341
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-21 16:59:04 +00:00
Danny Tuppeny a1f0f1b700 [analyzer] Migrate LSP integration tests to null-safe
Change-Id: I0fff9271ef796bc9b3f8316080068d667183f1b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195991
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-21 16:49:30 +00:00
Danny Tuppeny 1b6399759a [analyzer] Migrate remaining LSP tests to null-safe
Change-Id: I7a2befd9d46b93ebeb84c40f33121f077f3d6f1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196284
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-21 16:41:50 +00:00
William Hesse a65ab5e09c [infra] Restore 'test' subdirectories to the Debian build tarball
Boringssl build has some dependencies on files in its test directory.

TBR=athom@google.com

Change-Id: I4c7b739481459658940919a782238497cb2ccaf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196326
Reviewed-by: William Hesse <whesse@google.com>
2021-04-21 15:51:30 +00:00
Paul Berry 73db2ff205 Replace CFE and analyzer legacy type promotion with a shared implementation.
This allows us to remove a substantial amount of CFE and analyzer
code.

It also fixes a minor CFE type promotion bug
(language_2/type_promotion/assignment_defeats_promotion_lhs_and_test).

TEST=standard trybots
Change-Id: Ia0c159bdb9161d73648c9eb73b92822168f28d84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175583
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-04-21 14:21:30 +00:00
Tess Strickland 8f30423bee [vm] Allow unknown type nodes in v8 snapshot profile in non-DEBUG.
Fixes https://github.com/dart-lang/sdk/issues/45787

TEST=Flutter HHH/web tests.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try
Change-Id: Id223f667b4571d0733e578207d160e86f24687bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196322
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-04-21 14:03:10 +00:00
Johnni Winther fdc765faad [cfe] Make TypeParameter.defaultType non-nullable
TEST=existing

Change-Id: I0a8fdf09f742b55357411f12dc6164d4050bb83c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196283
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-04-21 13:51:50 +00:00
Paul Berry b6fbee21d9 Flow analysis: additional "why not promoted" test cases.
These test cases already work properly, but they weren't previously
covered by tests.

Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: I4fc6506230af203a361631afc542e0db08bd6f27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196106
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-04-21 13:38:20 +00:00
Dong-Heon Jung ba3e7a60e3 Enable print_ssa_liveranges
Assert when print_ssa_liveranges flag is set.
Check two conditions to print spill slot.
- HasStackIndex
- FP base register

TEST=ci

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

GitOrigin-RevId: 513db2a2cdfceb17e7914835aa244225190c40ce
Change-Id: Ifae645e3688e86b54df5f6fe64483a9f83207441
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196244
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2021-04-21 13:14:20 +00:00
Dmitry Stefantsov ad62d8bd7f [cfe] Add calls to isExtensionRelated to subtype implementation
Closes #45775.

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

Change-Id: Ibffdd24b1a691b2149323dbc984c0d3ae7134c25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196120
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-04-21 12:03:18 +00:00
David Morgan d8479de94b Revert "Stop reporting StrongModeCode.TOP_LEVEL_INSTANCE_GETTER"
This reverts commit 649f7cf689.

Reason for revert: Breaks google3: b/185875256

Original change's description:
> Stop reporting StrongModeCode.TOP_LEVEL_INSTANCE_GETTER
>
> Change-Id: I947e1edb042825a5cfc3394d2554ad3272f86b91
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195302
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

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

Change-Id: Ic019fa570f048e213290ac04d02d1b4655415b47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196282
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2021-04-21 10:22:18 +00:00
Alexander Thomas 36b505cf8c [infra] Clean up debian package builder
* Add a docker file to avoid rebuilding the same image on every run.
* Move all files involved into the linux_dist_support folder.
* Exclude more directories in the tarball.
* Delete version checker from test_matrix.
* Disable goma when running build.py.

Change-Id: Ic7b0a2359027d532c009cdf3187d873323170f30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195901
Reviewed-by: William Hesse <whesse@google.com>
2021-04-21 09:28:52 +00:00
William Hesse e2d9a15385 [infra] Decrease number of changed test results sent to results feed
The cloud functions processing changed test results are timing out
when sent 100 changes to process at once, reduce chunk size to 50.

Fixes:https://github.com/dart-lang/dart_ci/issues/46
Change-Id: I2046475e586e6801a4dab5fa6e1686568c0ba17c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195992
Auto-Submit: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-04-21 09:14:18 +00:00
Lasse Reichstein Holst Nielsen 88a351f3d2 Make throwing Zone.uncaughtError handlers propagate the error to their parent zone.
Avoids infinite recursion when the uncaught error is handled by the same,
potentially still failing, uncaught error handler.

Bug: https://github.com/dart-lang/sdk/issues/45616, https://github.com/dart-lang/sdk/issues/45617
Change-Id: I60ee0f1220b7345f4a41e1f1b323b8da47ed326e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194402
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-04-21 07:52:58 +00:00
David Morgan d46cc75617 Revert "Issue 45672. Report constant errors when null value where non-nullable type is expected."
This reverts commit 9abc59e74c.

Reason for revert: Breaks google3: b/185915025

Original change's description:
> Issue 45672. Report constant errors when null value where non-nullable type is expected.
>
> Bug: https://github.com/dart-lang/sdk/issues/45672
> Change-Id: I9d006955523bf470c762fde57444e3596e4dccae
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196042
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

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

Change-Id: I0b16cf82414623a2fbda17813aeb0c24f080e568
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/45672
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196281
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2021-04-21 06:44:41 +00:00
JustWe 5787ad0381 [CFE] add 'Function' as type identifier check in CFE
try resolve https://github.com/dart-lang/sdk/issues/45705 @eernstg

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

GitOrigin-RevId: 2d91c32a34260014bbd5720e48a713eee180e65b
Change-Id: Ic416287137495926efe1d03da7d484202bd11272
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195761
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-04-21 04:43:48 +00:00
Konstantin Shcheglov 82ea8416ed Fix failing test/completion_test.dart
Change-Id: I12676b8d1422d9d521f8c1ac84a28b30237b1ee6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196242
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-21 03:25:48 +00:00
pq 46909507a6 fix sort_directives violations
See: https://dart-review.googlesource.com/c/sdk/+/196026

TEST=Code cleanup exclusively (sorting imports); no new tests.

Change-Id: I0d419bbeb73f0763175dd29eadfd84e3d0290af5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196223
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-04-21 00:13:48 +00:00
Ryan Macnak 7e1d1963e5 [vm] Switch TypeArguments to compressed pointers.
TEST=ci
Change-Id: Ic3162ef1558fb803ab68749f1f1a4d820645ec7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194017
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
2021-04-21 00:06:58 +00:00
Mark Zhou 5b9a3f5c9a [dart2js] Cleaning up no-legacy-mode failures.
Partial revert of: https://dart-review.googlesource.com/c/sdk/+/158160

Change-Id: I81bf4b07a45d3bd83bbbd04cf4fb78d9cc94b68f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196020
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2021-04-20 23:24:08 +00:00
Vyacheslav Egorov f88ce677e1 [vm/debugger] Avoid treating a try/finally as a catch
There is a synthetic try/catch within a try/finally block.

When trying to assess whether an exception is caught, the debugger
should skip such generated try/catch blocks. Otherwise, it considers
that try/finally actually handles the exception, which is wrong.

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

TEST=runtime/observatory{,_2}/tests/service{,_2}/regress_45684_test.dart

Change-Id: I60e8837204cf97ee1ab02ffd03364e7f69857004
Fixed: 45684
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196124
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-04-20 23:14:38 +00:00
Konstantin Shcheglov 375e878c35 Update nullability for TypeParameterType in tryPromoteToType()
Change-Id: Ifc8c32e3540577437c6448fa943d8cbbfebf0b62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196105
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-20 23:02:08 +00:00
Ben Konyi 302e42da44 [ VM / Service ] Allow for resolving breakpoints in multiple Script
objects

It's possible for scripts to appear in multiple components provided by
the front end in certain situations (e.g., mixin applications in
different libraries). Previously when trying to set a breakpoint, if
multiple scripts were found matching the target URI the debugger would
give up and not set the breakpoint.

This change allows for multiple Scripts to be associated with a
BreakpointLocation.

Fixes https://github.com/flutter/flutter/issues/66832

TEST=runtime/observatory_2/tests/service_2/sdk_break_with_mixin_test.dart

Change-Id: I935721f4753675a9a2051a71cc1720e590f8d4f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195664
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-04-20 22:34:38 +00:00