Commit graph

91567 commits

Author SHA1 Message Date
Paul Berry 3713c0e264 Patterns parser: prohibit variable/identifier patterns named when/as.
In https://dart-review.googlesource.com/c/sdk/+/299400, the parser was
adjusted so that it no longer accepts `when` and `as` as the names for
variable patterns in cases where there is a possible ambiguity
(e.g. `int when` is not accepted as a pattern because `int` is a
legitimate pattern, therefore `when` could introduce a guard
clause). This change further prohibits `when` and `as` from being the
names of variable patterns or identifier patterns even in the case
where there is no ambiguity. This is in line with the discussion at
https://github.com/dart-lang/sdk/issues/52199#issuecomment-1526297771,
and the spec change at
https://github.com/dart-lang/language/pull/3033.

Three new error codes are introduced, to cover the three circumstances
in which `when` or `as` might be used illegally: in a declared
variable pattern, in an assigned variable pattern, or in an identifier
pattern. I've also added analyzer tests to ensure that the parser
recovers from these errors nicely. Unfortunately, nice error recovery
is only feasible in the non-ambiguous cases.

I've also updated the language test expectations in
`tests/language/patterns/version_2_32_changes_error_test.dart` to
reflect the new error messages, and added a few more examples of uses
of `when` and `as` that are still permitted.

Fixes #52260.

Bug: https://github.com/dart-lang/sdk/issues/52260
Change-Id: I229f627aa639659c30b83c74895759207da279f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301482
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-05-08 19:06:02 +00:00
Devon Carew 33de03891f [deps] rev http, test
Revisions updated by `dart tools/rev_sdk_deps.dart`.

