Skip to content

Use var and undefined in libwebaudio.js. NFC #24814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2025

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jul 30, 2025

The convention for JS library code is to use var for better minification.

The use of void 0 instead of undefined I believe is a minor code size optimization, but its somewhat obscure and (as you can see from the fact that the code expectations didn't change) it an optimization that is already performed on the generated code anyway.

Split out from #24732

@sbc100 sbc100 requested review from kripken and juj July 30, 2025 17:15
@sbc100
Copy link
Collaborator Author

sbc100 commented Jul 30, 2025

@cwoffenden

@sbc100 sbc100 force-pushed the libwebaudio branch 3 times, most recently from 3b2b1f4 to 2ffb386 Compare July 30, 2025 19:11
The convention for JS library code is to use var for better
minification.

The use of `void 0` instead of `undefined` I believe is a minor code
size optimization, but its somewhat obscure and (as you can see from the
fact that the code expectations didn't change) it an optimization that
is already performed on the generated code anyway.

Split out from emscripten-core#24732
@sbc100 sbc100 enabled auto-merge (squash) July 30, 2025 22:44
@sbc100 sbc100 merged commit 94d1e77 into emscripten-core:main Jul 30, 2025
30 checks passed
@sbc100 sbc100 deleted the libwebaudio branch July 30, 2025 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants