Commit graph

91421 commits

Author SHA1 Message Date
Nate Biggs b9c73fdf23 [dart2js] Update switch block local handling to correctly propagate types that fall through the block.
Fixes #52170

Change-Id: I7c473c3101d446eb17433d583bfe266bf6f193d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298760
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-04-27 19:35:45 +00:00
Joshua Litt 47b7c1f31d [js] Add js_interop_unsafe library.
CoreLibraryReviewExempt: Web only library.
Change-Id: I4d6007e0731ecae81fcc614168baee7d5e662fd8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293743
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2023-04-27 18:51:49 +00:00
Nate Biggs a6f543e50a [dart2js] Repro for issue 52170.
Type inference is not tracking the type of 'local' correctly through the switch statement into the inner return. The same code without the for loop does work correctly though.

Change-Id: I0b1b4741e4ff17c22dec3383defb412f5fff0836
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298980
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-04-27 18:15:48 +00:00
Nicholas Shahan a7854364a6 [docs] Fix small typo in code example for Function
Change-Id: Ia762b823c51724229c0eb452a02885ff0f8bc7af
CoreLibraryReviewExempt: Changes documentation only.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299140
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-04-27 17:07:38 +00:00
Nicholas Shahan 9d0781bd9b [ddc] Refactor NSM error tests
Change-Id: Id88b6809736320b6ae098f40f16ced218649a385
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297181
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-04-27 16:36:58 +00:00
Konstantin Shcheglov 58e48de282 Issue 52175. Support for ConstructorDeclaration in 'Remove unused element' quick fix.
Bug: https://github.com/dart-lang/sdk/issues/52175
Change-Id: I7c5a237fc9a358488e4431d4785ec51b0322f66a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-27 16:00:12 +00:00
Alexander Aprelev 63bc3a685e [gardening] Remove test from stress testing.
The test was removed in https://dart.googlesource.com/sdk/+/4bfb196287ed2c746382c87dee38c3f17b02ef41.

TEST=ci

Change-Id: I97654b03f0e1147c5c0cd3bade2842f096e2d50a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299120
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-04-27 14:57:58 +00:00
Danny Tuppeny 0588afe783 [analysis_server] Add a script to print tests marked @FailingTest() referencing closed GitHub issues
Change-Id: I8e68b70c4f271d1610f955cf22dfe9523d7f7ca2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298861
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-04-27 14:46:48 +00:00
Jacob Bang 2140dac6cb Remove Gitter.im from Issue Template #52188
Closes https://github.com/dart-lang/sdk/pull/52196

GitOrigin-RevId: 5682ea5c51970ea42e7f004385d19cebf62ba2a2
Change-Id: I5cdb132543c86c97720d7852551c162cac359a9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299060
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-04-27 13:49:22 +00:00
Johnni Winther bfda964ab8 [cfe] Add BodyBuilderContext
This adds a BodyBuilderContext to separate the BodyBuilder from its
[member], [declarationBuilder] and [sourceClassBuilder] fields. The
latter two are fully removes and trivial uses of [member] have been
removed.

This is a step towards a more clean implementation of inline class
members. The plan is to have the members create their own
BodyBuilderContext to use in the BodyBuilder which should the be
agnostic about the builders of its context.

Change-Id: Ic3b29693dd26aa8c57a9ac175b4a07ce4b0a15d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298860
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-04-27 09:40:39 +00:00
Alex Li fae49c0514 Improve comments of Directory methods
Closes https://github.com/dart-lang/sdk/pull/52194

GitOrigin-RevId: d6684f771db36b917b30d789785f3f883a76fad3
Change-Id: Ie6a172e7bf818368fe5557fec8b7b9eb1e7de8b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298841
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
2023-04-27 09:40:30 +00:00
Ryan Macnak 4c2ec2ef45 [infra] Remove configurations for legacy QEMU.
Change-Id: Iec8bff7573c2b9d7544511916c8e1c0fc3859398
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296063
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-04-27 09:39:51 +00:00
Ryan Macnak 07326f7762 [infra] Add configurations for NNBD QEMU.
Change-Id: Id3bb6d1b09ccbfe445d2f5132e1f3b07b4edd852
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296060
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-04-27 09:39:51 +00:00
Oleh Prypin 7bbf7ff43e Revert "[cfe] Enable verification in platform compilation"
This reverts commit 20e0ddf130.

