[dart-lang/sdk] ae33e9: [dart2wasm] Filter out user-provided program const...

0 views
Skip to first unread message

Sam Rawlins

unread,
8:03 AM (5 hours ago) 8:03 AM
to com...@dartlang.org
Branch: refs/heads/main
Home: https://github.com/dart-lang/sdk
Commit: ae33e9c12c4ec4eb546230f4ebeaf72b825c2dce
https://github.com/dart-lang/sdk/commit/ae33e9c12c4ec4eb546230f4ebeaf72b825c2dce
Author: Martin Kustermann <kuste...@google.com>
Date: 2026-04-29 (Wed, 29 Apr 2026)

Changed paths:
M pkg/dart2wasm/analysis_options.yaml
M pkg/dart2wasm/lib/deferred_load/partition.dart
M pkg/dart2wasm/test/deferred_loading/partition_test.dart
A pkg/dart2wasm/test/deferred_loading/partition_tests/dead_constraint.constraints.json
A pkg/dart2wasm/test/deferred_loading/partition_tests/dead_constraint.constraints.txt
A pkg/dart2wasm/test/deferred_loading/partition_tests/dead_constraint.dart
A pkg/dart2wasm/test/deferred_loading/partition_tests/dead_constraint.default.txt

Log Message:
-----------
[dart2wasm] Filter out user-provided program constraints

When users provide program constraints, some of the library import
prefixes will be unreachable. Though the core partitioning algorithm in
dart2wasm will only work on imports sets of alive / reachable prefixes.

=> Make us filter out unreachable library prefixes before processing
user-provided program constraints.
=> Add a check that those we filter out are still valid library prefixes
from the Kernel AST.

Change-Id: Id55064ee03e682a04d5e9117e466ac9573e66a39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498901
Reviewed-by: Nate Biggs <nate...@google.com>
Commit-Queue: Martin Kustermann <kuste...@google.com>


Commit: 5a6b81578930ef1ffd07d765911fd3828026cdcc
https://github.com/dart-lang/sdk/commit/5a6b81578930ef1ffd07d765911fd3828026cdcc
Author: Sam Rawlins <sraw...@google.com>
Date: 2026-04-29 (Wed, 29 Apr 2026)

Changed paths:
M pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
M pkg/analyzer/lib/src/diagnostic/diagnostic.g.dart
M pkg/analyzer/lib/src/diagnostic/diagnostic_code_values.g.dart
M pkg/analyzer/lib/src/error/error_handler_verifier.dart
M pkg/analyzer/lib/src/error/return_type_verifier.dart
M pkg/analyzer/lib/src/generated/error_verifier.dart
M pkg/analyzer/messages.yaml
M pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_to_error_handler_test.dart
M pkg/analyzer/test/src/diagnostics/return_of_invalid_type_from_catch_error_test.dart
A pkg/analyzer/test/src/diagnostics/return_of_invalid_type_from_then_test.dart
M pkg/analyzer/test/src/diagnostics/return_type_invalid_for_catch_error_test.dart
A pkg/analyzer/test/src/diagnostics/return_type_invalid_for_then_test.dart
M pkg/analyzer/test/src/diagnostics/test_all.dart

Log Message:
-----------
analyzer: Report a warning when a Future.then onError handler returns the wrong type.

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

Generally this warning reports these cases:

The function expression has an unassignable return type:

```
void f(Future<int> future) {
future.then((_) => 0, onError: (e, st) => 'c');
}
```

The function has an unassignable return type

```
void f(Future<int> future, String Function(dynamic, StackTrace) cb) {
future.then<int>((_) => 1, onError: cb);
}
```

The block function body has an unassignable return type or is missing a return type:

```
void f(Future<int> future) {
future.then((_) => 0, onError: (e, st) {
if (1 == 2) {
return;
} else {
return 0.5;
}
});
}
```

Change-Id: I5d67ae35109a874543af01936f13256ff457b35b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498240
Reviewed-by: Konstantin Shcheglov <sche...@google.com>
Reviewed-by: Brian Wilkerson <brianwi...@google.com>
Commit-Queue: Samuel Rawlins <sraw...@google.com>


Compare: https://github.com/dart-lang/sdk/compare/890f7e8aa923...5a6b81578930

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

Sam Rawlins

unread,
8:48 AM (5 hours ago) 8:48 AM
to com...@dartlang.org
Branch: refs/heads/lkgr

copybara-service[bot]

unread,
12:04 PM (1 hour ago) 12:04 PM
to com...@dartlang.org
Branch: refs/heads/dev
Commit: 1d8d507384fb14641211eb51143593e1dc0e67fa
https://github.com/dart-lang/sdk/commit/1d8d507384fb14641211eb51143593e1dc0e67fa
Author: Martin Kustermann <kuste...@google.com>
Date: 2026-04-29 (Wed, 29 Apr 2026)

Changed paths:
M pkg/dart2wasm/lib/code_generator.dart
M pkg/dart2wasm/lib/translator.dart
M pkg/dart2wasm/lib/types.dart
M pkg/dart2wasm/test/ir_tests/deferred.constant_module1.wat
M pkg/dart2wasm/test/ir_tests/deferred.constant_module2.wat
M pkg/dart2wasm/test/ir_tests/deferred.fine_grained.wat
M pkg/dart2wasm/test/ir_tests/deferred.init_at_startup.wat
M pkg/dart2wasm/test/ir_tests/deferred.init_at_startup_module1.wat
M pkg/dart2wasm/test/ir_tests/deferred.type_checks_module1.wat
M pkg/dart2wasm/test/ir_tests/dyn_closure.wat
M pkg/dart2wasm/test/ir_tests/dyn_closure_function_apply.wat
M pkg/dart2wasm/test/ir_tests/dyn_closure_function_apply_named.wat
M pkg/wasm_builder/lib/src/builder/instructions.dart
M sdk/lib/_internal/wasm/lib/boxed_int_patch.dart
M sdk/lib/_internal/wasm/lib/type.dart
M sdk/lib/internal/iterable.dart

Log Message:
-----------
[dart2wasm] More precise inlining

This reduces e main module by around -0.3%.

We make the inliner have more precision when estimating the
callee size, especially around constructors but also other
cases.

We are also less generous with budget for iterators, modulo list
iterators which we want to be always inlined.

We also print the inlining decisions in `--print-wasm`

In deferred loading scenario this now inlines constructor bodies
more often than before as the size estimate is better. That in
return avoids us e.g. exporting empty constructor body functions
in the main module to be imported by other modules.

CoreLibraryReviewExempt: Backend-specific function changes.
Change-Id: I320db6f976a5d8c036b40908a5f72e7019d420ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498562
Reviewed-by: Srujan Gaddam <sru...@google.com>
Commit-Queue: Martin Kustermann <kuste...@google.com>


Commit: 8e166e93d3023d2a499486dc6eabc851174525ad
https://github.com/dart-lang/sdk/commit/8e166e93d3023d2a499486dc6eabc851174525ad
Author: Jens Johansen <je...@google.com>
Date: 2026-04-29 (Wed, 29 Apr 2026)

Changed paths:
M pkg/front_end/lib/src/base/crash.dart
M pkg/front_end/test/spell_checking_list_tests.txt
M pkg/front_end/test/tool_git_test.dart
M pkg/front_end/tool/cfe
M pkg/front_end/tool/cfe.dart
R pkg/front_end/tool/log_collector.dart

Log Message:
-----------
[CFE] Remove crash data posting to some local service

Change-Id: I305f2d2e5ae85b17c99c29fc6e2816943d68e46c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/497540
Reviewed-by: Johnni Winther <johnni...@google.com>
Commit-Queue: Jens Johansen <je...@google.com>


Commit: b4254d0946f4a960347cc7f836701e636ee735cd
https://github.com/dart-lang/sdk/commit/b4254d0946f4a960347cc7f836701e636ee735cd
Author: Konstantin Shcheglov <sche...@google.com>
Date: 2026-04-29 (Wed, 29 Apr 2026)

Changed paths:
M pkg/analyzer/lib/src/dart/element/element.dart

Log Message:
-----------
CQ. Change _isTopGetter to check for GetterElement.

We want a getter, we now check that it is really a getter, and not a
setter. Theoretically a bug, but libraries that are tested had only
getters.

Change-Id: Ie0e76dd2c72c63619f94fb24929942fba2d14b30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499020
Reviewed-by: Johnni Winther <johnni...@google.com>
Commit-Queue: Konstantin Shcheglov <sche...@google.com>


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

Changed paths:
M pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
M pkg/analyzer/lib/src/dart/element/element.dart
M pkg/analyzer/lib/src/diagnostic/diagnostic.g.dart
M pkg/analyzer/lib/src/diagnostic/diagnostic_code_values.g.dart
M pkg/analyzer/lib/src/error/error_handler_verifier.dart
M pkg/analyzer/lib/src/error/return_type_verifier.dart
M pkg/analyzer/lib/src/generated/error_verifier.dart
M pkg/analyzer/messages.yaml
M pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_to_error_handler_test.dart
M pkg/analyzer/test/src/diagnostics/return_of_invalid_type_from_catch_error_test.dart
A pkg/analyzer/test/src/diagnostics/return_of_invalid_type_from_then_test.dart
M pkg/analyzer/test/src/diagnostics/return_type_invalid_for_catch_error_test.dart
A pkg/analyzer/test/src/diagnostics/return_type_invalid_for_then_test.dart
M pkg/analyzer/test/src/diagnostics/test_all.dart
M pkg/dart2wasm/analysis_options.yaml
M pkg/dart2wasm/lib/code_generator.dart
M pkg/dart2wasm/lib/deferred_load/partition.dart
M pkg/dart2wasm/lib/translator.dart
M pkg/dart2wasm/lib/types.dart
M pkg/dart2wasm/test/deferred_loading/partition_test.dart
A pkg/dart2wasm/test/deferred_loading/partition_tests/dead_constraint.constraints.json
A pkg/dart2wasm/test/deferred_loading/partition_tests/dead_constraint.constraints.txt
A pkg/dart2wasm/test/deferred_loading/partition_tests/dead_constraint.dart
A pkg/dart2wasm/test/deferred_loading/partition_tests/dead_constraint.default.txt
M pkg/dart2wasm/test/ir_tests/deferred.constant_module1.wat
M pkg/dart2wasm/test/ir_tests/deferred.constant_module2.wat
M pkg/dart2wasm/test/ir_tests/deferred.fine_grained.wat
M pkg/dart2wasm/test/ir_tests/deferred.init_at_startup.wat
M pkg/dart2wasm/test/ir_tests/deferred.init_at_startup_module1.wat
M pkg/dart2wasm/test/ir_tests/deferred.type_checks_module1.wat
M pkg/dart2wasm/test/ir_tests/dyn_closure.wat
M pkg/dart2wasm/test/ir_tests/dyn_closure_function_apply.wat
M pkg/dart2wasm/test/ir_tests/dyn_closure_function_apply_named.wat
M pkg/front_end/lib/src/base/crash.dart
M pkg/front_end/test/spell_checking_list_tests.txt
M pkg/front_end/test/tool_git_test.dart
M pkg/front_end/tool/cfe
M pkg/front_end/tool/cfe.dart
R pkg/front_end/tool/log_collector.dart
M pkg/wasm_builder/lib/src/builder/instructions.dart
M sdk/lib/_internal/wasm/lib/boxed_int_patch.dart
M sdk/lib/_internal/wasm/lib/type.dart
M sdk/lib/internal/iterable.dart
M tools/VERSION

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

Merge b4254d0946f4a960347cc7f836701e636ee735cd into dev


Compare: https://github.com/dart-lang/sdk/compare/25910e31a6d2...6fda0523c6c5

copybara-service[bot]

unread,
1:27 PM (3 minutes ago) 1:27 PM
to com...@dartlang.org
Branch: refs/heads/lkgr-dev
Reply all
Reply to author
Forward
0 new messages