Commit graph

85353 commits

Author SHA1 Message Date
asiva d437877c50 [VM/Runtime] - Ensure ReusableObjectHandleScope is not active when
Errors are reported from the Dart C API implementation.

TEST=ci

Fixed: 48951
Change-Id: I954d8ef3a6b148e45335cc7c264eb542ae10bc7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243842
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-05-05 22:15:45 +00:00
Ryan Macnak 2cf4bf72a8 [vm, compiler] Handle large offsets with double spill slots on RISC-V.
Fix non-existent addressing mode in ARM fpu spilling.

TEST=ci
Change-Id: I0ecb973059a6cab11dce5b87137b54e0d1ac5ac5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243703
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-05-05 22:11:17 +00:00
Alexander Thomas f964af3bf3 [test_runner] Add web driver service
This changes safaridriver to be running whenever test.py runs any safari
configuration. The service exists when all tests are done. The process
can only be used by a single browser but supports many consecutive
sessions.

Bug: b/208186791
Cq-Include-Trybots: luci.dart.try:dart2js-strong-mac-x64-safari-try
Change-Id: I7c1d5910f8c97ae97c1806a07251df918f139e0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243720
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-05-05 21:49:56 +00:00
Konstantin Shcheglov 5a2f5ab33c Support more parts of ClassDeclaration in DeclarationBuilderFromElement.
Change-Id: I6d6c0344924a19e8b8b01cf54a51b69fd61e0122
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243849
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-05-05 21:30:04 +00:00
Nate Biggs c6173d3686 [dart2js] Correctness updates for async lowering.
- Wrap returns in Future.value to ensure the returned Future has the async function's return type.
- Skip any function that has try/catch/finally as these introduce more complex control flow. (Might be able to convert these using an onError callback in the future).
- Don't assume futureValueType since CFE might not populate it in Kernel when syntax is incorrect.

Change-Id: Ice3954da52a10a74f93b0adc6409a2d98e13cb3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241260
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-05-05 21:25:45 +00:00
Nicholas Shahan be6ca10956 [ddc] Migrate module_containers to null safety
Change-Id: Idc8e6a13f6b253b4b1030fe0d0b9a272cebbd079
Issue: https://github.com/dart-lang/sdk/issues/48585
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243843
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2022-05-05 20:51:35 +00:00
Konstantin Shcheglov d78797d014 Replace DartType.resolveToBound() with TypeSystem.resolveToBound()
Bug: https://github.com/dart-lang/sdk/issues/48952
Change-Id: I38add3e0d633f947640283eda46b5399f4559ef8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243702
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-05-05 20:35:16 +00:00
Stephen Adams 56765625e0 [dart2js] Migrate more of serialization/ to NNBD
This CL reduces the number of part files in serialization/ by moving
classes into smaller libraries.

This allows the {Data,Binary,Object}{Sink,Source} to be migrated to
NNBD while sink.dart and source.dart still have dependencies.

Change-Id: I0ea44f95841f18978e78c2e1697fbc97a3bf73c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243711
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-05-05 20:04:45 +00:00
Alexander Aprelev 5898dcd1ad [vm/aot] Trim user-defined entries from classes constants table.
Fixes https://github.com/dart-lang/sdk/issues/48928

flutter_gallery_isolate_size -1.970% (armv7), -1.204% (armv8)

TEST=ci

Change-Id: I6d2765d1e69c39bc6189eaf05e83b1fbf334fdcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243709
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-05-05 19:29:35 +00:00
Konstantin Shcheglov f7d4d0d85c Add failing tests for SortConstructorFirst with comments.
Bug: https://github.com/dart-lang/sdk/issues/48966
Change-Id: I2d34a7cc240171759dd331f23118745a5d8ff80e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243841
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-05-05 19:03:35 +00:00
Konstantin Shcheglov 838b68914f Add more data for CastError in _ContextTypeVisitor.
Bug: https://github.com/dart-lang/sdk/issues/48965
Change-Id: I50ac5baef607071f5b32df4aa63fb4327645a781
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243840
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-05-05 18:09:56 +00:00
Nicholas Shahan 25c3f36d95 [dart2js] Fix return type on rti as methods
Change-Id: Idd96bf55b22d4f9c3072d1371b31ff4c0005afb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243706
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-05-05 17:36:55 +00:00
Brian Wilkerson 477b3a1cbd Stop using main in test code in more places, part 2
Change-Id: Ifbcdd950f2643349dfd645c1f4a26c3ee0c916e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243682
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-05-05 17:16:15 +00:00
pq 8663146947 Revert "bump package:markdown"
This reverts commit a8e5b4beb1.

See breakage details in b/231525859.

Tracking issue to get this (re)-bumped:  https://github.com/dart-lang/sdk/issues/48967.


