Commit graph

88720 commits

Author SHA1 Message Date
Sigmund Cherem 5f765bcf8f [dart2js] fix minified_names_test.
This test broke on a d8 roll back in January, since then other changes in the compiler
made the test drift further away from the original issue

Change-Id: I081dd48ae9eea2aec4117a377805c26675d2e557
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271862
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-12-10 01:24:54 +00:00
Brian Wilkerson bb7e2c9b95 Remove some unnecessary ignores in test code
Change-Id: I55e332132b9f3e435d79dd03a7aa7459d796599a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274800
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-12-10 00:19:30 +00:00
Nicholas Shahan c010e4ffbd [ddc] Add support for new native types
Use the "extension type" class as the interceptor object for the
dart:_rti library. This applies to the new type system for values
that are represented as a native JavaScript type. For example:
Number, bool, String, Array, etc.

Issue: https://github.com/dart-lang/sdk/issues/48585
Change-Id: Ie6214aa897d3ae8abb4f9619cd2be984eeb9c4ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/266544
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-12-10 00:07:45 +00:00
Brian Wilkerson 1e4a974a5d Remove some unnecessary ignore comments in compiler
Change-Id: I323c846776637b91922abac73acc2eac6017d4de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274722
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-09 22:54:08 +00:00
Konstantin Shcheglov 78fb91e739 Resolve PatternAssignment and AssignedVariablePattern.
Change-Id: I79a7a3b7f5b5fed349c9d40d61a9e0f0fd3978ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274723
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-12-09 22:46:28 +00:00
Brian Wilkerson de24bf1cce Remove some unnecessary ignore comments in dev_compiler
Change-Id: Ibb901e1e9d02d0480721240d4d5ecef070364135
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274726
Commit-Queue: Leon Senft <leonsenft@google.com>
Reviewed-by: Leon Senft <leonsenft@google.com>
2022-12-09 22:45:58 +00:00
Ryan Macnak a429d2ff91 [vm, gc] Remove dead code from weak handle visitors.
TEST=ci
Change-Id: I10619b7970de19047c9af77fc82dc9d3009f34f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274801
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2022-12-09 22:22:28 +00:00
Brian Wilkerson d9482e35ce Remove some unnecessary ignore comments in analyzer packages
Change-Id: I578285132f0d3f200cb2e9069750a1391940711d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274721
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-09 21:33:18 +00:00
Dan Chevalier 4981cbffe2 [ VM Service / DDS ] Add custom service stream support
Setting the `stream` parameter on `developer.postEvent` will now forward those events to a custom stream inside DDS.


The first use of this will be for widget inspection. A navigation event will be posted to a custom stream. Our IDE DAP can listen for the Event and react to it by navigating to the desired location in the code.

TEST=Updated observatory tests. Created new developer test to check assertions. Added DDS tests for new custom stream behaviour. Manually tested the postEvent and StreamListen with multiple clients

https://github.com/flutter/devtools/issues/4533

Change-Id: I870dc634c9a9a7d2ee3a6605319c2a18517ad197
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274061
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
2022-12-09 20:18:30 +00:00
Brian Wilkerson 3d1cd6a536 Remove incomplete and inappropriate text from documentation
Change-Id: Ie3ecedcaba03ea3db2b5cb724d49add815d9f5be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274522
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-12-09 19:49:10 +00:00
Ben Konyi 0971185695 [ VM ] Remove unnecessary condition check
TEST=N/A

Change-Id: I4c738a9be1aee9fab636ee2cbdb796f0ed226a86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274060
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-12-09 19:27:27 +00:00
Srujan Gaddam 74bfe6c244 Add bindings emitter for web libraries
Adds a generator that reads the platform libraries dill and outputs
maps that correspond to the various bindings e.g. `@Native` values
that exist in the web libraries. These maps will be consumed during
the analyzer run for lints.

