Commit graph

101825 commits

Author SHA1 Message Date
Jonny Wang 751c03b95b [docs] Add instructions for building on Fuchsia
Change-Id: Ibfbbdd8152c91ebc5ceffdcdad62b130fce0bb90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372980
Commit-Queue: Jonny Wang <jonnywang@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Jonny Wang <jonnywang@google.com>
2024-06-25 12:59:19 +00:00
Martin Kustermann 09a7e4f52b [dart2wasm] Optimize String & Byte transfer across WasmGC<->JS boundary
Leads to 30-50% improvements across variety of WasmDataTransfer.*
benchmarks.

[0] https://dart-review.googlesource.com/c/sdk/+/372660

Change-Id: I57aa9e9679e2bdb413783591f4dc9cf9ced1966e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372780
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-06-25 12:05:25 +00:00
Ömer Sinan Ağacan af9067061c [dart2wasm] Remove unused JSCM typed data lib
Change-Id: I3ba9842e431ad880186e550d8d602ee9274c9fe7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372641
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-06-25 11:00:49 +00:00
Johnni Winther 8df57398c9 [cfe] Move src/fasta/ subfolders to src/
Part of removing uses of 'fasta'.

TEST=existing

Change-Id: Ice027678e11b7da8c1a7e756a1e1c8c8284722bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372623
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2024-06-25 10:05:21 +00:00
Devon Carew 75c15c1e2e [repo] delay issue triage by 2 minutes
Change-Id: If6badbe77f5fd8099d419496dc084231eb5a852f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373020
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2024-06-24 23:50:16 +00:00
Konstantin Shcheglov 1b57d51908 Macro. Move updating types for GenericFunctionType and TypeParameter to declarations.
This saves us about 120 ms out of 2000.

Change-Id: Ib352a78b39706b07fc2ee0d5b2c3e6e77d98119c
Bug:https://github.com/dart-lang/sdk/issues/55784
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373000
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-24 22:41:39 +00:00
Ryan Macnak 452de7b098 [vm, isolate] Remove some large safepoint pauses from send-and-exit validation.
- WeakTable rehashing
 - worklist in the root set

Apply the pattern from object_graph_copy of maintaining the worklist as a heap object to avoid bloating the root set, and using a hash table that can safepoint in the middle of rehashing by not using address-based hash codes.

TEST=IsolateSendExitLatency
Change-Id: I2a632327102b0cc88ccdcffb024d813aa8e355f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372161
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-06-24 22:40:51 +00:00
Derek Xu 6209c47239 [VM/Debugger] Force valid breakpoints to resolve by ensuring functions are compiled
TEST=breakpoint tests in pkg/vm_service/test

Fixes: https://github.com/Dart-Code/Dart-Code/issues/4734
Issue: https://github.com/dart-lang/sdk/issues/55268
Change-Id: Ifb56ab9bbc062952d2b08b2feb4c7d7b87aa19f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338740
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-06-24 22:00:28 +00:00
Derek Xu 47b9e95ec7 [VM/Debugger] Prepare for Debugger::FindCompiledFunctions to return an ErrorPtr
In this CL, Debugger::FindCompiledFunctions always just returns
Error::null(), but when eager compilation of functions is implemented
(https://dart-review.googlesource.com/c/sdk/+/338740), it will introduce
the possibility of Debugger::FindCompiledFunctions truly returning
errors. So, this CL adds the error propagation logic in advance to
avoid making the eager function compilation CL too large.

TEST=this is effectively just a refactor, so CI

Change-Id: Ibedbebf19fed306c8b93c98ba71b7cc57b90e174
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369161
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-06-24 22:00:28 +00:00
Derek Xu 539d6b8665 [VM/Debugger] Delete Debugger::SetBreakpointAtLine
It is dead code. Breakpoint requests that only have a line number are just handled by passing column_number=-1 to SetBreakpointAtLineCol.

TEST=CI

Change-Id: I44fb9f805c364edb074bf9cdbd3fcbe3888b3bff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369160
Reviewed-by: Alexander Aprelev <aam@google.com>
2024-06-24 22:00:28 +00:00
Sam Rawlins 4babb9deb1 linter: Move two top-level functions to be shared extensions
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I4a9dc49c6593af899de07787fd77bc0bc9d4a6d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372184
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Sam Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-06-24 21:29:39 +00:00
Kallen Tu fbf0b08568 [cfe] Wildcard behaviour with this._ and super._.
No initializer list variable is created with this._ and super._ initializing formals.

this._ will still initialize fields and super._ will forward the argument's value to the super constructor invocation.

Bug: https://github.com/dart-lang/sdk/issues/55655
Change-Id: Id4cb25d0ecaf3518cc577e37b74a349d19418679
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372600
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-06-24 20:59:39 +00:00
Mayank Patke 56851e50e2 [dart2js] Restrict instanceof is-test specializations to non-generic
types when SNS checks are enabled.

Change-Id: I759a4ba77b74f6e0ec7c7ec65ad3ca37ed8410a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372201
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2024-06-24 20:52:43 +00:00
Ryan Macnak 537737b190 Roll Fuchsia SDK to 20.20240530.3.16.
Change-Id: I97431c303faddaed5b8fc66a588763e158649467
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372961
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2024-06-24 20:47:31 +00:00
Danny Tuppeny 4f36252fd3 [analysis_server] Support folding multiline strings
Fixes https://github.com/Dart-Code/Dart-Code/issues/5139

Change-Id: I7038568b5504b97c0bb817a608e000c268a3fae6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372902
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-24 18:47:56 +00:00
Danny Tuppeny a98c0197f4 Expose DTD constructor to pass a StreamChannel directly
+ loosen `call()` signature to allow `Object?` in param map values.

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

Change-Id: I962be849b9492d19605301dc211d780e0bd6ecf0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371900
Reviewed-by: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-06-24 18:38:26 +00:00
Konstantin Shcheglov 08b50825c4 Macro. Reuse parsed unit when merging macro results.
This saves another 160 ms.

Bug: https://github.com/dart-lang/sdk/issues/55784
Change-Id: If626d616999b85edaaa4028cbe5fc70fbc1bf86a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372960
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-24 18:16:39 +00:00
Kallen Tu ef1ec76054 [cfe] Wildcard import prefixes are non-binding.
Bug: https://github.com/dart-lang/sdk/issues/55655
Change-Id: I938c254fad2c656c9342e9cea5b146373b9f63e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372603
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-06-24 18:08:47 +00:00
Danny Tuppeny 2f5dff3586 [analysis_server] Add a test for analysis_options nested in the workspace not handling includes
See https://github.com/dart-lang/sdk/issues/56047

Change-Id: Ic61234cb9cdf30ac7d28989c77eff8048730e891
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-06-24 18:06:31 +00:00
Sam Rawlins 39497e46fc linter: Move tests for two lint rules
* lines_longer_than_80_chars
* unnecessary_brace_in_string_interps

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I75b5a5feeb863cb7463467d96ad751d6334e7cfd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371940
Auto-Submit: Sam Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-06-24 17:58:11 +00:00
Brian Wilkerson 80b0bda3de Convert the analyzer package to use the new location for mock packages
Change-Id: I097059764e999683564992b475fece4ebfb5a47b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372380
Reviewed-by: Sam Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-24 17:53:45 +00:00
Sam Rawlins 4d20dea313 analyzer: Resolve extension methods on nullable Never type
Fixes https://github.com/dart-lang/sdk/issues/55000

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ie71d4762bc294028787c28976b2e0a7e604ab2fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Sam Rawlins <srawlins@google.com>
2024-06-24 17:44:09 +00:00
Sam Rawlins 89d9912790 analyzer: Support operators in extension on a type variable type
Fixes https://github.com/dart-lang/sdk/issues/54462

Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: If0c2a29559d86830434ae9c68ae1f0da72380741
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372840
Commit-Queue: Sam Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-06-24 17:37:29 +00:00
Devon Carew 87ca13f90a [deps] rev csslib, dartdoc, http, pool, pub_semver, string_scanner, test_descriptor, test_process, tools, typed_data, webdev, yaml
Revisions updated by `dart tools/rev_sdk_deps.dart`.

csslib (23c314b..b70fef2):
  b70fef2  2024-06-20  Kevin Moore  Update and fix lints, bump min SDK to Dart 3.1 (dart-lang/csslib#204)

dartdoc (6330a13..88df88c):
  88df88c9  2024-06-21  Sam Rawlins  Remove the unnecessary Privacy mixin (dart-lang/dartdoc#3794)
  d050cb44  2024-06-20  Sam Rawlins  Make PackageGraph.allLibraries private (dart-lang/dartdoc#3792)
  7c559d41  2024-06-20  Sam Rawlins  Simplify Library.allModelElements (dart-lang/dartdoc#3793)

http (8c325b9..4d8e7ef):
  4d8e7ef  2024-06-24  Brian Quinlan  Add a note saying that we only create a single `Client`. (dart-lang/http#1234)

pool (88e4636..832c5ab):
  832c5ab  2024-06-21  Kevin Moore  update lints, require Dart 3.4 (dart-lang/pool#89)
  d107269  2024-06-20  Kevin Moore  blast_repo fixes (dart-lang/pool#88)

pub_semver (a9025f3..dfcad38):
  dfcad38  2024-06-20  Kevin Moore  bump lints and SDK dep, test wasm (dart-lang/pub_semver#105)

string_scanner (7b37c1b..e1cab8f):
  e1cab8f  2024-06-20  Kevin Moore  update lints, require Dart 3.1 (dart-lang/string_scanner#76)

test_descriptor (b23d7cc..2f19400):
  2f19400  2024-06-20  Kevin Moore  update lints (dart-lang/test_descriptor#68)

test_process (862eaf3..a7ca20b):
  a7ca20b  2024-06-21  Kevin Moore  update lints (dart-lang/test_process#60)

tools (4321aec..e660a68):
  e660a68  2024-06-24  Kevin Moore  Don't collect coverage on Windows (dart-lang/tools#276)

typed_data (d14f965..8529929):
  8529929  2024-06-21  Kevin Moore  update lints, require Dart 3.1 (dart-lang/typed_data#90)
  c90e624  2024-06-20  Kevin Moore  blast_repo fixes (dart-lang/typed_data#89)

webdev (eccc7d8..c566112):
  c5661125  2024-06-24  Kevin Moore  Drop use of deprecated APIs, bump min SDK and other dependencies (dart-lang/webdev#2449)

yaml (7873b3f..4cf24ca):
  4cf24ca  2024-06-20  Kevin Moore  update lints, require Dart 3.4 (dart-lang/yaml#167)
  7018ac8  2024-06-20  Kevin Moore  blast_repo fixes (dart-lang/yaml#166)

Change-Id: I04c6238514cb46818c3f59760e401d371e4d1ae4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372841
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-06-24 17:34:40 +00:00
Konstantin Shcheglov 6d6251528a Augment. Report AUGMENTATION_TYPE_PARAMETER_COUNT.
Change-Id: Iafd5613c7ed87f9f9aff244f0852a663bb45d642
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372562
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-24 16:50:19 +00:00
Brian Wilkerson e159bfee64 Improve the computation of the completion prefix
There are a couple of tests where the new code fails to produce a
prefix, but in those cases the prefixes are `""` and `{`, which are
not useful for filtering (and wrong for replacing). The new code does,
however, now find prefixes that the old code missed, which improves the
filtering. The changes to the tests reflect the improved filtering.

Change-Id: I3d48162ee56de1b94ecb3a88d11e8a2167fb8f2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372860
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-24 16:04:53 +00:00
Jake Macdonald 77feaada19 Add links to test status apps to the testing page
Bug: https://github.com/dart-lang/sdk/issues/56063
Change-Id: I1b6c70273d97e9d87a6f81e8f52e7c379c302448
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372740
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2024-06-24 14:22:45 +00:00
Ben Konyi 1c57c6cbae [ package:dds ] Update CHANGELOG and pubspec to 4.2.4+1 (republished 4.2.4)
4.2.4 was retracted due to an extra binary being included in the archive
that increased the package size by 10x.

Change-Id: Iebca85555e871fee22bafdd1bf547972bfe5b201
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372920
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2024-06-24 14:13:55 +00:00
Ömer Sinan Ağacan 9fbe418aa3 [dart2wasm] Use unchecked codeUnitAt in int.parse
Change-Id: I60c2a9a56ce9693061054fd72005e52fc6889aab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372901
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-06-24 13:40:08 +00:00
Johnni Winther 43452cdd6c [cfe] Remove SourceLibraryBuilder.libraryTypeParameterScopeBuilderForTesting
This helps moving `currentTypeParameterScopeBuilder` and
`_libraryTypeParameterScopeBuilder` to SourceCompilationUnitImpl

Change-Id: I1374accef8e177a4572bf21ad839a105ced91395
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372900
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-06-24 10:01:28 +00:00
Jens Johansen 40dad48ede [parser] Add more tokens
Add
 * endToken to endBinaryExpression
 * endToken to handleEndingBinaryExpression
 * endToken to endConditionalExpression
 * beginToken (and rename to endToken) on handleExpressionStatement
 * rightSeparator to handleForLoopParts

Change-Id: I55d5a0e6c795b82d8f3480365e4cc3fbb59c65b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372482
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-24 08:12:41 +00:00
Konstantin Shcheglov 755d4e0531 Macro. Parse merged code only if there are optimization edits.
This saves another 120 ms.

Bug: https://github.com/dart-lang/sdk/issues/55784
Change-Id: I4b195f977b7e49cc5b07dcecd4836b3f25399428
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372820
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-22 16:30:11 +00:00
Paul Berry 1d38fc4bf2 Add command-line tool to invoke type inference logging.
Type inference logging may be used to examine details of the
analyzer's type inference algorithm. It may be invoked as follows:

  dart pkg/analyzer/tool/type_inference_log.dart <file_to_analyze>

The log is printed to standard output.

Change-Id: I687e4a343e2ea11c6a757066c4375fd6a411e1af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-06-21 21:15:29 +00:00
Konstantin Shcheglov b3d39af94f Macro. Reuse cached ParsedFileState(s) for unlinked and augmentation.
This saves us about 150 ms, from 2350 ms.
In a macro running benchmark with 200 JSON classes in 20 libraries.

Bug: https://github.com/dart-lang/sdk/issues/55784
Change-Id: Ia2e242b38157709cd34fafc9445159676824f3d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372800
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-21 20:45:49 +00:00
Danny Tuppeny a42ae0c906 [analysis_server] Include types in closure completions when always_specify_types is enabled
Fixes https://github.com/Dart-Code/Dart-Code/issues/5149

Change-Id: Ic212e13d9fe90b4c728f92ecdf8fd5ca519047ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372426
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-21 20:43:37 +00:00
Nate Biggs 793194e2b9 [dart2js] Add retry suffix to part file multi-loader request URL.
The single loader does the same thing here:
ef59500e6f/sdk/lib/_internal/js_runtime/lib/js_helper.dart (L3257)

This retry token acts as a cache-buster for requests where the download succeeded but the part file was corrupted and failed to initialize. In that case Chrome has to re-download the file, it can't use the cached file.

I just missed passing this parameter when I added the new multiloader.

b/348644880

Change-Id: I26f4bc0da6c7e6fd714f442df8d32b8f10678047
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372700
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Auto-Submit: Nate Biggs <natebiggs@google.com>
2024-06-21 18:56:57 +00:00
Kallen Tu 523f03a749 [cfe] Local and top level function wildcard type parameters are non-binding.
This CL adds `isWildcard` to `StructuralVariableBuilder` and allows type variables in functions and function types. It also removes them from scope so they can't be used.

Bug: https://github.com/dart-lang/sdk/issues/55655
Change-Id: I26237375480318dd0c9a01cb59b3426b783ca7be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372240
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2024-06-21 17:59:29 +00:00
Martin Kustermann 5e12a4a79b [dart2wasm] Optimize Dart->JS string conversion by specializing for OneByteString vs TwoByteString
Change-Id: Ia143312dc694a10fdaa778a57631bc98d14d9c7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372484
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-06-21 17:46:30 +00:00
Konstantin Shcheglov ef59500e6f Macro. Issue 55696. Revert to syntactic NamedTypeAnnotation, update resolve() to instantiate to bounds.
Bug: https://github.com/dart-lang/sdk/issues/55696
Change-Id: I5d4507ace6186ee669d4cf8863af36a4f02cd64f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/371942
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-21 16:10:27 +00:00
Konstantin Shcheglov 35cae3a8b8 Augment. Report AUGMENTATION_EXTENDS_CLAUSE_ALREADY_PRESENT
Change-Id: I5590b68366a12129e42e19e26ac3ec4fa8330149
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-06-21 15:55:11 +00:00
Paul Berry 7d649303c2 Avoid setting node.staticType twice in PostfixExpressionResolver.
Also, add an assertion to `SharedInferenceLogWriter` to prevent
accidentally setting static types more than once in the future.

Change-Id: If96a40c5490d91b67e061158b2b92af90c05d4d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372602
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-06-21 15:44:33 +00:00
Paul Berry 63de2edc74 Build out analyzer type inference logging implementation.
The type inference logging infrastructure in the analyzer is built out
to include the following functionality:

- Tracking of type inference of annotations, collection elements,
  patterns, and statements.

- Tracking of method lookups.

- Tracking of the generic type inference process, including type
  formals, constraints that were generated (and their sources),
  partial solutions, and the final types chosen.

It is not yet possible to invoke this functionality on the command
line; I plan to introduce a mechanism for doing so in a follow-up
commit.

Change-Id: I3f592a483b272fcea74c1e31bc51f2c5c3623bc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2024-06-21 15:41:48 +00:00
Martin Kustermann 9761ccff6f [dart2wasm] Remove runtime blob to/from js string helpers, use JS<>() instead
This removes the special runtime blob for string conversions, instead we
make 2 functions for conversions use our built-in `JS<>()` support.

This will allow specializing the implementation in a future CL.

Change-Id: I06df25ed805042c0a3e2efb966eaebd1ce67dc0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372660
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-06-21 15:36:29 +00:00
Brian Wilkerson c475a7ebcd Add a method that returns the candidate suggestions
The intent of the new method is that it can be used to get the candidate
suggestions before they are sent to the suggestion builder, making it
easier for us to skip the suggestion builder (in the future) and
translate directly into the apporpriate protocol objects.

Change-Id: I4cb185f9076e559dd131870f9c3f05bc4fc883f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372601
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-06-21 15:09:08 +00:00
Ömer Sinan Ağacan 844ced8016 [dart2wasm] Move list implementations to their own library
This WasmArray-backed list classes to `dart:_list`, similar to
`dart:_string` and `dart:_typed_data`

This will allow having internally-public list members like unchecked
getters and setters that we will use in the rest of the standard
library.

This CL doesn't add anything new, just renames things.

- `dart.core._ListBase` -> `dart._list.WasmListBase`

  This is to avoid confusion with `dart.core.ListBase` (defined by Dart
  standard library), and also to be consistent with `WasmTypedDataBase`
  and `WasmStringBase`.

- `dart.core._List` -> `dart._list.ModifiableFixedLengthList`

  Similar to the above, to avoid confusion with `dart.core.List`.

- `GrowableList.ofOther` -> `GrowableList.fromIterable`

  `ofOther` sounds like it should make a growable list from another
  growable list, but the type is more general than that. To reflect what
  it actually does we call it `fromIterable`.

Tested: Existing tests.
Change-Id: I24398765e1b0d549fc70b03ba94161479c5fc54c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372622
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-06-21 14:46:58 +00:00
Johnni Winther 81badfad5d [cfe] Move LibraryBuilderImpl.becomeCoreLibrary to subclasses
This prepares for moving `SourceLibraryBuilder.addBuilder` to
`SourceCompilationUnitImpl`.

Change-Id: Ia6a8a678c21ef66a92f41fd061ef26136ab52893
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372425
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-06-21 11:00:39 +00:00
Jens Johansen efb380708d [CFE] Fix lint_suite not ignoring exports in api_unstable in presubmit
The presubmit has a different working dir than expected, making the
check not work (which has resulted in some status entries that shouldn't
have existed).
This CL sets the working directory for the presubmit making the check
work.

Change-Id: I7535050c73af6cd5ae7957c63c85fb2c3b33813d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372624
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-06-21 10:07:29 +00:00
Jens Johansen 5ad31d95bb [CFE] Fix outline_suite time-regression on using generateKernelInternal in expectation tests
After 9a9b33eb0b running the outline suite
got noticeably slower.
For whatever reason it wasn't noticed until now though.

```
$ out/ReleaseX64/dart pkg/front_end/test/fasta/outline_suite.dart --traceStepTiming
[...]
[ 05:02 | 100.0% | + 2914 | -    0 ]: outline/wildcard_variables/unnamed_optional_parameter_no_default


             check errors: 0:00:00.301055 ms
      ErrorCommentChecker: 0:00:00.455464 ms
stress constant evaluator: 0:00:00.810962 ms
              write .dill: 0:00:01.040020 ms
                    print: 0:00:01.048330 ms
                   verify: 0:00:06.864096 ms
       match expectations: 0:00:07.527595 ms
                typeCheck: 0:00:12.512297 ms
                  outline: 0:04:31.713300 ms
```

The reason is that the outline also serializes the entire component (including the platform).
This CL disables that and instead gets (back) to:

With this CL:
```
$ out/ReleaseX64/dart pkg/front_end/test/fasta/outline_suite.dart --traceStepTiming
[...]
[ 01:15 | 100.0% | + 2914 | -    0 ]: outline/wildcard_variables/unnamed_optional_parameter_no_default


             check errors: 0:00:00.347309 ms

      ErrorCommentChecker: 0:00:00.438746 ms
stress constant evaluator: 0:00:00.915786 ms
              write .dill: 0:00:01.092630 ms
                    print: 0:00:01.108090 ms
                   verify: 0:00:07.156487 ms
       match expectations: 0:00:08.019510 ms
                typeCheck: 0:00:14.013395 ms
                  outline: 0:00:41.738619 ms
```
Change-Id: I1fd7486384b34a54ec86b884f102eae6963508f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372483
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-06-21 10:06:08 +00:00
Sergey G. Grekhov 2c11a8b2cc [co19] Roll co19 to 3a1b6f75c771d62e7150f2dd69595a98fd6930f4
2024-06-20 sgrekhov22@gmail.com dart-lang/co19#2694. Add syntax tests for different expressions. Part 4 (dart-lang/co19#2720)
2024-06-20 sgrekhov22@gmail.com dart-lang/co19#2694. Add syntax tests for different expressions. Part 3 (dart-lang/co19#2718)
2024-06-20 sgrekhov22@gmail.com dart-lang/co19#2694. Update warnings_* tests. Fix errors, add more cases (dart-lang/co19#2719)
2024-06-19 sgrekhov22@gmail.com dart-lang/co19#2694. Rename syntax tests for expressions (dart-lang/co19#2717)
2024-06-18 sgrekhov22@gmail.com dart-lang/co19#2694. Add syntax tests for different expressions. Part 2 (dart-lang/co19#2716)
2024-06-18 sgrekhov22@gmail.com dart-lang/co19#2694.Add syntax tests for different expressions. Part 1 (dart-lang/co19#2715)
2024-06-17 sgrekhov22@gmail.com dart-lang/co19#2694.Add more type inference tests (dart-lang/co19#2714)

Change-Id: I5c7dc8b775b23b1073ef3ff318ac5ededdb51c4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372621
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2024-06-21 09:20:56 +00:00
Jake Macdonald 51939f1454 add type parameters when creating augmentations
Bug: https://github.com/dart-lang/language/issues/3922
Change-Id: I9d9f6ce898e16e2ed393ae77f0dbcbf9c75fb56d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372580
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-06-21 07:57:33 +00:00