Change-Id: I4679901c67e65cf7e0f7ddb1f7e285effa1c9763
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243800
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-05-05 17:00:35 +00:00
Devon Carew 69bd8e7c5b [core libs] address ~5 analysis issues in the docs for dart:isolate
Change-Id: Iebe275335fd098419ede97dbb8baff8efaf9dc1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241161
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-05-05 16:58:55 +00:00
Konstantin Shcheglov 6f431ad8df Extract DeclarationBuilder, support from nodes and elements.
Implement ClassIntrospector.superclassOf(), a few tests.

Change-Id: Ifcc7ea033f5958a4096a770dac4c2b77dc1d35e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243705
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-05-05 16:15:05 +00:00
Konstantin Shcheglov 87580fb160 Prevent reporting errors when resolving CommentReference.
Change-Id: I5b9426245bc4c20436b95f7668c331172ed5cc71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243760
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-05-05 16:03:15 +00:00
Danny Tuppeny 5f15aefcab [analysis_server] Record timings for recent LSP requests and show in server diagnostics
Change-Id: I1bfb03faa9ce3240c700c93cb4ab677dc1aff520
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-05-05 15:29:55 +00:00
Danny Tuppeny 7d6216940f [analysis_server] Always include exact matches in completion when truncating
Change-Id: I21b56392961217482dbcf5c67b9594709b27bcc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243721
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-05-05 15:29:25 +00:00
Daco Harkes 438c1ed2ba [vm] Only call .hashCode once when adding to Map and Set
The methods to add to hash maps and hash sets are recursive: if the
index needs to be rehashed then the same method is called again after
rehashing.

This CL nests the actual implementation in a private method that takes
the full hashCode as an extra argument.

No significant code size or run time changes are reported on our
benchmarks. (Our benchmarks do not contain purposefully slow hashCodes.)

Note that hashCode can be called again later if rehashing of the index
is required on adding subsequent elements.

Bug: https://github.com/dart-lang/sdk/issues/48948
Change-Id: Ia3ccff9e592d675b4922ac78c4aa7ee0287ecb50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243623
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-05-05 11:48:35 +00:00
Alexander Thomas e04f5885b8 [sdk] Generate a version file for the unpatched SDK
This will be used to analyze the unpatched SDK. The file contains only
the major and minor part of the version number. The patch version will
always be 0. This is sufficient for the analyzer to construct a language
version.

Change-Id: Ief71ce617b279f7c688e9068c425bc31394cbf5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-05-05 10:36:05 +00:00
Devon Carew 35246aee33 [deps] rev package:string_scanner
Change-Id: I5512c7cab3a355ab9ef223f10ab7de059edf7263
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243708
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-05-05 00:07:44 +00:00
Devon Carew 60ea761224 [pkg/nnbd_migration] remove a dep on package:charcode
Change-Id: I8fb1e9d10bc7d00e096b11a46dc8d085f37f9e9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243704
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-05-04 23:47:34 +00:00
Alexander Markov c3e0d770dd [vm] Introduce FUNCTION_REG constant
This refactoring introduces FUNCTION_REG constant for a register
containing target function object when calling Dart functions in JIT
mode. This register is similar to CODE_REG and ARGS_DESC_REG
registers which are also a part of Dart calling conventions.

Hardcoded registers are replaced with new constant where
appropriate. Also, ARGS_DESC_REG and IC_DATA_REG are used instead of
hardcoded registers in more places.

TEST=ci (pure refactoring)

Change-Id: I9e71022d7bca8d4e555b9e4f22558f388073495f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243681
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-05-04 22:59:24 +00:00
Devon Carew 71b41199a5 [deps] roll the latest versions of args, fixnum, http_parser, path, and typed_data
Change-Id: Ia35f6707c5bc206927a8b2df19f62be25b7cf2f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243680
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-05-04 21:42:34 +00:00
Konstantin Shcheglov 7359e2dd7d Merge MacroClassInstance into _MacroApplication.
Change-Id: I6ee1faad1f28d0bea797fcf39b3f253a7d565c2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243525
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-05-04 21:11:54 +00:00
Konstantin Shcheglov a0da1a1dee Temporary support for declaration macros to declare top-level variables.
For now we put them into the defining unit, eventually they will
stay in the augmentation library.

Change-Id: I1fc5800f9c54248e24df68cc6f4ee7acf8f8e386
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243648
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-05-04 21:08:54 +00:00
Sam Rawlins 84ca405b35 Support overlays in completion_metrics_client.dart
Change-Id: Idedb38193ed80be0fa10e8e6be3fa04f8f30b100
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243649
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-05-04 20:58:54 +00:00
Daco Harkes 78f218eb4c [vm] Flush thread store buffer block after processing finalizers
`MournFinalized` runs during marking and can add objects to the store
buffer. These objects are stored in the threads' store buffer block.
This block needs to be released to the central store buffer in order for
the objects' addresses to be updated during compacting.

TEST=runtime/vm/object_test.cc
TEST=tools/test.py vm/cc/Finalizer_Regress_48843

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

Change-Id: Ib2424929c86fee730d3f09fbd2f9f6c97f31abfd
Cq-Include-Trybots: luci.dart.try:vm-canary-linux-debug-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-x64c-try,vm-kernel-mac-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-linux-release-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-release-ia32-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243262
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-05-04 20:53:15 +00:00
Sam Rawlins 531e6e175f analyzer: Prefer string interpolations
ignore prefer_interpolation_to_compose_strings and
constant_identifier_names in generated files.

Change-Id: I963504e298f8e439734522fed9ac09911750f419
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243646
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-05-04 20:45:25 +00:00
Brian Wilkerson 6af134d78b Stop using main in test code in more places
Change-Id: If3bac4c92d7a165528d45479e6594cbdcfc1708c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243641
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-05-04 19:25:55 +00:00
Ryan Macnak caf220432f [vm] Add flag to investigate array serialization optimizations.
TEST=--print_array_optimization_candidates
Bug: https://github.com/dart-lang/sdk/issues/48910
Change-Id: I6e5031ce9cca4128b8fb75dd5c9e43ad57e7013c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243527
Reviewed-by: Dan Field <dnfield@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-05-04 18:04:04 +00:00
mnordine 74dd509610 Remove extra word
Closes https://github.com/dart-lang/sdk/pull/48935

GitOrigin-RevId: 97ac4730d36c0fb24152d2bddc67b267e3292af0
Change-Id: I1b0f39f73725167ab016719d587c18aac98d6125
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243340
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-05-04 16:22:35 +00:00
pq a8e5b4beb1 bump package:markdown
Change-Id: Ic4d23639b00044a104f3ebd8d24c7464d76ab93e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243529
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-05-04 16:10:04 +00:00
Martin Kustermann fe50796c6f [gardening] Remove standalone{,_2}/io/raw_datagram_socket_test from iso-stress builder
The test shows up as flaky when running in parallel on the
"iso-stress" builder and as such is not needed to test concurrency in
the VM, so we'll remove it.

The test fails with
```
FutureExpect.throws received Instance of '_RawDatagramSocket' instead of an exception
#0      FutureExpect.throws.<anonymous closure>
#1      _rootRunUnary
#2      _CustomZone.runUnary
<asynchronous suspension>
#3      FutureExpect.throws.<anonymous closure>
<asynchronous suspension>
```

TEST=Should get "iso-stress" builder geen.

Change-Id: Iad79851bda5c8eb75b2387df296b357e3884c822
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243622
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-05-04 14:29:34 +00:00
Danny Tuppeny 4261df2dbd [analysis_server] Remove qualified static members from code completion
Change-Id: Ia8ef009fa99cd495ca0ed3f825f3d951136341e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-05-04 14:22:24 +00:00
Kenzie Schmoll 77002f991e Release DevTools 2.13.0
Change-Id: Ie2cd8657db334d18fb5ba034a9a7c11ebefa9581
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243564
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-05-04 13:10:09 +00:00
Sigurd Meldgaard 699ea58a42 Bump pub to 6068f47c264ef790e16411b31b2c94ad6beb1ab6
Changes:
```
> git log --format="%C(auto) %h %s" a949b32..6068f47
 https://dart.googlesource.com/pub.git/+/6068f47c Fixing link example "User-Agent" (#3400)
 https://dart.googlesource.com/pub.git/+/cd0d6992 Make tests more agnostic to the test environment (#3402)
 https://dart.googlesource.com/pub.git/+/1f8db828 Fix retrieval of name in `pub global activate -sgit` (#3407)
 https://dart.googlesource.com/pub.git/+/ed63f212 Limit the number of concurrent precompilations (#3396)
 https://dart.googlesource.com/pub.git/+/d82f80a5 Fix crash when checking code with bad import (#3392)
 https://dart.googlesource.com/pub.git/+/b9ae624e Relative urls in lockfile for git urls (#3385)
 https://dart.googlesource.com/pub.git/+/62bb2440 Fix `dependency_services apply` for packages with relative imports (#3374)

```

Diff: https://dart.googlesource.com/pub.git/+/a949b329b1b51f5f3973a790e0a0a45897d837de~..6068f47c264ef790e16411b31b2c94ad6beb1ab6/
Change-Id: Ib18c2647e27a34d84005214b844351f314698611
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243321
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
Reviewed-by: Sarah Zakarias <zarah@google.com>
2022-05-04 12:26:44 +00:00
Aske Simon Christensen dc66b9274e Update d8 to 10.2.78
With dart2wasm emitting nominal types by default now, we can move on
from 10.0.40. This newest version contains a fix to type conversion
when round-tripping a JS value through WasmGC plus some early stack
switching support.

