Skip to content

Conversation

@mkustermann
Copy link
Member

  • Flags to dart compile wasm

    Some options are not relevant to a standalone user of dart compile wasm (e.g. specyfing dart-sdk, platform file etc). => Those aren't offered by the dart compile wasm tool directly. => We use the --extra-compiler-option= instead which passes through arbitrary options to the dart2wasm compiler. => We don't maintain compatibility of those options, if we update them we'll ensure to also update flutter tools

  • Binaryen optimization passes

    This change will mean we use the binaryen flags from Dart SDK which are slightly different from the ones in flutter.

  • Optimization configuration

    This change will also start using the more standardized -O flag for determining optimization levels. The meaning of those flags have been mostly aligned with dart2js (with some differences remaining).

  • Minimization

    Using the new optimization flags, namely -O4 for --wasm-opt=full, will automatically enable the new --minify support. Minification is Dart semantics preserving but changes the <obj>.runtimeType.toString() to use minified names (just as in dart2js).

  • Code size changes

    Overall this change will reduce wonderous code size by around 10%.

Issue dart-lang/sdk#54675

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 12, 2024
@kevmoo kevmoo added the team-web Owned by Web platform team label Feb 13, 2024
Copy link
Contributor

@kevmoo kevmoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but @eyebrowsoffire should review, too

Copy link
Contributor

@eyebrowsoffire eyebrowsoffire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Eventually I will probably want to get rid of the --omit-type-checks flag and just expose the -O level of the wasm compiler. I assume though that the only differences between -O2 and -O4 at the moment are the type checking?

@mkustermann
Copy link
Member Author

Looks good to me! Eventually I will probably want to get rid of the --omit-type-checks flag and just expose the -O level of the wasm compiler.

Yes please :-)

We should align flutter's uses of dart2wasm and dart2js, to also ensure we get fair comparison numbers.

I assume though that the only differences between -O2 and -O4 at the moment are the type checking?

Flutter should simply use the same -O flags for dart2js and dart2wasm and the Dart compiler folks should ensure the optimization levels behaviors are aligned. -O2 is semantics preserving and starting at -O3 we stop following dart semantics.

Yes, right now the difference is type checks, but we may do more alignment between dart2js and dart2wasm in behavior of those flags.

@mkustermann mkustermann merged commit abadf9f into flutter:master Feb 14, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 14, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 14, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 14, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 15, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 16, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 16, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Feb 16, 2024
Roll Flutter from a628814 to d7867ca (66 revisions)

flutter/flutter@a628814...d7867ca

