Commit graph

96980 commits

Author SHA1 Message Date
Daco Harkes 83d058e1ac [tool] bisect.dart fix prints
GitHub expects the "first" and "last" hash of a commit range the
other way around.
This fixes links when the output is pasted into GitHub issues.

Change-Id: I1c22490b69bc6bec9c0d65307ee80a6b15e96a6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322661
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-08-25 09:14:40 +00:00
Sergey G. Grekhov 7e218c4e94 [co19] Roll co19 to 910330408dd6af6b8f58c5d26464dbe0ce76e476
2023-08-25 sgrekhov22@gmail.com Fixes dart-lang/co19#2236. Expect a secondary error for CFE in syntax_A08_t03.dart (dart-lang/co19#2237)
2023-08-24 sgrekhov22@gmail.com dart-lang/co19#2232. Fix secondary errors in not_a_constant_in_superclass_t02.dart (dart-lang/co19#2233)
2023-08-24 sgrekhov22@gmail.com Fixes dart-lang/co19#2230. Fix roll failures (dart-lang/co19#2231)
2023-08-23 sgrekhov22@gmail.com Fixes dart-lang/co19#2228. Fix syntax error in static_analysis_extension_types_A10_t08.dart (dart-lang/co19#2229)
2023-08-23 sgrekhov22@gmail.com dart-lang/co19#1400. Extension types subtyping tests. Resolve name conflict, add missing tests (dart-lang/co19#2227)
2023-08-23 sgrekhov22@gmail.com dart-lang/co19#1400. Add tests for external members, covariant parameters, nullable supertypes (dart-lang/co19#2225)
2023-08-23 sgrekhov22@gmail.com dart-lang/co19#2217. Add tests for calculating of the least upper bound for extension types (dart-lang/co19#2223)
2023-08-22 sgrekhov22@gmail.com Fixes dart-lang/co19#2224. Remove excessive error expectation for CFE (dart-lang/co19#2226)
2023-08-21 sgrekhov22@gmail.com Fixes dart-lang/co19#2221. Replace inline classes by extension types (dart-lang/co19#2222)
2023-08-21 sgrekhov22@gmail.com Fixes dart-lang/co19#2219. Replace `inline class` by `extension type` in test description (dart-lang/co19#2220)
2023-08-18 sgrekhov22@gmail.com dart-lang/co19#2142. Add Subtyping tests for extension types (dart-lang/co19#2215)
2023-08-18 sgrekhov22@gmail.com Fixes dart-lang/co19#2216. Add test for extension type abstract members (dart-lang/co19#2218)
2023-08-17 sgrekhov22@gmail.com Fixes dart-lang/co19#2213. Fix stack trace comparison (dart-lang/co19#2214)

Change-Id: I009f43878130f934fc6c2eea3368f9763c94e7a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322660
Reviewed-by: Alexander Thomas <athom@google.com>
2023-08-25 08:55:34 +00:00
Daco Harkes 1de6b6dce1 [gardening] Fix run_appended_aot_snapshot_test
https://dart-review.googlesource.com/c/sdk/+/322521 Removed the
`enableAsserts` argument from `generateAotSnapshot` but didn't update
the callsites in this test.

Change-Id: Ibde9a60a6129fb50b6af74d4d5603be95e6d14f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322640
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-08-25 08:05:08 +00:00
Liam Appelbe e8d7425c4e [vm/ffi] Closure callbacks for sync callbacks
Bug: https://github.com/dart-lang/sdk/issues/52689
Change-Id: I54be397cfbf8519fe5b5a51b793fe46d602124d9
Fixes: https://github.com/dart-lang/sdk/issues/52689
Bug: https://github.com/dart-lang/sdk/issues/53096
TEST=isolate_local_function_callbacks_test.dart, plus generated tests and additions to existing tests
CoreLibraryReviewExempt: The isolate and FFI packages are VM-only
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317060
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-08-25 03:35:44 +00:00
pq 33fb1e3456 extension type support for camel_case_types
Fixes: https://github.com/dart-lang/linter/issues/4716

Change-Id: I0ced3926c13f92c471df537621fa18429c4982b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322567
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-24 22:49:28 +00:00
pq c1cacbef5a extension type support for await_only_futures
Fixes: https://github.com/dart-lang/linter/issues/4685

Change-Id: I7cbc1a2a99384d7bc049e4e98ce3de53209398dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322566
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-24 22:04:38 +00:00
pq 4e7a6a0a4e fix path conversion
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8771849433692798353/+/u/test_results/tests_that_began_passing

pkg/linter/test/doc_test was fixed (RuntimeError -> Pass)
pkg/linter/test/experiments_test was fixed (RuntimeError -> Pass)
pkg/linter/test/integration_test was fixed (RuntimeError -> Pass)
pkg/linter/test/rule_test was fixed (RuntimeError -> Pass)
pkg/linter/test/unmocked_sdk_rule_test was fixed (RuntimeError -> Pass)
pkg/linter/test/verify_machine_json_test was fixed (RuntimeError -> Pass)

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


Change-Id: Ibf942bf547436d86f179ca69a97422cd105be6fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322565
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-24 21:56:07 +00:00
Ryan Macnak 5eb4444c50 [vm, gc] More stress tests.
TEST=ci
Change-Id: Id6795c33815886e7c45871a919f88dfab4be350d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322371
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-08-24 21:46:28 +00:00
pq 69c6a3c377 extension type support for deprecated_member_use_from_same_package
Fixes: https://github.com/dart-lang/linter/issues/4715

Change-Id: I8584facf340c7818d539b9182ebb50c12484114e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-24 21:11:17 +00:00
Ben Konyi 0f39236144 [ package:vm_service ] Add wsUri property to VmService
The `wsUri` property can be used to identify the target VM service that
a `VmService` instance is connected to.

Change-Id: Ic2ba4674e7b247f808d399aeb64d246a5c791a93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322540
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-08-24 20:23:14 +00:00
Srujan Gaddam 9ac045711f Revert "[dart:js_interop] Remove unnecessary custom static interop check"
This reverts commit 8193e6a385.

Reason for revert: Breaks DDC tests.

Original change's description:
> [dart:js_interop] Remove unnecessary custom static interop check
>
> This was added to prevent accidentally lowering patched members,
> but these members are patched before we see them, so they aren't
> marked external.
>
> Change-Id: Ib8f7c52c38a3f1e28905798a40319f7aa2994328
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322502
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Srujan Gaddam <srujzs@google.com>

Change-Id: I5f094b507d506d488dc7a6bc74e7b1b6cb5eb2ef
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322581
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2023-08-24 20:13:57 +00:00
pq 9634e4ec54 extension type test for type_annotate_public_apis
Fixes: https://github.com/dart-lang/linter/issues/4714

Change-Id: Ic0834568638dba4a1edb2d8a29f39af8d12081b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-24 19:59:46 +00:00
Srujan Gaddam 8193e6a385 [dart:js_interop] Remove unnecessary custom static interop check
This was added to prevent accidentally lowering patched members,
but these members are patched before we see them, so they aren't
marked external.

Change-Id: Ib8f7c52c38a3f1e28905798a40319f7aa2994328
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322502
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-08-24 19:59:35 +00:00
Ben Konyi 69ff9359e1 [ CLI ] Remove --enable-asserts option for dart compile aot-snapshot
This option should be re-added once
https://github.com/dart-lang/sdk/issues/53343 is resolved.

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

Change-Id: I520695f47273a73f8a39e233abfedf11b87f9f50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322521
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-08-24 19:27:29 +00:00
pq 2e82e3fdf9 enable inline-class experiment for tests
Change-Id: I802c74a4937fec777886ca59696af46af78fa659
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322503
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-24 19:20:38 +00:00
Danny Tuppeny 9004168e1a [analysis_server] Fix filterText for overrides
I noticed filterText was incorrect in some cases - for example if label was "MyClass(a)" filterText should be only "MyClass" without the "a".

There was a test for this but it was wrong, it checked filterText was null, even though label contained parens (a null filterText means use label).

I renamed the tests so they moved around a little, but they should be clearer (and more correct) now.

Change-Id: If94f80e8d7dc8b394c49eebb4d7482de2d62c38b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322461
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-08-24 19:09:35 +00:00
Ryan Macnak 7040faf81f [vm, compiler] Remove dead parameter from EnsureIsNewOrRemembered.
TEST=ci
Change-Id: I4d6fbcc9557857bb5172b8dc1e7384a7a2c01398
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322370
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2023-08-24 17:25:30 +00:00
Paul Berry b29e4a8554 Flow analysis: unit test that join variables are usable and promotable.
These tests fill a coverage gap in the flow analysis unit
tests. Previously we tested that "join" variables were created by
logical-or patterns and switch cases that share a body, but we didn't
have any tests to verify that those variables could be used.

We now verify that those variables can be read from and promoted.