Change-Id: I5b5bf91ff0e32964b97c9e52be414ec84ff88765
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272720
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
2022-12-09 19:23:31 +00:00
Michael Thomsen 4439788611 Roll package:collection
Change-Id: If754927b24fe1f33bad5ec017ac69fcc60815087
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274740
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Auto-Submit: Michael Thomsen <mit@google.com>
2022-12-09 18:16:32 +00:00
Paul Berry d0fc6ec27b Flow analysis: account for implicit break at the end of switch statement cases.
Bug: https://github.com/dart-lang/sdk/issues/50419
Change-Id: Ie9b0dd3319dd4e28f53082794aa18ed422b0894b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274605
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-12-09 17:20:38 +00:00
Paul Berry 966aed6bd1 Shared pattern analysis: add support for pattern variable assignment.
Bug: https://github.com/dart-lang/sdk/issues/50585
Change-Id: I1939c6fd8fac205abeac5b0a9b3da9b3b4adca01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274604
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-12-09 17:16:38 +00:00
Michael Thomsen 9f2a622d79 [3.0 alpha] Update CFE messages for Dart 3 sound null safety by-default
Fixes https://github.com/dart-lang/sdk/issues/50638

Change-Id: I511c5337099ae9576377ac8a82ef1bb78f6d34b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273844
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-12-09 16:55:03 +00:00
Brian Wilkerson 3166622ca1 Update the fix status file
Change-Id: I13fc20f8040be486a4d1d44647a871e7e1c69013
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274482
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-09 16:46:51 +00:00
Sigmund Cherem c91b73eaf7 [3.0 alpha] Remove dart:html's deprecated document.registerElement & registerElement2 APIs
Change-Id: I07fc124c55d1aeb678f39a4d72d3b4f581025a10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273541
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-12-09 16:02:02 +00:00
Sergey G. Grekhov 98eedc6f22 [co19] Roll co19_2 to 56f45529ff2818e8549d6e092fc478e73d68fcc0
2022-12-09 sgrekhov22@gmail.com dart-lang/co19#1575. Remove unused code (dart-lang/co19#1579)
2022-12-08 sgrekhov22@gmail.com dart-lang/co19#1575. Update test expectations for analyzer (dart-lang/co19#1577)
2022-12-06 sgrekhov22@gmail.com Fixes dart-lang/co19#959. Fix flaky test. Enable user-select for Safari (dart-lang/co19#1362)

Change-Id: Ic09ebc4ba8563739bc2d1b6d95ad789019a43272
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274385
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-12-09 15:43:06 +00:00
Johnni Winther 6b73869b96 [cfe] Initial support for view constructors
Change-Id: I646c8e00cb819b5759f5df2b602f49a570d7f959
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274220
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-12-09 15:21:47 +00:00
Johnni Winther 64fd5139e2 [3.0 alpha] Remove error for use of the List default constructor
Contributes to https://github.com/dart-lang/sdk/issues/49529

Change-Id: I65d147aa8f5f692df00663f5fac024351da7aaa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272161
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2022-12-09 13:13:14 +00:00
Daco Harkes 56e581aa34 [3.0 alpha] Move AbstractClassInstantiationError to dart:mirrors
Split off https://dart-review.googlesource.com/c/sdk/+/259041 so that
the VM changes can be landed separately.

TEST=tests/lib/mirrors/instantiate_abstract_class_test.dart

Bug: https://github.com/dart-lang/sdk/issues/49529
Change-Id: Ic06dee0dfeaea64d9d9ffd9511ec66d9d0837e7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274383
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-12-09 12:53:28 +00:00
Aske Simon Christensen 5b966a07d3 Update Binaryen to 7769139efbe818c7ba36d1a382db5114ebee9df8
This corresponds to a version rolled into google3, which hopefully
fixes Binaryen fetch problem on Flutter HHH.

Change-Id: I423a307a1fdb8a250ad41e4fb2ff05730856d10e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274680
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-12-09 11:48:07 +00:00
Ivan Inozemtsev d83b1af147 Revert "[ddc] Wrapping loadLibrary checks in a future to obey eval order rules"
This reverts commit d9ea7207e8.

