Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Improve tree-shaking: #45

Closed
wants to merge 3 commits into from

Conversation

mraleph
Copy link

@mraleph mraleph commented Jun 12, 2024

  • Use dart2js:prefer-inline everywhere where we use vm:prefer-inline.
  • Make platformOS const/platform-const by wrapping version into a thunk. This means you don't have to lazy initialize the final field.
  • Allow full constant folding of OperatingSystem.current if overrideOperatingSystem is never called in the program by going through an indirection. Without this indirection a bunch of goo stays behind after each invocation of OperatingSystem.current in the program

* Use `dart2js:prefer-inline` everywhere where we use `vm:prefer-inline`.
* Make `platformOS` const/platform-const by wrapping version into a
thunk. This means you don't have to lazy initialize the final field.
@mraleph mraleph requested a review from lrhn June 12, 2024 07:30
@mosuem
Copy link
Contributor

mosuem commented Oct 17, 2024

Closing as the dart-lang/os_detect repository is merged into the dart-lang/core monorepo. Please re-open this PR there!

@mosuem mosuem closed this Oct 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants