[dart-lang/sdk] 761ece: [dart2wasm] Remove assertion that named param Symb...

0 views
Skip to first unread message

natebiggs

unread,
Apr 27, 2026, 10:13:10 PM (2 days ago) Apr 27
to com...@dartlang.org
Branch: refs/heads/main
Home: https://github.com/dart-lang/sdk
Commit: 761ece74b621813fd79b5645437a37e39e679b6b
https://github.com/dart-lang/sdk/commit/761ece74b621813fd79b5645437a37e39e679b6b
Author: Nate Biggs <nate...@google.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)

Changed paths:
M pkg/dart2wasm/lib/symbols.dart

Log Message:
-----------
[dart2wasm] Remove assertion that named param Symbol cannot be private.

Though named parameters cannot be private (this is checked by the
CFE/analyzer) it is not a static error to specify a named argument
beginning with "_". Instead this should be a runtime error (resulting in
an NSM since the caller signature won't match the target callee's).

We could move this assert to the call sites but there are several that
would need to have this check. And the CFE should be validating this
anyway so it should be safe/simplest to just remove this assert.

Fixes: https://github.com/dart-lang/sdk/issues/63201
Change-Id: I511b56c7a3b0964ef3db744a75b574dd9551e6ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498340
Reviewed-by: Martin Kustermann <kuste...@google.com>
Commit-Queue: Nate Biggs <nate...@google.com>



To unsubscribe from these emails, change your notification settings at https://github.com/dart-lang/sdk/settings/notifications

Srujan Gaddam

unread,
Apr 28, 2026, 12:22:15 AM (yesterday) Apr 28
to com...@dartlang.org
Branch: refs/heads/lkgr
Home: https://github.com/dart-lang/sdk
Commit: 761ece74b621813fd79b5645437a37e39e679b6b
https://github.com/dart-lang/sdk/commit/761ece74b621813fd79b5645437a37e39e679b6b
Author: Nate Biggs <nate...@google.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)

Changed paths:
M pkg/dart2wasm/lib/symbols.dart

Log Message:
-----------
[dart2wasm] Remove assertion that named param Symbol cannot be private.

Though named parameters cannot be private (this is checked by the
CFE/analyzer) it is not a static error to specify a named argument
beginning with "_". Instead this should be a runtime error (resulting in
an NSM since the caller signature won't match the target callee's).

We could move this assert to the call sites but there are several that
would need to have this check. And the CFE should be validating this
anyway so it should be safe/simplest to just remove this assert.

Fixes: https://github.com/dart-lang/sdk/issues/63201
Change-Id: I511b56c7a3b0964ef3db744a75b574dd9551e6ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498340
Reviewed-by: Martin Kustermann <kuste...@google.com>
Commit-Queue: Nate Biggs <nate...@google.com>


Commit: 672877606d657a8217bf2c6d4ed6cb8e14da699c
https://github.com/dart-lang/sdk/commit/672877606d657a8217bf2c6d4ed6cb8e14da699c
Author: Srujan Gaddam <sru...@google.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)

Changed paths:
M pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
M pkg/linter/lib/src/rules/invalid_runtime_check_with_js_interop_types.dart
M pkg/linter/test/rules/invalid_runtime_check_with_js_interop_types_test.dart

Log Message:
-----------
[linter] Erase types to non-nullable and type bounds correctly

We used thisType in invalid_runtime_check_with_js_interop_types
to ignore nullability and generics when comparing two types for
checks and casts. This is erroneous when doing a subtype check
because the distinct instantiated type arguments in each type
will lead to the two types not being subtypes of each other.

When JSExportedDartFunction and JSFunction became generic, this
became an issue because now JSFunction<T> is not a supertype of
JSExportedDartFunction<T>.

So, instead, we should always initialize the params to their
bounds when comparing types if we want to ignore generics.

Change-Id: I8418d3b87123a658fbe8a0a9379f43cba738f063
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498241
Reviewed-by: Samuel Rawlins <sraw...@google.com>
Reviewed-by: Konstantin Shcheglov <sche...@google.com>


Commit: 94e12177746cb45954ff331c9684e8abdb1adeef
https://github.com/dart-lang/sdk/commit/94e12177746cb45954ff331c9684e8abdb1adeef
Author: Srujan Gaddam <sru...@google.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)

Changed paths:
M CHANGELOG.md
M pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart
M pkg/_js_interop_checks/lib/src/transformations/shared_interop_transformer.dart
M pkg/front_end/testcases/dart2js/js_interop_transforms/functiontojs.dart.strong.expect
M pkg/front_end/testcases/dart2js/js_interop_transforms/functiontojs.dart.strong.modular.expect
M pkg/front_end/testcases/dart2js/js_interop_transforms/functiontojs.dart.strong.transformed.expect
M pkg/front_end/testcases/dart2js/js_interop_transforms/isa.dart
M pkg/front_end/testcases/dart2js/js_interop_transforms/isa.dart.strong.expect
M pkg/front_end/testcases/dart2js/js_interop_transforms/isa.dart.strong.modular.expect
M pkg/front_end/testcases/dart2js/js_interop_transforms/isa.dart.strong.transformed.expect
M pkg/front_end/testcases/dartdevc/js_interop_transforms/functiontojs.dart.strong.expect
M pkg/front_end/testcases/dartdevc/js_interop_transforms/functiontojs.dart.strong.modular.expect
M pkg/front_end/testcases/dartdevc/js_interop_transforms/functiontojs.dart.strong.transformed.expect
M pkg/front_end/testcases/dartdevc/js_interop_transforms/isa.dart
M pkg/front_end/testcases/dartdevc/js_interop_transforms/isa.dart.strong.expect
M pkg/front_end/testcases/dartdevc/js_interop_transforms/isa.dart.strong.modular.expect
M pkg/front_end/testcases/dartdevc/js_interop_transforms/isa.dart.strong.transformed.expect
M sdk/lib/_internal/js_dev_runtime/patch/js_allow_interop_patch.dart
M sdk/lib/_internal/js_dev_runtime/private/interceptors.dart
M sdk/lib/_internal/js_runtime/lib/interceptors.dart
M sdk/lib/_internal/js_runtime/lib/js_allow_interop_patch.dart
M sdk/lib/_internal/js_shared/lib/js_interop_patch.dart
M sdk/lib/_internal/wasm/lib/js_interop_patch.dart
M sdk/lib/js_interop/js_interop.dart
M tests/lib/js/static_interop_test/external_dart_reference_test.dart
M tests/lib/js/static_interop_test/isa/isa_test.dart
M tests/lib/js/static_interop_test/js_types_static_errors_test.dart
M tests/lib/js/static_interop_test/js_types_test.dart

Log Message:
-----------
Reland "[dart:js_interop] Make JSFunction and JSExportedDartFunction generic"

This is a reland of commit e7dbd6ba4866af42b917da42433cc651afd650b8

Original change's description:
> [dart:js_interop] Make JSFunction and JSExportedDartFunction generic
>
> Fixes https://github.com/dart-lang/sdk/issues/54557
>
> The generic type in JSExportedDartFunction corresponds to the
> static type of the function it wrapped, whereas for JSFunction,
> it's purely a descriptor of the JS function.
>
> When calling JSExportedDartFunction, a cast is now introduced
> to cast it to T.
>
> When calling isA, the type in JSExportedDartFunction is passed
> along to check that the value that is wrapped is that function
> type. Because the T in JSFunction is descriptive, e.g.
> isA<JSFunction<int Function()>>() does no such check.
>
> ____
>
> Also cleans up:
>
> - isA<JSTypedArray>() logic to use intrinsic functions
> - some expectation files to be consistent for both dart2js and ddc.
>
> CoreLibraryReviewExempt: Backend-specific library with needed reviews.
> Change-Id: I1a55c4386e416fa4ccabe06ac5051f41c2e2e95a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/496820
> Reviewed-by: Lasse Nielsen <l...@google.com>
> Commit-Queue: Srujan Gaddam <sru...@google.com>
> Reviewed-by: Martin Kustermann <kuste...@google.com>

CoreLibraryReviewExempt: Reland.
Change-Id: I29d706aa4967fd80390e8cb37f8144603ec007f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498100
Commit-Queue: Srujan Gaddam <sru...@google.com>
Reviewed-by: Martin Kustermann <kuste...@google.com>


Compare: https://github.com/dart-lang/sdk/compare/13909c16eb8f...94e12177746c

copybara-service[bot]

unread,
Apr 28, 2026, 4:05:21 AM (yesterday) Apr 28
to com...@dartlang.org
Branch: refs/heads/dev
Commit: e5babeeddb7208e1cc6c01349f4aa7a44aa334b5
https://github.com/dart-lang/sdk/commit/e5babeeddb7208e1cc6c01349f4aa7a44aa334b5
Author: mohammadmseet-hue <mohamm...@gmail.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)

Changed paths:
M sdk/lib/_http/crypto.dart

Log Message:
-----------
fix: getRandomBytes never produces byte value 0xff (off-by-one)

Closes https://github.com/dart-lang/sdk/pull/63258

GitOrigin-RevId: a2851eeca440b033f8179f24d0d6db4738ebc48f
Change-Id: I985dac94978af0f47b5d87f0cfa6d568d478cb2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498461
Commit-Queue: Slava Egorov <veg...@google.com>
Reviewed-by: Slava Egorov <veg...@google.com>


Commit: 75479bc7a7b35b8ba82565c6a4212179c6c9c09a
https://github.com/dart-lang/sdk/commit/75479bc7a7b35b8ba82565c6a4212179c6c9c09a
Author: mohammadmseet-hue <mohamm...@gmail.com>
Date: 2026-04-27 (Mon, 27 Apr 2026)

Changed paths:
M sdk/lib/_http/http_parser.dart
M tests/standalone/io/http_parser_test.dart

Log Message:
-----------
fix: reject HTTP requests with Transfer-Encoding not ending in chunked

Closes https://github.com/dart-lang/sdk/pull/63251

GitOrigin-RevId: 55ef08553ee65ab1052a46b92ff57f097863c340
Change-Id: Ibd3e93b553e046962bba36ec683b0d2bb157b264
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498401
Reviewed-by: Slava Egorov <veg...@google.com>
Commit-Queue: Slava Egorov <veg...@google.com>


Commit: efebfb7231198c098951787fd48b2d44f8a5dd9b
https://github.com/dart-lang/sdk/commit/efebfb7231198c098951787fd48b2d44f8a5dd9b
Author: Dart CI <dart-inte...@dart-ci-internal.iam.gserviceaccount.com>
Date: 2026-04-28 (Tue, 28 Apr 2026)

Changed paths:
M CHANGELOG.md
M pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart
M pkg/_js_interop_checks/lib/src/transformations/shared_interop_transformer.dart
M pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
M pkg/dart2wasm/lib/symbols.dart
M pkg/front_end/testcases/dart2js/js_interop_transforms/functiontojs.dart.strong.expect
M pkg/front_end/testcases/dart2js/js_interop_transforms/functiontojs.dart.strong.modular.expect
M pkg/front_end/testcases/dart2js/js_interop_transforms/functiontojs.dart.strong.transformed.expect
M pkg/front_end/testcases/dart2js/js_interop_transforms/isa.dart
M pkg/front_end/testcases/dart2js/js_interop_transforms/isa.dart.strong.expect
M pkg/front_end/testcases/dart2js/js_interop_transforms/isa.dart.strong.modular.expect
M pkg/front_end/testcases/dart2js/js_interop_transforms/isa.dart.strong.transformed.expect
M pkg/front_end/testcases/dartdevc/js_interop_transforms/functiontojs.dart.strong.expect
M pkg/front_end/testcases/dartdevc/js_interop_transforms/functiontojs.dart.strong.modular.expect
M pkg/front_end/testcases/dartdevc/js_interop_transforms/functiontojs.dart.strong.transformed.expect
M pkg/front_end/testcases/dartdevc/js_interop_transforms/isa.dart
M pkg/front_end/testcases/dartdevc/js_interop_transforms/isa.dart.strong.expect
M pkg/front_end/testcases/dartdevc/js_interop_transforms/isa.dart.strong.modular.expect
M pkg/front_end/testcases/dartdevc/js_interop_transforms/isa.dart.strong.transformed.expect
M pkg/linter/lib/src/rules/invalid_runtime_check_with_js_interop_types.dart
M pkg/linter/test/rules/invalid_runtime_check_with_js_interop_types_test.dart
M sdk/lib/_http/crypto.dart
M sdk/lib/_http/http_parser.dart
M sdk/lib/_internal/js_dev_runtime/patch/js_allow_interop_patch.dart
M sdk/lib/_internal/js_dev_runtime/private/interceptors.dart
M sdk/lib/_internal/js_runtime/lib/interceptors.dart
M sdk/lib/_internal/js_runtime/lib/js_allow_interop_patch.dart
M sdk/lib/_internal/js_shared/lib/js_interop_patch.dart
M sdk/lib/_internal/wasm/lib/js_interop_patch.dart
M sdk/lib/js_interop/js_interop.dart
M tests/lib/js/static_interop_test/external_dart_reference_test.dart
M tests/lib/js/static_interop_test/isa/isa_test.dart
M tests/lib/js/static_interop_test/js_types_static_errors_test.dart
M tests/lib/js/static_interop_test/js_types_test.dart
M tests/standalone/io/http_parser_test.dart
M tools/VERSION

Log Message:
-----------
Version 3.13.0-74.0.dev

Merge 75479bc7a7b35b8ba82565c6a4212179c6c9c09a into dev


Compare: https://github.com/dart-lang/sdk/compare/b4dd237ae7fa...efebfb723119

copybara-service[bot]

unread,
Apr 28, 2026, 4:59:43 AM (yesterday) Apr 28
to com...@dartlang.org
Branch: refs/heads/lkgr-dev
Reply all
Reply to author
Forward
0 new messages