http (f581ff7..61dcb91):
  61dcb91  2023-05-04  Brian Quinlan  Switch to "dart format" from "flutter format" (#922)

test (9484592..1d65501):
  1d65501b  2023-05-05  Jackson Gardner  Don't do direct casts to int to prevent dart2wasm breakages. (#2007)
  b6b4ddc5  2023-05-04  Nate Bosch  Advise against eager matcher->checks migration (#2009)
  4ef35d59  2023-05-04  Jacob MacDonald  Re-enable wasm tests (#2008)

Change-Id: I457d009bf91da365d21cfb74e664d087a4aa6329
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302020
Auto-Submit: Devon Carew <devoncarew@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-05-08 17:33:25 +00:00
yanok@google.com 6e18b083dd Support non-function type aliases
I'm actually not sure we are doing the right thing for general
aliases (that can now be nested arbitrarily deep), but at least
this commit avoids throwing an exception.

Change-Id: Ide3f7035b476f79fff5c542e2ddbb342045a874e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301983
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Ilya Yanok <yanok@google.com>
2023-05-08 15:50:28 +00:00
yanok@google.com c15d215653 Don't force target type equality for null-aware extension method calls
Null-aware calls, like `v?.extMethod()` don't require `v` to be
non-nullable, even if `extMethod` was declared on a non-nullable type.

Tested: added a new test.
Change-Id: I113ecde21e480bcd467367d0954b721c2ad9f7e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301982
Reviewed-by: Paul Berry <paulberry@google.com>
2023-05-08 15:50:28 +00:00
Ilya Yanok a84e6461b2 Fix a test failing at HEAD
It looks like it's failing as a result of my previous changes
to make public function/method arguments nullable by default.

I probably missed it, since it doesn't run with assertions
enabled.

Change-Id: Ifcf045d778302a0be771c3a75c94cec97cbf8060
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301981
Reviewed-by: Paul Berry <paulberry@google.com>
2023-05-08 15:50:28 +00:00
Konstantin Shcheglov 757d9ae199 Issue 52280. Use the URI as LibraryElement.toString()
Bug: https://github.com/dart-lang/sdk/issues/52280
Change-Id: I15fa5a9cdc2017d91f6d75da17430c060624695e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301726
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-08 15:41:23 +00:00
Konstantin Shcheglov 44ba2eba08 Issue 52258. Ignore 'int' and 'double' pairs, are the same in JavaScript.
Bug: https://github.com/dart-lang/sdk/issues/52258
Change-Id: I01f167bf597f11cb8dec7864c3074d16ad44c2d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301725
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-08 15:39:52 +00:00
Daco Harkes 8beb778e64 [analyzer/ffi] Fix spurious FFI errors
Closes: https://github.com/dart-lang/sdk/issues/52298
Change-Id: Ibfccd34a877d5786f4720790b5ff88dcc643c9d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-05-08 15:16:05 +00:00
Derek Xu 8ccece520f [DDS] Prepare to publish package:dds 2.8.1
Fixes: https://github.com/dart-lang/sdk/issues/52270
Change-Id: I08ef372653adfd04eab9d45da225a5bfda74531c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302000
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-05-08 15:14:44 +00:00
Lasse R.H. Nielsen 7536f86775 Add tests for behavior of class modifiers through legacy libraries.
Change-Id: Iebdedf29cfe90c927c84af1564764ce6477d53af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301442
Reviewed-by: Kallen Tu <kallentu@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-05-08 15:05:11 +00:00
Konstantin Shcheglov bf5bdc97ff Issue 52296. Fix NPE in AddTypeAnnotation, when formal parameter without name.
Bug: https://github.com/dart-lang/sdk/issues/52296
Change-Id: I6f3952faa9f3fc9e7f9e1d83c4699222be8dbcdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301731
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-08 14:54:48 +00:00
Konstantin Shcheglov c63263cbf5 Issue 51855. Add debug output.
Bug: https://github.com/dart-lang/sdk/issues/51855
Change-Id: Ifd8f3cf1f4e82536b475fb7460c27d1ba73672e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301732
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-08 14:47:32 +00:00
Konstantin Shcheglov 8c97d0cfe3 Add static invocation case for EXTENSION highlighting.
Change-Id: Ibc4065b95ac8902f50fafe14ecd451abf8fb3c8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301733
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-08 14:40:38 +00:00
Konstantin Shcheglov 036b8cafad Add AnalysisError.tmp() constructor, deprecate the default one.
Bug: https://github.com/dart-lang/sdk/issues/51985
Change-Id: I1204c71a4c5ea62d32d65662ecb5274dacb0bfae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301730
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-08 14:39:29 +00:00
William Hesse a56b60e7b6 Remove web_components from DEPS
This repository is not used in the Dart SDK, and has been archived on GitHub.

Five years ago, it was still used in some tests, and was kept because of
that: https://dart-review.googlesource.com/c/sdk/+/49261

Those references are now gone.

Bug: b/278318858
Change-Id: Ife5f096b4057a25dc62f36d79ca54eda77f92287
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301960
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-05-08 13:54:29 +00:00
Alexander Thomas b2c799f586 [infra] Upgrade firefox to the latest stable
Cq-Include-Trybots: luci.dart.try:dart2js-linux-firefox-try,ddc-linux-firefox-try
Fixes: https://github.com/dart-lang/sdk/issues/52187
Change-Id: I601350ab25a192dec36f17277dbd3e08f255e014
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301521
Reviewed-by: William Hesse <whesse@google.com>
2023-05-08 09:37:48 +00:00
Johnni Winther 3e0672ae7c [_fe_analyzer_shared] Handle nullable type variables in exhaustiveness checking
Closes #52212

Change-Id: Ie81f873c59db7859c5a1075563d5c0ac00c94bfb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301441
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2023-05-08 09:15:01 +00:00
Lauren N. Liberda 0ba6f0637b recognize armv8l host as arm
Bug: https://github.com/dart-lang/sdk/issues/52290
Change-Id: I24185ca2a17133f32473f3e81323bc3389c0c8f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301900
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-05-08 08:13:17 +00:00
Johnni Winther 13c4ad23c5 [kernel] Add SwitchStatement.expressionType
This adds the static type of the switch statement expression to
the AST to better support optimizations based on the possible
runtime values of the switch expression.

TEST=existing

Change-Id: Ief35b687150401100d8c96721a026e9f0911b3b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301063
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-05-08 07:39:02 +00:00
Konstantin Shcheglov f572144809 Issue 52271. Report FINAL_CLASS_EXTENDED_OUTSIDE_OF_LIBRARY when via library before class-modifiers.
Bug: https://github.com/dart-lang/sdk/issues/52271
Change-Id: I94049f8702647fc604c42ce353afce9d19322d8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301506
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-06 17:16:28 +00:00
Brian Wilkerson 1906adea11 Rewrite completion tests for extension methods
Change-Id: Icda038d078519f7eb5018d7f6089620dd6931c52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-05 21:17:19 +00:00
Nicholas Shahan b18efe2891 [ddc] Update type parameter representations
Previously type tests involving type parameter types would
be replaced with native primitive tests when the type parameter
was bounded by a type with a native representation. This isn't
always correct because the type parameter can always be inhabited
by the bottom type at runtime. So code like `x is T` would be true
when `T` is instantiated as `Never` and `x` is any primitive value
like a number, string, or bool.

This change removes the incorrect optimization that allowed type
parameters to be replaced with their bound when that bound was
represented by a native type when performing an `is` operation.

Fixes: https://github.com/dart-lang/sdk/issues/52243
Change-Id: I57cebef7bb533d71831ef84415b3d91369758476
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300820
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2023-05-05 21:13:40 +00:00
Nicholas Shahan dd2fb672fd [ddc] Add regression test for type test issue
In DDC the types [num], [int], [double], [String], and [bool] used in 
bounds caused an "optimization" in type tests that was incorrect when 
passing a subtype as the type argument.

Issue: https://github.com/dart-lang/sdk/issues/52243

Change-Id: I0ae8d21c907cd923d62dbae257085545840a8cdf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301140
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2023-05-05 21:13:40 +00:00
Brian Wilkerson aa75db8cb2 Fix race condition in analytics
I don't know how to write a test that ensures that we will attempt to
modify the collections after entering the for loop. Suggestions welcome.

Bug: https://github.com/dart-lang/sdk/issues/52263
Change-Id: Ifc13e80594bd08f6c485d8898eb7c75b31172992
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301780
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-05 21:02:29 +00:00
Konstantin Shcheglov f90c3d0423 Issue 52272. Report DEPRECATED_MIXIN_FUNCTION in more places.
Bug: https://github.com/dart-lang/sdk/issues/52272
Change-Id: I02133f8685adf6a1e4fa16288948cc31afeb1bd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301560
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-05 20:02:28 +00:00
Vyacheslav Egorov dd2f556730 [vm] Reoder CFI directives in generated assembly.
This should not actually matter, but we discovered
that LLVM code responsible for emitting compact unwind information
expects this specific ordering of CFI directives. If we don't
follow the order then LLVM fails to emit compact unwind info and emits
__eh_frame instead which is very large.

See https://github.com/llvm/llvm-project/issues/62574.

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

Tested: manually via pkg/vm/tool/precompiler2 --build-assembly and objdump --unwind-info
Change-Id: Idb1f4f64afdaa7206bf43adf1685bb1f4086217f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301740
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2023-05-05 18:39:09 +00:00
pq f03e5b424a remove invalid failing test
(This test makes no sense.)

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

Change-Id: I9fb25a9f6252f1b67e9b559997d26683fd8f758b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301720
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-05-05 17:56:00 +00:00
Sigmund Cherem 1c59f30d7b [dart2js] fix crash with records and null-assertions.
Our helper function to detect whether a null-assertion was required
didn't include a case to check for record types.

The null-assertion flag is likely to go away soon, since it's
only valuable for mixed applications.

Fixes #52276

Change-Id: Ief4515b8c3eaae5343012da4220e6051bb5a2f19
Fixed: 52276
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301680
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
2023-05-05 17:20:13 +00:00
pq 7e175b7863 + completion suggestions for pubspec "screenshots"
Fixes: https://github.com/dart-lang/sdk/issues/50179

Change-Id: I34a07d3ad28085d75d4ac2fa24f5b4d2e2dad7b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301483
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-05 16:54:24 +00:00
Konstantin Shcheglov 4d6f49b1cd Update ExtensionOverride to use ImportPrefixReference and name token.
Change-Id: Ifc5852c775a95908992d33a7949b4f4bea396d66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299920
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-05 15:42:36 +00:00
Stephen Adams d3da4311c0 [dart2js] Lower String.codeUnitAt to charCodeAt
Change-Id: Id4408a761304fc2fcb7ce3bd353c626958971ffb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300500
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-05-05 15:27:11 +00:00
Sergey G. Grekhov 7cf3aa90c9 [co19] Roll co19 to 742378dde137d8d35e726640acf93164e0be59f8
2023-05-05 sgrekhov22@gmail.com Fixes dart-lang/co19#2036. Mixin restrictions tests updated according to the changed spec (dart-lang/co19#2037)

Change-Id: Id03b1fbded64516ae973ba7ab8142b7cdfbd5f66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301600
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-05-05 07:51:51 +00:00
Alexander Thomas 814fd2c7a3 [infra] Update chrome to 113.0.5672.63
This switches the browser version to Chrome for Testing.

Cq-Include-Trybots: luci.dart.try:dart2js-linux-chrome-try,dart2js-mac-chrome-try,dart2js-minified-csp-linux-chrome-try,dart2js-win-chrome-try,ddc-canary-linux-chrome-try,ddc-linux-chrome-try,ddc-linux-chrome-unsound-try,ddc-mac-chrome-try,ddc-win-chrome-try
Change-Id: Id1bdacbadeab6eb34a535a31daac953fd3454da8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301520
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-05-05 06:45:50 +00:00
Konstantin Shcheglov 40de1ab1ab Issue 46514. Report an error for using extension methods in a prefix or binary constant expressions.
Bug: https://github.com/dart-lang/sdk/issues/46514
Change-Id: I59ed3bd754043302632f31aedeaedd7824b8a8c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301505
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-05 02:31:19 +00:00
Mark Zhou b6870138ee [ddc] Extending library-to-module resolution to include libraries referenced in the current component
Required for upcoming deferred loading changes.

Our previous only stored this resolution logic for all componets except the
current component, which resulted in some empty deferred loads when referencing
modules in the main component.

Also adds a small type signature update missed in a previous commit.

Change-Id: I8511a39b26e1864919cc4882a6c008d2010354a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299381
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2023-05-05 01:14:41 +00:00
pq 3edd793682 + pubspec "topics" code completion suggestions
See: https://github.com/dart-lang/sdk/issues/52256

Change-Id: I06ed28bf7280e5c6d8762d73b0d7b085a6ca08c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301181
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-04 22:28:19 +00:00
Kallen Tu 95565e28e2 [tests] Language tests for errors when implementing a 2.19 class that implements a core library base or final class.
Bug: https://github.com/dart-lang/sdk/issues/52078
Change-Id: If97895b9560475f11e8236de87ad5880bdee97c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300880
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-05-04 20:53:42 +00:00
Derek Xu 33ab02b064 [DDS] Add getPerfettoVMTimelineWithCpuSamples RPC
Change-Id: I3d8e5c48f5482e787ab9d561692d416c50f37a8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301541
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-05-04 20:23:09 +00:00
Derek Xu cd83aa8494 [VM/Service] Prepare to publish package:vm_service 11.5.0
TEST=`dart pub publish --dry-run`

Change-Id: I6ef1c8175f39a086716be859068518d124124718
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301540
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
2023-05-04 20:20:58 +00:00
Joshua Litt 80e7018919 [dart2wasm] Minor JS interop optimization.
Change-Id: I4255100dcfea350d818d05794fb5fff2c3345b86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301502
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2023-05-04 20:03:08 +00:00
Ömer Sinan Ağacan e20d2d2103 [dart2wasm] Fix completer.future type in for-in lowering
Currently the `InstanceGet` node result type for for
`Completer<bool>.future` is `Future<bool> Function()`, but it should be
`Future<bool>`.

This causes problems in CL 301020 where we generate temporaries for
nested `await` expressions and use the expression type for the types of
those temporaries. Incorrect expression type in `completer.future`
causes a temporary with incorrect type to be generated.

Change-Id: Ib8193c66afee9454a275c00fb958c11fd35cd3eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301382
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2023-05-04 19:15:28 +00:00
Sergey G. Grekhov 6d903906f3 [co19] Roll co19 to 794313da70f2b8c1150ffcbf2fbf8746649ab09f
2023-05-04 sgrekhov22@gmail.com Fixes dart-lang/co19#2034. Fix roll failures, add issues numbers (dart-lang/co19#2035)
2023-05-03 sgrekhov22@gmail.com dart-lang/co19#1401. Async for-in tests for patterns (dart-lang/co19#2032)
2023-04-28 sgrekhov22@gmail.com dart-lang/co19#1959. Grammar tests added (dart-lang/co19#2031)
2023-04-28 sgrekhov22@gmail.com dart-lang/co19#1959. Versioning tests added (dart-lang/co19#2029)

Change-Id: Ic29913ebd7260c4069e6baa27a797219ce12d956
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301440
Reviewed-by: Alexander Thomas <athom@google.com>
2023-05-04 18:49:13 +00:00
Alexander Markov c1f9930f5b [vm] Restore InstanceKind.TypeRef in the VM-service API for backwards compatibility
TEST=doc/comment change
Change-Id: I0fcb9d418a9c95e6ce57a03eb693aefb9e245d2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301501
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2023-05-04 18:04:13 +00:00
Devon Carew eecd3013aa [deps] rev collection, crypto, pub_semver, tools, yaml
Revisions updated by `dart tools/rev_sdk_deps.dart`.

collection (26e3e67..bf27520):
  bf27520  2023-05-04  Michael Thomsen  Add topics to pubspec (#285)

crypto (77491f5..c5403c8):
  c5403c8  2023-05-04  Jonas Finnemann Jensen  Prepare release with topics (#148)

pub_semver (860e3d8..c3e56d1):
  c3e56d1  2023-05-04  Jonas Finnemann Jensen  Prepare release with topics (#86)

tools (b55f0d4..6c68bca):
  6c68bca  2023-05-03  Elias Yishak  Clear contents of persisted files on opt out (#87)

yaml (56dfaf4..54e8284):
  54e8284  2023-05-04  Jonas Finnemann Jensen  Prepare release with topics (#144)

Change-Id: Ic2e7e6c986eb3e33b655256603e34da706c60ba8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301500
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2023-05-04 17:45:52 +00:00
Srujan Gaddam 0383b389db [dart:js_interop] Expose dart:js_interop through dart.dev
Closes https://github.com/dart-lang/api.dart.dev/issues/91

dart:js_interop_unsafe is documented, but dart:js_interop is not.
Also updates library documentation for both libraries.

CoreLibraryReviewExempt: Documentation of backend-specific library.
Change-Id: I0faff9f7d7fed134e203558de53ad3313eb43b31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301260
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2023-05-04 17:41:53 +00:00
Paul Berry a29487d803 Add tests for proposed version 2.32 changes to patterns.
Bug: https://github.com/dart-lang/sdk/issues/52199
Change-Id: I04fcac4a2b9a7e49a0231441feb764a022dd5ab8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300320
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-05-04 17:28:50 +00:00
Brian Quinlan 32abc0a682 Add a note saying that calls to SecTrustEvaluate should be removed
Bug: https://github.com/dart-lang/sdk/issues/47820
Change-Id: I3c2321bbbd77d789b4021162f1add98a71b96cd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296424
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2023-05-04 16:43:06 +00:00
Konstantin Shcheglov 193316584f Issue 52255. Avoid crashing in AddExplicitCast when the expression is not real.
Bug: https://github.com/dart-lang/sdk/issues/52255
Change-Id: I7ae2fd183cbd73b9d9bb4e5c4dc13e1c0c0ef062
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301201
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-05-04 16:19:29 +00:00
Srujan Gaddam ceca7aae56 [pkg:js] Update min sdk version to 3.1.0-66.0.dev
This is the minimum version with this CL:
c4d354dc2a.
Since this CL removes package:js annotations and redefines the meaning
of dart:_js_annotations @JS annotation, we need to make sure new
versions of the package don't run with old versions of the SDK.

Change-Id: Id8af568fc5b65737c6dd69359e51abae8cc43e9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301280
Commit-Queue: Joshua Litt <joshualitt@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2023-05-04 15:56:41 +00:00
Jens Johansen adb38d2eca [CFE] Create maps in scopes lazily
When compiling `compile.dart` 74054 non-const scopes are created;
~78% have empty locals and ~99% have empty setters.
This CL creates the maps lazily instead, thus potentially saving ~130k
map creations (and possibly an unknown number of lookups in empty maps
etc).

In measurements (on AOT when compiling `compile.dart`) this has resulted
in changes in runtime ranging from -1.81601% +/- 1.39701% to
-4.60653% +/- 1.68463%, the latest run gave this:

Difference at 95.0% confidence
        -0.151 +/- 0.0557737
        -3.90231% +/- 1.44137%
        (Student's t, pooled s = 0.0871402)

Change-Id: Ic65eeca253dccb871585c221798b59852de80616
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301064
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-05-04 12:35:27 +00:00