Reason for revert: breakages in google3

Original change's description:
> [cfe] Enable verification in platform compilation
>
> Closes #32530
>
> Change-Id: I5a44e211a4b203e4879dbc8f6bf4bbec5abf51f3
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298820
> Reviewed-by: Jens Johansen <jensj@google.com>
> Commit-Queue: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Nicholas Shahan <nshahan@google.com>

Change-Id: Idb2c30d93ad385431734c4a4e884d3d53be76b2b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299040
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Oleh Prypin <oprypin@google.com>
Auto-Submit: Oleh Prypin <oprypin@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-04-27 08:43:00 +00:00
Johnni Winther 20e0ddf130 [cfe] Enable verification in platform compilation
Closes #32530

Change-Id: I5a44e211a4b203e4879dbc8f6bf4bbec5abf51f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298820
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-04-27 07:34:39 +00:00
Jens Johansen 255d755975 [CFE] Cache calls in type inference that almost always creates a FunctionType
InstanceAccessTarget calls "base.getGetterTypeForMemberTarget" a lot;
this CL caches the result which is almost always a new FunctionType,
thus creating fewer FunctionTypes.
When compiling compile.dart ~29% fewer:
Before this CL, compiling compile.dart created a little over 217k
FunctionTypes (down in a previous CL from almost 263k); with this CL
"only" ~153.5k FunctionTypes are created.

Change-Id: Ib110ed5e0d152a3b86044f20dc50f0924a083f46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298601
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-04-27 07:30:41 +00:00
Jens Johansen f72b7ae86f [CFE] Don't create new 'unknown' FunctionTypes for each TypeInferrerImpl
When compiling "compile.dart" this creates ~17% fewer FunctionTypes
(from almost 263k to a little over 217k).

Change-Id: I0090c287ce427b298897846de03679f562223e63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298581
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-04-27 07:14:51 +00:00
Konstantin Shcheglov ea2d6a7659 Issue 52177. Fix rename refactoring for type parameter of a class.
It does not work for function / method type parameters though.

Bug: https://github.com/dart-lang/sdk/issues/52177
Change-Id: I51ae5379425e156640ae32d0cea6fd59cdc62b15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298960
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-04-27 04:51:26 +00:00
Helin Shiah 5ef021b116 Add debug adapter to DAP
Change-Id: I5bacd460175a5b2e86326f7501d7f250bbe3ab0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292060
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
2023-04-27 01:19:57 +00:00
Alexander Aprelev 86d754690a [vm/isolates] Put limit on how many isolates are suspended.
Fixes https://github.com/dart-lang/sdk/issues/52154
TEST=ci

Change-Id: I6f620113232cf8f771dd73be334ace0e385784f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297920
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2023-04-26 22:18:51 +00:00
Konstantin Shcheglov 97a762b083 Remove debug output from analysis_server/ tests.
Change-Id: Ia358d4f51c605ca66e5111769d1f716559251f63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298780
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-26 19:58:48 +00:00
Alexander Aprelev 4b7de54e03 [vm/regex] Pick a fix for unicode negated range RegExp.
Pick up v8 fix https://chromium-review.googlesource.com/c/v8/v8/+/3802690.

Fixes https://github.com/dart-lang/sdk/issues/52182
TEST=corelib/regexp/regexp_test

Change-Id: I01057ec5c8babdafc06ddeea3db48e14ae7c5357
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298700
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-04-26 19:46:06 +00:00
Devon Carew ef0ad396b5 [deps] rev mockito, test, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

mockito (28e8eda..f851e17):
  f851e17  2023-04-26  Ilya Yanok  Run CI with Dart 2.19 and dev

test (7fab079..c9a3138):
  c9a31388  2023-04-24  Nate Bosch  Remove ignores for undeprecated libraries (#2000)

webdev (8b42c95..12f2285):
  12f22857  2023-04-25  Elliott Brooks  Run `chrome_proxy_service_test.dart` everyday at 8 AM PST (#2098)

Change-Id: I1c90351b7cde4ead84bb410fa76807b33fdae1a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298740
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-26 19:17:41 +00:00
Brian Wilkerson 03270f748b Convert the tests for the combinator contributor
Change-Id: Ic165bf7fed1f045f489998ecf9dec9edbd516274
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298480
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-04-26 18:42:37 +00:00
Devon Carew 7a5061e71a [docs] fix a grammar issue in the sdk readme
Change-Id: I566740cc36cbc85b16ece550b31481755b86524a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298720
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2023-04-26 18:25:55 +00:00
Konstantin Shcheglov 8d2bafa624 Use OpenUriNotificationSender to replace separate flag and sending method.
If the sender is not `null`, then we can send.
No need for a flag, and assert() in the sending method.
If the sender is `null`, then the sending code will not able to invoke it.
Types FTW :-)

Change-Id: I7d153ba014c578a73dce2eab28aceedbb8814711
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298440
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-26 18:17:37 +00:00
Nate Biggs 4bbdc97d1c [dart2js] Ensure Dart2JS only reports relevant metrics.
Prior to this change the metrics modified here are all printed during every run of the compiler, even when the compiler is running in phase mode on a phase that cannot modify these metrics.

This will make collection of these metrics easier and ensure the collected data is cleaner.

Change-Id: I62a081d9dbae71256882f24156faf246f4076e61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297440
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2023-04-26 17:36:51 +00:00
Alexander Markov 233a7298e0 [vm] Fix assertion failure when taking a tear-off of a constructor with nested function type
TEST=runtime/tests/vm/dart/regress_52179_test.dart
Fixes https://github.com/dart-lang/sdk/issues/52179

Change-Id: I449e2aebe3ffeb78f4f9a213ec40e6892f7a0447
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298660
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2023-04-26 17:33:50 +00:00
Konstantin Shcheglov c13acbf1dd Issue 52136. Report USE_OF_VOID_RESULT for SwitchExpression.
Bug: https://github.com/dart-lang/sdk/issues/52136
Change-Id: I3a3b8f45419c57deec77deae37cd5f98481debeb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-26 16:12:48 +00:00
Srujan Gaddam 1d28f8e821 [dart:js_interop/ddc/dart2js] Implement JS types using @staticInterop
Currently, dart:_js_types types are all typedefs in the web backends.
This leads to inconsistent semantics, since you can statically pass
Strings to JSString, for example. You cannot do this in dart2wasm.
In order to ensure consistent semantics, we reify these types using
a custom @staticInterop lowering. They all get erased to their
respective Dart type. When we have inline classes, these types
should be implemented using inline classes.

Note that Interceptor will not work for this use case. The reified
type of JS primitives are Dart types e.g. String, bool, and therefore
can not be casted to Interceptor.

In order to do this, the eraser is refactored and the JS backends use
shared erasure code to either erase/emit types.

Tests are added to make sure you need to go through a conversion or
cast to pass Dart objects to JS types.

CoreLibraryReviewExempt: Backend-specific internal library changes.
Change-Id: I5942be628102919ec167f094cfe10fced606363c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295105
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-04-26 15:55:54 +00:00
Tess Strickland e506581534 [pkg] Don't run native_stack_traces test on non-VM runtimes.
Fixed: https://github.com/dart-lang/sdk/issues/52174

Change-Id: I64b8b389ed5e80484367fe9475bb898dd493a319
Cq-Include-Trybots: luci.dart.try:dart2js-minified-linux-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298620
Commit-Queue: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Tess Strickland <sstrickl@google.com>
2023-04-26 14:43:08 +00:00
dependabot[bot] 5ed46db59d Bump github/codeql-action from 2.2.12 to 2.3.0
Closes https://github.com/dart-lang/sdk/pull/52147

GitOrigin-RevId: 437557adf8d1358a02fbccfb05b60dc8b8ad8a5a
Change-Id: Ie67d598917e2e321dc693a97e766ad793075247c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297520
Reviewed-by: Alexander Thomas <athom@google.com>
2023-04-26 14:38:53 +00:00
Johnni Winther 009cbfbeac [kernel] Merge front_end and kernel verifiers
This merges the front_end and kernel verifiers into one Target based
kernel verifier. The RedirectingFactoryBody work-around is moved to
package:kernel to support its verification.

TEST=existing

Change-Id: I0adf4d2c22c4009cf439b3b23fa14192253a2846
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280161
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2023-04-26 14:14:36 +00:00
Johnni Winther 498dcc02ee [cfe] Promote matched expression in relational pattern
Closes #52123

Change-Id: I702524479d1abe83eb67e801454f03a88febe434
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298600
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-04-26 13:27:49 +00:00
Jens Johansen ad87701920 [CFE] Check 'instrumentation != null' before doing other calls
Change-Id: I81f562824b8011d5a99e334daeeede36e6650b03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298560
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-04-26 12:19:47 +00:00
Jens Johansen 43b499cf9a [kernel] Optimize computeThisFunctionType
When compiling compile.dart:
148,192 FunctionType are created via `computeThisFunctionType`.
133,085 of them have no named parameters; 141,507 of them have no type
parameters; 128,357 of them have neither.

This CL makes it not create new lists when not needed
(or create empty iterators and sort empty lists), and makes the lists
it do create not growable.

Change-Id: Ibd5fef458b8a1254aa2f1fab80d0449a2f0bfd94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298541
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-04-26 11:29:28 +00:00
Jens Johansen 6f1b754a2f [CFE] Instrumenter can also count constructors; first run uses less ram because of trimming
For instance running like this:

    out/ReleaseX64/dart pkg/front_end/tool/flame/instrumenter.dart pkg/front_end/tool/_fasta/compile.dart --count
    out/ReleaseX64/dart pkg/front_end/tool/_fasta/compile.dart.dill.instrumented.dill --omit-platform pkg/front_end/tool/_fasta/compile.dart

will now also print how often Constructors are executed, e.g. it contains
stuff like thid:

    529,397: ast.dart|DartType.constructor:
    715,197: ast.dart|Expression.constructor:
  1,177,700: ast.dart|TreeNode.constructor:
  2,001,460: ast.dart|Node.constructor:

Change-Id: I26ff69f8ad8a1453d6004e97952ce3b39bfff687
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298540
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-04-26 10:50:09 +00:00
Johnni Winther 2a82ba0f48 [cfe] Report error on indirect implementation of base class
Closes #52161

Change-Id: I9e2f441036cfeeb904a3e3ec5aeff2e5c45cb8a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298160
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2023-04-26 08:16:34 +00:00
Valentin Hăloiu 9a5de8e2ea Fix HTTPS client certificate test
These tests have been broken (and disabled) for a while. This pull-request fixes the tests and re-enables them.

Bug: #47052
Change-Id: Ib8c83959e5f00a2a5dc29959f87adbaa963385fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296863
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-04-26 06:45:20 +00:00
Stephen Adams 8ee2b8b36b [dart2js] Convert recordTypes after closureData
Fixed #51899
Change-Id: Id9108e6cf13aee409b127fe6cd007bef8f0fe609
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298460
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-04-26 03:57:07 +00:00
Ryan Macnak cc3bf609f2 [vm, gc] Avoid suprious race between GC helper thread exit and GC visiting roots.
A sweeper helper thread may be exiting while the scavenge is visiting thread roots. GC helpers have no reusable handle state to clear, so the race is an uninteresting one between null and null.

TEST=tsan
Bug: https://github.com/dart-lang/sdk/issues/52125
Change-Id: Iae68f8a3a938ae20e540b11c172fbc4a50a90a9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298262
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-04-25 22:10:09 +00:00
Leaf Petersen 5138a1eb38 Add test cases to cover implementing a base declaration from the
current library which itself extends a base declaration from another
library.

Change-Id: I3caf125de528d5c082c825c02055a114f732f385
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298040
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-04-25 21:59:46 +00:00
Nate Biggs 0028815f16 [dart2js] Remove experimental inferrer.
We have merged the experimental inferrer back into the main inferrer branch and therefore can clean this up.

Change-Id: I66481c51276b0ffbf79b4b41b21a3ee5c2ca9cf2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298360
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-04-25 21:50:02 +00:00
Robert Nystrom 4bfb196287 Fix web_int_literals_test.dart.
This test was inadvertently broken when automatically migrated from a
multitest to a static error test.

The original intent of the test was to ensure that web compilers
reported compile-time errors on integer literals that couldn't be
represented as JS doubles. The migrated static error test doesn't have
any web expectations and thus doesn't get run on web compilers at all.
Instead, all it does is validate that the one non-web error in there is
reported.

This turns the test into a proper *web* static error test with the
web-specific test expectations in there. That ensures the test is run
on web compilers and validates that the web compilers produce those
expected errors.

Also removed the corresponding runtime test since it doesn't do
anything. There's no runtime behavior to test, and the static error
test also correctly validates that the *valid* integer literals do *not*
produce compile errors.

Removed the status file entries because they're no longer needed. Since
this is a static error test, the runtime platforms already skip it
implicitly.

Change-Id: I2776847e1acb88b1f761efb43e7bb528b27d0eee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/297840
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2023-04-25 21:28:39 +00:00
Konstantin Shcheglov 80d26df2fd Issue 52160. Report BASE_CLASS_IMPLEMENTED_OUTSIDE_OF_LIBRARY for implementing 'base' via 'extends'.
Bug: https://github.com/dart-lang/sdk/issues/52160
Change-Id: I47a72021a002663d04fd8ea14c11a012917e8a8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298320
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-25 20:19:38 +00:00
Konstantin Shcheglov 79bf3eedd6 Run UseOfVoidResultTest with null safety enabled.
Bug: https://github.com/dart-lang/sdk/issues/52136
Change-Id: I0a77a81d0a558e8b2450e91e6156d5fab03579a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298300
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-25 20:14:08 +00:00
Konstantin Shcheglov 00d841ee99 Issue 52060. Fix reporting CONSTANT_PATTERN_NEVER_MATCHES_VALUE_TYPE for Null vs. nullable FunctionType.
Bug: https://github.com/dart-lang/sdk/issues/52060
Change-Id: I5373a9a73396fbf49562131f5f801d1bceeb65f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298280
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-25 20:09:28 +00:00
Konstantin Shcheglov b81fd66ed5 Issue 52164. Include enums and mixins into types of a sealed class.
Bug: https://github.com/dart-lang/sdk/issues/52164
Change-Id: Icd6ac232d6356b7e05995b79e5f7d8b33b88a719
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298260
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-04-25 20:01:52 +00:00
Konstantin Shcheglov 018dadcf5b Resolve the whole unit in resolveForCompletion() when the node is a directive.
There is a quite complicated logic in resolving directives and walking
augmentations and parts. And we don't expect users write a lot of code
in directives, so there is less need for optimizations than when typing
in method bodies.

Change-Id: Id38e90f09eb5c1e84be8fc28ed4211d03762d2e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-04-25 20:01:25 +00:00
Polina Cherkasova 4de8a314c4 Update README.md
Closes https://github.com/dart-lang/sdk/pull/52114

GitOrigin-RevId: 1a0abe31e57c60bfeaf5bc857a08b0f6bc3986d2
Change-Id: I837ff4f5fdf9afdbd2cbce3073f87e51a62960c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296701
Commit-Queue: Polina Cherkasova <polinach@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-04-25 18:50:20 +00:00