Change-Id: Ic8948cd307edff429aea9007183d65cc3a770ef3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322360
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-08-24 16:42:20 +00:00
Danny Tuppeny b5ed2bb7c0 [analysis_server] Add support for survey prompts
Change-Id: I0447de090311694712fce005806c6ac296ca2eac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322406
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-08-24 16:36:02 +00:00
pq 772dbf7fb5 extension type support for avoid_setters_without_getters
Fixes: https://github.com/dart-lang/linter/issues/4710

Change-Id: Iee938aa74fc7eb8be7dc9444c1ad3c9e0351ff76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322450
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-24 16:03:30 +00:00
pq 96831c9067 extension type support for unnecessary_getters_setters
Fixes: https://github.com/dart-lang/linter/issues/4711

Change-Id: I79d75c3f9bd17333b9e1370f9057202a0c9cce6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-24 16:03:27 +00:00
Derek Xu 9e071c571f [dartdev] Fix --resident option
The --enable-asserts option is not defined in PRODUCT mode, so
args.wasParsed(enableAssertsOption) currently reports an error saying
"Could not find an option named --enable-asserts".

Change-Id: Ic3d0695fc608ccb674141dc5b918d0bdf3dc298e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322422
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-08-24 15:48:00 +00:00
Ben Konyi c592600de7 [ package:vm_service ] Port some Observatory service tests
Work towards https://github.com/dart-lang/sdk/issues/45037

Change-Id: I51b7c4e2afdbee966c1a86a1134eaced9e50c44e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322425
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2023-08-24 15:44:49 +00:00
Paul Berry 55a105851c Flow analysis: remove redundant method FlowModel._getInfo.
The method `FlowModel.infoFor` does the same thing.

Change-Id: Ifc46289097943bb3873bc503920f765c6a168ca7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322225
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-08-24 15:22:15 +00:00
Alexander Markov 9f40ce6e3d [vm/aot] Use inferred types of captured local variables
On a micro-benchmark from https://github.com/dart-lang/sdk/issues/48764
in AOT mode, 'for-in' case:
Before: 0.556557s
After: 0.166579s (3.3x faster)

TEST=runtime/tests/vm/dart/regress_48764_il_test.dart

Issue https://github.com/dart-lang/sdk/issues/48764
Fixes https://github.com/dart-lang/sdk/issues/51102

Change-Id: I591739b8c2154931f6c535db57c0c11ba0eeb4a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321543
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-08-24 15:21:51 +00:00
Johnni Winther e0142d3435 [kernel] Remove caching of ExtensionType.typeErasure
The cache collides with the need to transform the declared representation
type on ExtensionTypeDeclaration.

Closes #53204

Change-Id: I1be3e50dbf932928e08bbf82e1b85ba9d0b29bf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322120
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-08-24 14:21:40 +00:00
Paul Berry 30e8ed8410 Flow analysis: fix field promotion based on condition variables.
When the result of an `is` test or null check is stored in a boolean
variable, and later recalled for use in flow control, the flow models
that were computed at the time the variable was stored need to be
updated to reflect any further change to flow state that happened
between the test and the usage. This is done by
`FlowModel.rebaseForward` method. `rebaseForward` takes two flow
models as input: `this`, which represents the flow state that was
computed at the time the condition variable was stored, and `base`,
which represents the flow state at the time the condition variable is
recalled.

Flow analysis adds promotion keys for variables to the flow state at
the time their declarations are encountered, and in certain
circumstances removes them after they go out of scope. But for
properties, it only adds promotion keys when the promotion occurs. So
prior to the addition of field promotion, if `this` contained a
promotion key that wasn't present in `base`, that could only mean that
the promotion key was associated with a variable that had gone out of
scope; accordingly, it was safe for `rebaseForward` to simply ignore
that key. (It did so implicitly, by only ever examining the promotion
keys in `this`). But with the addition of field promotion, it is now
possible that the promotion key represents a property that was
promoted in `this`, and hence the promotion needs to be kept. This CL
adds the necessary logic to keep the promotion.

In addition, there is a subtle difference in the relationship between
the `PromotionModel` and `SsaNode` data structures for local variables
versus properties. For local variables, the promotion key is
determined solely from the variable name; then, this promotion key is
looked up in the current `FlowModel` to obtain a `PromotionModel`, and
the `PromotionModel` contains a prointer to the `SsaNode`. For
properties, the property name is looked up in the
`promotableProperties` map of the parent `SsaNode`; this points to a
`_PropertySsaNode`, which contains the promotion key, and when this
promotion key is looked up in the current `FlowModel` to obtain a
`PromotionModel`, that `PromotionModel` contains a pointer to a bogus
`SsaNode`.

For local variables, the `SsaNode` pointed to by the `PromotionModel`
is important, because if it's different between `this` and `base`,
then the variable in question received a new value between the time
the condition variable was stored and the time the condition variable
was recalled; therefore the promotion should be disregarded. However,
for properties, the `SsaNode` pointed to by the `PromotionModel` is
bogus, so if it's different between `this` and `base`, that shouldn't
block promotion. This CL adds the necessary logic to avoid the
`SsaNode` check for properties.

This situation is very confusing so I've added more detail to the
comment above `PromotionModel.SsaNode` explaining it. In a future CL I
will try to clean up the confusing situation by eliminating the bogus
`SsaNode`s pointed to by `PromotionModel`s for properties.

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

Bug: https://github.com/dart-lang/sdk/issues/53273
Change-Id: I1d528e25de1eb2ed63d0ee1a00faa5ad5b5061ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321752
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-08-24 14:02:29 +00:00
Jens Johansen 9f9da91b84 [kernel] Facilitate faster sorting of additional exports
The "additionalExports" are sorted in production code to give stable
output.
Before this CL it did `toString()` on the canonical names which is
O(n^2) because of continued string concatenation.
This CL changes it to sort on the name, going to the parent if it's the
same. This _does_ change the sorting, but should still be stable.

When compiling via the flutter frontend try bot the time spent on
sorting does from ~45 seconds to ~9 seconds (arguable still a lot, but
much better).

This will also speed up flutter testing because it will spend less time
waiting for the frontend.

TEST=Assuming existing tests.

Change-Id: If350b7c2ce49f00b2924732a7fa7eb51c38c8172
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322280
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-08-24 13:21:38 +00:00
Johnni Winther b1594fa130 [parser] Handle invalid extension type header in error recovery
This expands the existing recovery for class headers to handle
invalid, out-of-order, and duplicate clauses in extension type
declaration headers.

Change-Id: I7b33b91cc718e4c0673137121b8d083fa0ef1562
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321900
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-08-24 11:20:18 +00:00
Sergey G. Grekhov b6aa6dbcae [co19] Roll co19_2 to 0454b178fdf6697e898b5e5c7ee553a9bc266faa
2023-08-24 sgrekhov22@gmail.com dart-lang/co19#2232. Fix secondary errors in not_a_constant_in_superclass_t02.dart (dart-lang/co19#2234)

Change-Id: I382acf4573314a19624eae308a2f3e39794dc7d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322403
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-08-24 09:22:42 +00:00
William Hesse db8f386c77 [test] Improve dependency checking in package_deps.dart test
Change-Id: I8ac83357157d586e11564cddd74c324bf3935509
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322401
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2023-08-24 09:01:41 +00:00
Parker Lougheed d3eb747f45 [linter] Remove duplicate sample in implicit_reopen docs
Fixes https://github.com/dart-lang/site-www/issues/5127

Change-Id: Ibd70155a07169de454e00e0bce8700b1ce08b43f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322480
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-08-24 04:50:30 +00:00
Mayank Patke b3e2090a77 [dart2js] Improve computed type of AwaitTypeInformation.
Change-Id: I7d57bda09a620d1bd8b9ae89d4efd02575f1a4e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322368
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2023-08-24 00:43:38 +00:00
Mayank Patke ed0ac21194 [dart2js] Add inference unit tests for await e without a local.
Change-Id: I2465a0b8f29d2158f684099f8500153515421c8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322367
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-08-24 00:43:38 +00:00
pq 5925df275e extension type support for annotate_overrides
Fixes https://github.com/dart-lang/linter/issues/4709

Change-Id: Id0f20441ce30e6e7056da186f1e1c2e238d1cfd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322449
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-24 00:41:27 +00:00
Keerti Parthasarathy 35149e979e Add a test case for #52902
Change-Id: I2402e14901c572bc8bb458ef261b7a38527b6043
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322447
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-08-23 23:22:02 +00:00
Mayank Patke 5be5d29cd7 [dart2js] Implement await runtime check using kernel transformation.
This replaces the lowering during SSA which requires manually
registering impacts in multiple places. Instead, we use a kernel
transformation to invoke a helper function which implements the
specified semantics.

Change-Id: I58fd11f6d4d1e4f90d00fa826453de024c8686aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319901
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2023-08-23 22:58:49 +00:00
pq 1ba45816e4 README and contributing process updates
Change-Id: I1c5613b2b304c4ff5ee8a125bd6426588a336236
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322369
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-23 22:09:24 +00:00
pq eeb3101b3a stop fetching analysis server sources
Change-Id: I4d07d347567662af508e4af5c8196e64ba865b9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322366
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-23 21:59:53 +00:00
pq 61fd441faa use SDK root .gitignore
Change-Id: Id52e367635deeebf5c6b9dfa2346e9771ee34f5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322446
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-23 21:31:06 +00:00
pq 4e634268c3 remove stale github action/bot hooks
Change-Id: I9d12f2e3a012a12676c9e2d889b7b940cd8117a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322445
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-23 20:52:20 +00:00
Srujan Gaddam 293cbd1dc9 Test toString expectations for interop objects
Now that ddc, dart2js, and dart2wasm are consistent on toString outputs
for JS objects, we should test to make sure this behavior doesn't
regress.

Change-Id: I2b1b4819e5a2425ae813dc944a4dea7b2147d5bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322365
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
2023-08-23 20:49:24 +00:00
Parker Lougheed 9e761d5a10 [linter] Account for new lints in 3.1.0 release
Bug: https://github.com/dart-lang/linter/pull/4678#issuecomment-1685125753
Change-Id: I8fe1bcea8cc0db26b1375cb95ebe6ec51b6b63ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322380
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-23 20:36:05 +00:00
pq 76e4e80ceb fix failing migrated linter unit tests
Fixes: https://github.com/dart-lang/sdk/issues/53323

Change-Id: If826bd3e1a6df04cc851b4629c5c58087d867fea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322444
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-23 20:30:28 +00:00
Paul Berry 2ecc88e7ef Flow analysis: Replace merge with join followed by unsplit.
The `merge` operation is equivalent to a `join` operation followed by
an `unsplit` operation, so there is no real benefit to having both
`merge` and `join` as separate methods. Removing `merge` will make it
easier to refactor the behavior of `join` in follow-up CLs.

Change-Id: I4a42cdd1cb2e795dcfeae86703fe5d3356c131ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322140
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-08-23 20:28:00 +00:00
Parker Lougheed 7383613e1a Add analyzer team as owners of pkg/linter
Bug: https://github.com/dart-lang/linter/issues/4411
Change-Id: I639ccb50cef07c1a09baccb5ab87355c0b5ef093
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322420
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-08-23 20:05:49 +00:00
Devon Carew 0e2e8595f3 [deps] rev ecosystem, mockito, tools, webdriver
Revisions updated by `dart tools/rev_sdk_deps.dart`.

ecosystem (dfeda1a..f777da7):
  f777da7  2023-08-22  Devon Carew  updates to the label normalization tool (#151)
  73a3464  2023-08-04  Moritz  Add permissions to `post_summaries.yaml` (#149)

mockito (e54a006..70aabfc):
  70aabfc  2023-08-23  Copybara-Service  Merge pull request #686 from parlough:fix/example-analysis-errors
  9737d71  2023-08-15  Parker Lougheed  Fix analysis errors in example directory

tools (2be6c2e..e5ce42a):
  e5ce42a  2023-08-22  Jonas Finnemann Jensen  Support optional packageUri (#148)
  1c46390  2023-08-21  Kenzie Davisson  Improve exception messages for `ExpectJson` extension (#147)

webdriver (d0f78d0..20ec47f):
  20ec47f  2023-08-21  sigmundch  Add content-type to async xhr request headers. (#277)

Change-Id: If6483e07c9d2a3670d2a9043bd56f40965e25c3d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322362
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-08-23 18:13:51 +00:00
Kallen Tu b3c433c761 [linter] Add more const errors to hasConstError in the linter.
More errors surfaced from the changes in https://dart-review.googlesource.com/c/sdk/+/319911.

This CL allows them to be marked as const errors when we check that a constructor can be const-ified.

Bug: https://github.com/flutter/flutter/issues/133152
Change-Id: Ic514fba9d544d5019ca76567be04738a5d5db768
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-08-23 18:06:31 +00:00
Kallen Tu ac901b52bf [analyzer] Avoid evaluating the argument list of an InstanceCreation if not const.
Fixes a breakage caused by https://dart-review.googlesource.com/c/sdk/+/319911. This reverts a mistake in evaluating the argument list for constant errors if it's not even constant.

b/297178967

Change-Id: I88db872025d10dd75e07d1349ceef61bc251cfc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322441
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-08-23 18:05:47 +00:00
Elliott Brooks 28434dfa83 Pin webdev dep
Bug: https://github.com/dart-lang/webdev/issues/2201
Change-Id: Icf2d8755b5063797c22d457ee25f7d637df0fd42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322226
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
2023-08-23 16:41:56 +00:00