Change-Id: I4744e0b9705dc0d3ee1a4a417e299b4eb8ed9b3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240405
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-05-04 10:15:44 +00:00
Sam Rawlins 9d456bf516 Basic client completion test
This involves a large refactoring of completion_metrics.dart, extracting
out some common code into completion_metrics_base.dart

The code in completion_metrics.dart and completion_metrics_base.dart is
largely unchanged, but restructured to fit the sub-class structure.

* Rename CompletionMetricsComputer -> CompletionQualityMetricsComputer,
  as this is focused on quality metrics.
* Extract out applyOverlay and removeOverlay methods.
* Extract out computeSuggestionsAndMetrics, code which is run per
  ExpectedCompletion.
* Extract out setupForResolution, for code custom to the quality
  computer.

The meat of this change though is in completion_metrics_client.dart:

* _AnalysisServerClient is code which was extracted from
  package:dartdev/src/analysis_server.dart. It may seem like an odd
  choice when we have package:analysis_server_client, but I think
  dartdev's client is fairly mature in creating a short-lived client,
  and handling crashes, etc. If this should be re-combined with dartdev,
  I think there are open questions about where that should live, and I'd
  like to address that in a follow-up.
* The client does not perform overlays yet.
* The client does not track slowest requests yet.
* The client does not have support for performance metrics which DAS
  tracks itself. Adding this is high priority.

Change-Id: Ib259f78e4646d10b61559bfd5700d98a95d14d43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243522
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-05-04 01:05:05 +00:00
Devon Carew ed7fd8a762 [deps] rev package:characters
Change-Id: I4df60c5c0c5f3571d910ffae1b1646c46cc8fb0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243565
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2022-05-04 00:12:26 +00:00
Mark Zhou bf5690dd0c [dart2js] Removing size checks from main output unit dump info tests
These were far too sensitive to code size changes and causing unhelpful failures.

Change-Id: I5293c7d281a5db2d36af35f67966f4d47413a78a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243561
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-05-03 23:14:04 +00:00
Paul Berry ce591d17c3 Resolve deferred function literals in stages.
This change allows function literals in invocations to be inferred in
dependency order.  For example, given the following code:

    U f<T, U>(T Function() g, U Function(T) h) => h(g());
    test() {
      var x = f(() => 0, (y) => [y]);
    }

The function literal `() => 0` is inferred first, causing the type
parameter `T` to be assigned the type `int`.  Then, `(y) => [x]` is
inferred with the benefit of this type assignment, so `y` gets the
type `int`, and consequently, `U` gets assigned the type `List<int>`.

This completes the support for
https://github.com/dart-lang/language/issues/731 (improved inference
for fold etc.)

Change-Id: I48c22693720a1cc8bbf435643e863834e07f02b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243002
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-05-03 22:04:39 +00:00
Mark Zhou 9c572f08ca [dart2js] Adding closure tests for dump info members
Change-Id: I73d6e262941fa1b8278f32c3e17689e45dea4ebd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243383
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-05-03 20:53:34 +00:00
Danny Tuppeny 98d74c1d54 [analysis_server] Filter completion items by prefix before mapping to LSP classes
Change-Id: Idcc8d91903185e274524d4cb7c4e81c4a750e27e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243463
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-05-03 20:47:44 +00:00
Nicholas Shahan f372f8cbbe [tools] Allow update.py to run on mac arm machines
Change-Id: I293f493ec10465ec8c2af071aef7aebff44bdf0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241692
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-05-03 20:29:17 +00:00
Nicholas Shahan 651350bc3b [ddc] Avoid emitting dead branches in conditionals
Don't emit dead code branches that are guarded by boolean literals.

Add a single level of simplification for !true -> false, and
!false -> true.

While this might not be very common in code, it does allow for a
useful pattern in the runtime libraries. Branches can be included
into the compiled code or not based on a compile time flag.

Change-Id: Ib90e1e951cea3ef8c75b944635776b292759594a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243363
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2022-05-03 20:17:44 +00:00
Konstantin Shcheglov c27086d567 Refactor the way we build and iterate macro targets with applications.
Change-Id: Icaeeb3021c6dc716aee2aad322a66e34a6fc912f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243523
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-05-03 19:28:08 +00:00
Konstantin Shcheglov fa2bceafb8 Support for named constructors in macro annotations.
Change-Id: I1879af284cb5c20368f5fb7bc7bfb2ff23d403c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243521
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2022-05-03 19:18:24 +00:00
Konstantin Shcheglov 7824e3b8c9 A few tests for macro as getter and arguments.
Change-Id: I1e400f71364dbbc2da3007f63447f4d2b456096a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243384
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-05-03 19:17:44 +00:00