2024-02-16 [email protected] Roll Packages from ef349be to c56c12d (5 revisions) (flutter/flutter#143581)
2024-02-16 [email protected] Update `MaterialStatesController` docs for calling `setState` in a listener  (flutter/flutter#143453)
2024-02-16 [email protected] Update `DataTable`  docs for  disabled `DataRow` ink well (flutter/flutter#143450)
2024-02-16 [email protected] Roll Flutter Engine from b7103bc8b374 to dd530f1556df (17 revisions) (flutter/flutter#143565)
2024-02-16 [email protected] Manual roll Flutter Engine from b7103bc8b374 to 7de84271eb65 (flutter/flutter#143564)
2024-02-16 [email protected] Manual roll Flutter Engine from d3c71d78f8ef to df0dc1fc06ca (flutter/flutter#143563)
2024-02-16 [email protected] Manual roll Flutter Engine from bc4dd534a0fa to d3c71d78f8ef (flutter/flutter#143561)
2024-02-16 [email protected] Manual roll Flutter Engine from edb2745e9834 to bc4dd534a0fa (flutter/flutter#143559)
2024-02-16 [email protected] Manual roll Flutter Engine from 15a358bbaf71 to edb2745e9834 (flutter/flutter#143555)
2024-02-16 [email protected] [devicelab] retain prior events for flutter gallery. (flutter/flutter#143554)
2024-02-16 [email protected] Reland "Disentangle and align flutter build web --wasm flags (#143517)" (flutter/flutter#143549)
2024-02-16 [email protected] Roll Flutter Engine from 3af336bfb2df to 15a358bbaf71 (1 revision) (flutter/flutter#143428)
2024-02-15 [email protected] Android Gradle file templates: make it easier to convert them to Kotlin DSL in the future (flutter/flutter#142146)
2024-02-15 [email protected] Remove bringup from win arm64 builds. (flutter/flutter#143548)
2024-02-15 [email protected] Fix minor spelling error (flutter/flutter#143541)
2024-02-15 [email protected] [devicelab] migrate new gallery benchmarks to local copy. (flutter/flutter#143545)
2024-02-15 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.24.1 to 3.24.3 (flutter/flutter#143546)
2024-02-15 [email protected] [flutter_tool] [dap] Forward Flutter progress events to DAP client (flutter/flutter#142524)
2024-02-15 [email protected] Swap the tasks that have been running fine for a while. (flutter/flutter#143544)
2024-02-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Disentangle and align `flutter build web --wasm` flags (#143517)" (flutter/flutter#143547)
2024-02-15 [email protected] Reland simulatedAccessibilityTraversal fix (flutter/flutter#143527)
2024-02-15 [email protected] Disentangle and align `flutter build web --wasm` flags (flutter/flutter#143517)
2024-02-15 [email protected] [devicelab] introduce new old gallery. (flutter/flutter#143486)
2024-02-15 [email protected] Remove certs dependency. (flutter/flutter#143495)
2024-02-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Fix and test SemanticsController.simulatedAccessibilityTraversal (#143386)" (flutter/flutter#143523)
2024-02-15 [email protected] Roll Packages from a864254 to ef349be (9 revisions) (flutter/flutter#143521)
2024-02-15 [email protected] Modify `plugin_ffi` and `package_ffi` template (flutter/flutter#143376)
2024-02-15 [email protected] Remove certs installation from win_arm builds. (flutter/flutter#143487)
2024-02-14 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[a11y] Add isEnabled semantics flag to  text field (#143334)" (flutter/flutter#143494)
2024-02-14 98614782+auto-submit[bot]@users.noreply.github.com Reverts "[a11y] Fix date picker cannot focus on the edit field (#143117)" (flutter/flutter#143493)
2024-02-14 [email protected] [a11y] Fix date picker cannot focus on the edit field (flutter/flutter#143117)
2024-02-14 [email protected] cleanup now-irrelevant ignores for `deprecated_member_use` (flutter/flutter#143403)
2024-02-14 [email protected] Fix and test SemanticsController.simulatedAccessibilityTraversal (flutter/flutter#143386)
2024-02-14 [email protected] Disable deprecation warnings for mega_gallery (flutter/flutter#143466)
2024-02-14 [email protected] The initial/selected item on popup menu should always be visible (flutter/flutter#143118)
2024-02-14 [email protected] Roll native_assets_builder to 0.5.0 (flutter/flutter#143472)
2024-02-14 [email protected] InputDecorator M3 test migration step2 (flutter/flutter#143369)
2024-02-14 [email protected] Add more documentation for TextEditingController default constructor (flutter/flutter#143452)
2024-02-14 [email protected] Format all kotlin according to ktlint (flutter/flutter#143390)
2024-02-14 [email protected] Marks Linux_pixel_7pro integration_ui_keyboard_resize to be unflaky (flutter/flutter#143440)
2024-02-14 [email protected] Roll Packages from 9385bbb to a864254 (6 revisions) (flutter/flutter#143454)
2024-02-14 [email protected] [tools] Add column header for emulators information (flutter/flutter#142853)
2024-02-14 [email protected] Use `dart compile wasm` for wasm compilations (flutter/flutter#143298)
2024-02-14 [email protected] [devicelab] retain first frame data in certain integration tests. (flutter/flutter#143419)
2024-02-14 [email protected] Roll Flutter Engine from 0849250a1419 to 3af336bfb2df (2 revisions) (flutter/flutter#143427)
2024-02-14 [email protected] Roll Flutter Engine from 215d55f4f82d to 0849250a1419 (2 revisions) (flutter/flutter#143425)
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-web Owned by Web platform team tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants