-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compiler
Description
The shared rti library contains some specialized cast helper methods for some core types. ex:
sdk/sdk/lib/_internal/js_shared/lib/rti.dart
Line 1793 in 7134a45
| int _asInt(Object? object) { |
sdk/sdk/lib/_internal/js_shared/lib/rti.dart
Line 1818 in 7134a45
| int? _asIntQ(dynamic object) { |
DDC should generate code to invoke these methods directly when possible.
These can replace some existing calls to methods that are a legacy from the old type system allowing for some cleanup. ex:
| asInt(obj) { |
| asNullableInt(obj) => obj == null ? null : asInt(obj); |
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dev-compiler