Reason for revert: b/261854137

Original change's description:
> [ddc] Wrapping loadLibrary checks in a future to obey eval order rules
>
> These checks are cosmetic right now in DDC, but the load check was happening synchronously rather than after the future returned by loadLibrary completed.
>
> Change-Id: I867779605ddfe4f63b83b47418994e0c5e68572a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274087
> Reviewed-by: Nicholas Shahan <nshahan@google.com>
> Commit-Queue: Mark Zhou <markzipan@google.com>
> Reviewed-by: Anna Gringauze <annagrin@google.com>

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

Change-Id: If7e19644498835d0f77569ce11a2438f4d012f6a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274362
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-12-09 11:33:33 +00:00
Sergey G. Grekhov cec026d973 [co19] Roll co19 to 1caf238b37bb19081029a6580f31a728b1359dc0
2022-12-09 sgrekhov22@gmail.com dart-lang/co19#1401. [Patterns] List's rest pattern tests (dart-lang/co19#1578)
2022-12-08 sgrekhov22@gmail.com dart-lang/co19#1575. Update test expectations for analyzer (dart-lang/co19#1576)
2022-12-07 sgrekhov22@gmail.com dart-lang/co19#1401. [Patterns] Map patterns tests updated. Check primitive == for keys (dart-lang/co19#1574)
2022-12-07 sgrekhov22@gmail.com dart-lang/co19#1401. [Patterns] Logical and relational patterns tests refactored (dart-lang/co19#1573)
2022-12-06 sgrekhov22@gmail.com dart-lang/co19#1401. [Patterns] Map pattern tests (dart-lang/co19#1572)
2022-12-02 sgrekhov22@gmail.com Fixes dart-lang/co19#1553. Description wording fixed (dart-lang/co19#1569)
2022-12-02 sgrekhov22@gmail.com Fixes dart-lang/co19#1568. Exclude VM-specific test form web-platforms (dart-lang/co19#1570)

Change-Id: I69e3d49ac0b244ed12c266bd00a1c3ec9f8e1b45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274660
Reviewed-by: Alexander Thomas <athom@google.com>
2022-12-09 11:28:26 +00:00
Paul Berry ea9b19c2c4 Begin implementing flow analysis for patterns.
This CL adds support for flow analysis with variable patterns and
guards, and integrates it with if-case elements, if-case statements,
pattern variable declarations, switch expressions, and switch
statements.  It includes support for guards.

No other types of patterns are handled yet.

Bug: https://github.com/dart-lang/sdk/issues/50419
Change-Id: Iacad82b472cba0e2e670981847258e4046017576
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274162
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-12-09 06:00:36 +00:00
Nicholas Shahan f0c270e96d [ddc] Temporarily skip tests that timeout
The timeouts are crashing the test infra when trying to deflake
the failures and preventing more results from getting uploaded.

These tests are timing out right now on the canary bot because
support for the new runtime types hasn't been fully landed. They
should be enabled again after all the support has landed and
should have results at parity with the non-canary configurations.

Change-Id: Ia8814c02445acccb906c4b376c82da88480155b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274483
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-12-09 02:29:31 +00:00
Konstantin Shcheglov 09a5d048e8 Issue 50660. Fix 'get Source' for ParameterMember.
Bug: https://github.com/dart-lang/sdk/issues/50660
Change-Id: Ie6af7c60178b2010f4cd5254e563185eb7e27042
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274603
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-12-09 02:08:24 +00:00
Nate Bosch db636ba8fe Bump matcher to 7e6a665da079baa3e2a2046ab02e4353ee32556c
Changes:
```
> git log --format="%C(auto) %h %s" 15d4af2..7e6a665
 https://dart.googlesource.com/matcher.git/+/7e6a665 Stop using deprecated errors (201)

```

Diff: https://dart.googlesource.com/matcher.git/+/15d4af21002ae9adee952110192a3face96307c7~..7e6a665da079baa3e2a2046ab02e4353ee32556c/
Change-Id: If0c8c27801e31777ed88a768bbf83aadfbb8890b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274606
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2022-12-09 01:16:29 +00:00
Brian Wilkerson abda30f198 Replace NodeLocator in two more places
Change-Id: I34a67ae8b370ec4c400ac5b9195d537380aca3c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274080
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-09 01:13:28 +00:00
Devon Carew 0c14719954 [deps] rev dartdoc, fixnum, logging, protobuf, shelf, test, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (4d7dc93..f2bb6e9):
  f2bb6e92  2022-12-07  Sam Rawlins  Bump to 6.1.4 (#3266)

fixnum (62916f2..e4f5e97):
  e4f5e97  2022-12-08  Michael Thomsen  Change IntegerDivisionByZeroException to UnsupportedError (#100)
  3bd726f  2022-12-08  Devon Carew  rev the sdk min to 2.19.0-0 (#99)

logging (f322480..0373ef8):
  0373ef8  2022-12-07  Mushaheed Syed  Add a check that throws if a logger name ends with '.' (#123)
  6d46d71  2022-12-06  Devon Carew  Create no-response.yml (#124)

protobuf (4f3e328..2706b53):
  2706b53  2022-12-07  Mahdi K. Fard  Add type to a method parameter (#782)
  a57c16a  2022-12-07  Mahdi K. Fard  Fix a typo (#781)

shelf (1c21047..32e342d):
  32e342d  2022-12-08  István Soós  Prepare the release of shelf_router_generator (#316)
  06e2fe6  2022-12-08  Kevin Moore  shelf: drop non-null-safe tests (#317)
  98363fd  2022-12-06  Kevin Moore  lint: sort pub dependencies
  ad6af2a  2022-12-06  Kevin Moore  shelf_static: move RegExp creation out of every request

test (4dceb87..73cd754):
  73cd7540  2022-12-07  Nate Bosch  Record the working directory for VM platform (#1804)
  e40274a6  2022-12-07  Nate Bosch  Restore mono_repo config (#1810)
  02d8764e  2022-12-07  Sigurd Meldgaard  Use Future for return type in runner `main()`. (#1809)
  3d6039b3  2022-12-05  Nate Bosch  Merge test selections by path (#1806)

webdev (e39506e..3e2364e):
  3e2364e  2022-12-07  Elliott Brooks (she/her)  Add the Dart Debugger / Flutter Inspector panels in Chrome DevTools (#1812)
  c164231  2022-12-07  Elliott Brooks (she/her)  Small fix to the extension test (#1811)
  4bbb4d0  2022-12-06  Elliott Brooks (she/her)  Gracefully handle debugger disconnect events (#1808)
  d3892cf  2022-12-05  Elliott Brooks (she/her)  Refactor puppeteer tests to use `Worker` type (#1809)

Change-Id: I42033e849f40f209831cfb344247b24ad7731ff0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274580
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-12-09 01:04:20 +00:00
Alexander Aprelev fb22336c28 [vm/sse41] Fix use of pextrd when sse41 is not available.
BUG=https://github.com/dart-lang/sdk/issues/50640
TEST=ci

Change-Id: Ief12c270cb59dace99e3a2845cb44ed5085dbdaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274081
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-12-08 23:29:14 +00:00
Aske Simon Christensen e38242621d [dart2wasm] Canonicalize boxed constant values
This saves space for the constant values, since the same value will
use the same constant box object, and it avoids runtime allocation of
boxes for literal values that are boxed directly.

New passing tests:

- language/super/bound_closure_test/01
- co19/LanguageFeatures/Patterns/constant_A05_t01
- co19/LibTest/collection/ListBase/ListBase_class_A01_t03
- co19/LibTest/collection/ListBase/ListBase_class_A01_t04
- co19/LibTest/collection/ListBase/ListBase_class_A01_t05
- co19/LibTest/collection/ListBase/ListBase_class_A01_t06
- co19/LibTest/collection/ListMixin/ListMixin_class_A01_t03
- co19/LibTest/collection/ListMixin/ListMixin_class_A01_t04
- co19/LibTest/collection/ListMixin/ListMixin_class_A01_t05
- co19/LibTest/collection/ListMixin/ListMixin_class_A01_t06
- co19/LibTest/core/List/List_all_t03
- co19/LibTest/core/List/List_all_t04
- co19/LibTest/core/List/List_all_t05
- co19/LibTest/core/List/List_all_t06

Change-Id: Id7570a2dd16f02590e722115e4d7168c4a741d99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273843
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2022-12-08 22:11:32 +00:00
Nate Biggs 5dca4cbd42 [dart2js] Distinguish virtual calls from direct calls to recover some lost accuracy in types.
This recovers the accuracy of types that were previously being widened and even performs better than today's algorithm for some specific cases.

Change-Id: I0139a0fd662a91315282ba94e4c1a29d44056b9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273501
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-12-08 21:19:54 +00:00
Kallen Tu b58f1b4ef3 [analyzer] Report error when mixing in a sealed mixin outside of its library.
Change-Id: I62be6c21bc2bf2a5af35203137aa75c7fd1ba934
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274142
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-12-08 21:18:24 +00:00
Brian Wilkerson 44e11d9dd4 Add a utility to find adjacent siblings in a selection
This will be used to allow multiple top-level declarations to be moved
together.

Change-Id: Ib1c59e9ff3e01891f8cb29b74e78183c36b1f02d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273828
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-12-08 20:48:58 +00:00
Ryan Macnak 15c8dad750 [vm] Reorder fields on Thread to reduce code size on X64.
dart2js.jit.x64 48139536 -> 47867344 (-0.57%)
dart2js.aot.x64 27077952 -> 26799256 (-1.03%)

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/48182
Change-Id: Ibc7d2ae7473936530307eadfcb4aeb83a9fdb873
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274282
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-12-08 18:24:19 +00:00
Nate Biggs 6144b6ed89 [dart2js] Clean up ssa/optimize.dart migration files.
Change-Id: I0aaf3e719ab6ab794840a6a07f58c3ee82a61e23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274322
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2022-12-08 18:12:27 +00:00
Nate Biggs 25e650691f [dart2js] Migrate ssa/optimize.dart to null safety.
Change-Id: I3d6b177e30f27a73590e53d0d650fd2342c04ed2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274321
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-12-08 18:12:27 +00:00
Nate Biggs 531e356587 [dart2js] Migrate ssa/value_range_analyzer.dart to null safety.
Change-Id: I20d5d55c9a31f87bcb517e8d416ff01a712e0c4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274320
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-12-08 18:12:27 +00:00
Ryan Macnak 0150cddace [vm] Fix call-through-getter runtime handling.
This should look for `dyn:call` instead of `call`. If it was a non-dynamic call, we would hit an invoke-field-dispatcher instead.

TEST=ci
Bug: https://github.com/flutter/flutter/issues/116405
Change-Id: I98c441fec2eb53ab23ac1dd52db3aa4eaa5cbc6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274265
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-12-08 17:48:49 +00:00
Daco Harkes 1d567c888f [vm] Remove use of CastError
`CastError` is replaced by `TypeError`.

Also makes the fields of TypeError nullable. See:
https://github.com/dart-lang/sdk/issues/49279

TEST=build SDK and run default suites.

Bug: https://github.com/dart-lang/sdk/issues/49529
Change-Id: I7e880ff2d8b18c4bffdd7a942efd743244a12734
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274381
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-12-08 17:07:33 +00:00
Aske Simon Christensen 96e2e55300 [dart2wasm] Fix a build error caused by colliding commits
Change-Id: Icc6c22896def0183766bb23dc2ca978fe15430ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274441
Reviewed-by: Martin Kustermann <kustermann@google.com>
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-12-08 15:48:01 +00:00
Danny Tuppeny c53f70509c [dds/dap] Filter private getters from debug views
These will fail unless the current stack frame happens to be in the library that declares them, which results in a lot of exceptions being shown in variable views.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4296.

Change-Id: I5919e391f25a08920dcdf1bf648526d175af00f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274040
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-12-08 15:02:04 +00:00
Martin Kustermann cdd0694a92 [gardening] Make qemu configurations get 2x the time
Running tests under qemu simulator are slow. To prevent tests from
flakily going over the timeout limit, we give them 2x the time.

Change-Id: I41f771d5b958d11d073fd9808663b0b9f298ad9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274384
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-12-08 14:08:09 +00:00
Aske Simon Christensen a22e0ac5ea [dart2wasm] Compute correct type for generic function instantiation
Change-Id: I3811e37002ed6ae458600513bff3ac29482a6af3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/271104
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-12-08 13:54:57 +00:00
Aske Simon Christensen 8c717be409 [dart2wasm] Emit correct runtime type for tear-offs
The static type of a tear-off is the signature type of the method.
The runtime type is the same with the types of all covariant
parameters replaced by `Object?`.

Change-Id: I9bb36a36ec04e27deab2b31c977fadac515ad561
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273845
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-12-08 13:54:57 +00:00
Aske Simon Christensen ad06d73ace [dart2wasm] Use a flat index space for function type parameters
The current two-level indexing scheme for function type parameters
(depth and index) breaks down in the case of type substitution when
the substituted type is a generic function type, since its internal
type parameter types have been encoded assuming that the function type
had nesting depth zero, but after substitution its nesting depth can
be higher.

Relative indexing schemes such as De Bruijn indices will also not
work, since function type parameter types are constant types, and the
constant infrastructure assumes that the same constant always has the
same representation.

This change introduces a flat indexing scheme where function type
parameters are indexed using a single index which is independent of
the context in which the type parameter type appears. To avoid
collisions in the case of nested generic function types, every function
type has a type parameter offset, which conceptually shifts the
indexing range of its type parameters so it doesn't necessarily start
at zero.

Looking up a function type parameter in its environment thus involves
searching outwards until a function type is found whose type parameter
index range contains the index encoded in the function type parameter
type.

Change-Id: I544056d52711ff829b170f78a7274a93871825a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272361
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-12-08 13:54:57 +00:00
Aske Simon Christensen f72f2e92d5 [dart2wasm] Re-enable async tests that no longer time out
Issue: https://github.com/dart-lang/sdk/issues/50122

Change-Id: I311c7a709e74381c84cb9c42cceb3d5c9cde4d61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267960
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-12-08 13:43:41 +00:00
Tess Strickland a43d3cb993 [vm/compiler] Use CombineHashes/FinalizeHash methods in intrinsifier.
AsmIntrinsifier::OneByteString_getHashCode now uses the CombineHashes
and FinalizeHash Assembler methods introduced in 49f998dc31.

To avoid having to check for 0 again after masking the result of
FinalizeHash to fit the desired bit size, we create a more general
FinalizeHashForSize that also takes the desired bit size of the result.

The intrinsified versions for ARM/ARM64/RISCV are also modified to
remove the special casing for the empty string, and instead just check
the size of the string against the loop counter at the start of the
loop, similarly to X64/IA32. This is less efficient for the empty
string case, but avoids the need to create a version of FinalizeHash
that elides the zero check.

TEST=ci

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try,vm-kernel-precomp-nnbd-linux-release-simarm_x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-debug-simriscv64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-nnbd-linux-debug-simriscv64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-linux-release-ia32-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-ia32-try,vm-kernel-nnbd-mac-release-arm64-try,vm-kernel-linux-debug-x64c-try
Change-Id: I53db731acb8bf35d16efb55fa2c5a79d8302399f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272800
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2022-12-08 12:58:28 +00:00