These names are expected to always be the same, making
them const allows DDC to recognize that more easily.
Change-Id: I80a991e1cf50b2990fd27afb4ff3793a6135cf65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328803
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Change-Id: I554788acea66bfd148f8f2a381046e4f1acae3f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329141
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Previously the fuzzy score was only used for filtering, then we truncated using the relevance score. This change uses the fuzzy score for sorting prior to truncation (calling back to relevance if it's the same) too.
Currently, VS Code in non-web contexts does not truncate (it's set to 100,000 items) so this change will only impact web contexts (currently set to 1,000 items to reduce payload sizes). From my testing, the difference in the first 30 items that will be seen is negligible (there are some differences between the servers fuzzy score and VS Codes, but they tend to be when there are typos).
Change-Id: Ia10d1991085054cec9c0c1071a516c8aa286156c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329323
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Makes behaviour of changing leading indent or trailing newlines opt-in.
There are only slightly more uses of this method that don't want this (now opt-in) behaviour, although I think this is slightly less surprising (for example the trailing newline behaviour was to "add a trailing newline only if it didn't already exist" which I don't think was obvious).
Mostly this was just changing the defaults and all of the call sites. However, some call sites were getting the old behaviour (inc leading/trailing whitespace), but then calling `.trim()`, so I didn't add the opt-in there because it would then be removed (they won't show up in the diff because they didn't actually get any changes).
Change-Id: I2f05b3a6266aaad5ee510ce2a8bf269b26d42d5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
The default socket timeout is longer than the test timeout for some configurations.
Change-Id: Iddf60b6d40b8aa00115463fe76f1d924a93424bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329640
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Please prefer not to revert this change. Any tests that fail are release
blockers and need to be approved and urgently fixed forward. Dart 3.2
has already been cut and the version number must be updated. It is
acceptable for rolls to be blocked until the release blockers have been
resolved as P0 issues.
Remove needless version number comment from experimental_features to
remove duplicated information and simplify version updates.
Update dartdoc to a version that supports 3.3.
Change-Id: I1a19aa86e185c99e61374665f18cf24c498935a5
Tested: CQ
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329588
Commit-Queue: Slava Egorov <vegorov@google.com>
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
This is a minor refactor that adds an explicit test for generating minimal edits without going through the formatter.
There's no change in behaviour - this is just to reduce the noise in a future CL for inserted/deleted commas to be supported in computing minimal diffs.
Change-Id: I3d254bd7a90ccc7b11700b54110ece040e837363
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329601
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Tests valid and invalid extension type representation type
and representation object reference declarations.
Bug: https://dartbug.com/53625
Change-Id: I56b61e4c7e691db975da286b31a93a0635257088
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328160
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
This reverts commit 81aaf6c6c4.
Reason for revert: regression in G3: b/303734572
Original change's description:
> Bump version to 3.3.
>
> Remove needless version number comment from experimental_features to
> remove duplicated information and simplify version updates.
>
> Tested: CQ
> Change-Id: I864bfc44070136406e95fdaf4d83f491b2c95943
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329460
> Reviewed-by: Alexander Thomas <athom@google.com>
Change-Id: Ie7dca3106345ee7949ccd13ab4765998926c0abc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329603
Commit-Queue: Ilya Yanok <yanok@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This logic is responsible for creating a readable deobfuscated stack
from ddc and dart2js JavaScript stack traces. The logic was removing the
query parameter of URLs, but accidentally matched multi-line strings and
applied the regexp in invalid contexts (like the error message itself).
Excluding `\n` from the regexp pattern prevents this issue.
Example input (obfuscated error):
```
window.onerror called:
http://127.0.0.1:35679/root_build/gen/utils/ddc/stable/sdk/amd/dart_sdk.js:5082:
Uncaught Error
Error: Expected a value of type 'FutureOr<FileSystem>?', but got one of type 'LegacyJavaScriptObject'
at Object.throw_ [as throw] (http://127.0.0.1:35679/root_build/gen/utils/ddc/stable/sdk/amd/dart_sdk.js:5082:11)
at Object.castError (http://127.0.0.1:35679/root_build/gen/utils/ddc/stable/sdk/amd/dart_sdk.js:5041:15)
at Object.cast [as as] (http://127.0.0.1:35679/root_build/gen/utils/ddc/stable/sdk/amd/dart_sdk.js:5385:19)
at dart.NullableType.new.as (http://127.0.0.1:35679/root_build/gen/utils/ddc/stable/sdk/amd/dart_sdk.js:7243:60)
at _AsyncCompleter.new.complete (http://127.0.0.1:35679/root_build/gen/utils/ddc/stable/sdk/amd/dart_sdk.js:31216:28)
at http://127.0.0.1:35679/root_build/gen/utils/ddc/stable/sdk/amd/dart_sdk.js:99073:19
```
Example deobfuscation before (see truncated error and first frame was dropped accidentally):
```
window.onerror called:
out/ReleaseX64/gen/utils/ddc/stable/sdk/amd/dart_sdk.js:5082:
Uncaught Error
Error: Expected a value of type 'FutureOr<FileSystem>:5082:11)
at Object.castError ../../../../../../dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 127:3
at Object.cast ../../../../../../dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 818:12
at dart.NullableType.new.as ../../../../../../dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart 425:9
at _AsyncCompleter.new.complete ../../../../../../dart-sdk/lib/async/future_impl.dart 42:31
at <fn> ../../../../../../dart-sdk/lib/html/dart2js/html_dart2js.dart 33424:16
```
but after (error and first frame recovered):
```
window.onerror called:
out/ReleaseX64/gen/utils/ddc/stable/sdk/amd/dart_sdk.js:5082:
Uncaught Error
Error: Expected a value of type 'FutureOr<FileSystem>?', but got one of type 'LegacyJavaScriptObject'
at Object.throw_ out/ReleaseX64/gen/utils/ddc/stable/sdk/amd/dart_sdk.js 5082:11
at Object.castError ../../../../../../dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 127:3
at Object.cast ../../../../../../dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 818:12
at dart.NullableType.new.as ../../../../../../dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/types.dart 425:9
at _AsyncCompleter.new.complete ../../../../../../dart-sdk/lib/async/future_impl.dart 42:31
at <fn> ../../../../../../dart-sdk/lib/html/dart2js/html_dart2js.dart 33424:16
```
Change-Id: Id9f37efe9bdacc63aae3b24ebe0602a8ea7cf8fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328765
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Remove needless version number comment from experimental_features to
remove duplicated information and simplify version updates.
Tested: CQ
Change-Id: I864bfc44070136406e95fdaf4d83f491b2c95943
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329460
Reviewed-by: Alexander Thomas <athom@google.com>
Typed array accessors are quite small, and inlining them often leads to
avoiding boxing the return values in `operator []` and the set value in
`operator []=`.
(Native typed array classes already have these inline pragmas)
Change-Id: Ib15dda93687b5becd1dfa92d34d9d28a75df2e07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329100
Commit-Queue: Ömer Ağacan <omersa@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
We are going to enable waitFor in 3.2 release
and disable it in 3.3.
This makes migration smoother for users that need
to use Isolate.resolvePackageUriSync which is
only added in 3.2.
The actual removal timeline remains the same:
we will remove waitFor in 3.4.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/52121
Change-Id: I1ab7d07f874b3d914f070f1c358fcffaa96da28b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329420
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
This splits the build method into smaller classes responsible for each
part of the building/validation process.
Change-Id: I05c5cbef91c75a168dc8e7ec6d91bf484a0a7451
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329462
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This adds a sealed class TypeName with 4 subclass that incapsulate the different ways the name of a named type, like an interface type, can be passed to [NamedTypeBuilder].
This normalizes the handling of names in NamedTypeBuilder and avoids
leaking [Token]s through the use of [Identifier] and [QualifiedName] in [NamedTypeBuilder].
Closes#53686
Change-Id: I6034559390884acc3cb06cd151fa386d717f8f96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328860
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Change-Id: I582f956cd4b712203c2f6dd630b4e1384040446d
Tested: analysis clean (this is a lint only related change)
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329400
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Adds a tests that checks that no [Token] objects are live after
building outline and full component.
Change-Id: I19340baed30ac5e627eff85497334c2db700ed83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329106
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
C++20 will automatically generate an operator== with reversed operand order, which is ambiguous with the written operator== when one argument is marked const and the other isn't.
TEST=ci
Change-Id: Ie4f7b293c1e68462f08335f4d4e9a8146dcc0e15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329105
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This class is no longer needed since noSuchMethod-forwarders are
now computed using CombinedClassMemberSignature.
Change-Id: Id3a8cd66d1b418d74fc795dc500bfd8aebb4866e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329107
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
The same mechanism is now also used to handle (not allowed) duplicate
declarations.
Change-Id: I814abcb15b7f2e7248701f754b7af1fdcb74f31a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Methods and functions annotated with `@FfiNative` and `@Native` are
validated to ensure their Dart signature matches the one from the
annotation.
For those functions, the lengths of the parameters is compared two
times: In `_validateCompatibleFunctionTypes` and in `_checkFfiNative`,
with the latter being responsible for emitting a more-specific error
message. However, it fails to consider that a single `VarArg` reference
in the native function type would get expanded to multiple formals in
Dart. This fixes the problem by properly expanding variadic types in
`_checkFfiNative` as well.
Closes https://github.com/dart-lang/sdk/issues/53680
Bug: 53680
Change-Id: Ifb93eba8ac9f39697dc415dc337110109449e366
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329360
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This change updates the FuchsiaEmulatorCFv2 to start the daemon and
emulator before executing the tests.
Meanwhile, instead of "dummy", this change uses "echo" as the dummy
command to allow
`FUCHSIA_CFV2=1 tools/test.py --progress=status
-nvm-fuchsia-release-x64 ffi`
running.
This change requires
`"fuchsia_sdk_version": "version:15.20230909.2.1",`
in DEPS to function, which isn't included due to the CFv1
implementation currently running.
Bug: #38752
Change-Id: I5011b6ff39b73955002431650d973d6adcfa6246
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328766
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>