Skip to content

Remove extra_info argument from js_optimizer.py. NFC#26981

Merged
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:remove_extra_info
May 20, 2026
Merged

Remove extra_info argument from js_optimizer.py. NFC#26981
sbc100 merged 1 commit into
emscripten-core:mainfrom
sbc100:remove_extra_info

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented May 20, 2026

This had no users. The only user of run_on_file is run_js_optimizer which doesn't pass this argument.

This had no users.  The only user of `run_on_file` is `run_js_optimizer`
which doesn't pass this argument.
@sbc100 sbc100 requested a review from kripken May 20, 2026 00:24
@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented May 20, 2026

The js_optimizer tool seems like it only used for wasm2js output these days. Should we just remove it and rely on the existing closure tools etc, or is it serving some important function?

@kripken
Copy link
Copy Markdown
Member

kripken commented May 20, 2026

We use js_optimizer passes to process the JS for metadce (before and after) and our own emscripten-specific JS optimizations, I think?

@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented May 20, 2026

We use js_optimizer passes to process the JS for metadce (before and after) and our own emscripten-specific JS optimizations, I think?

I think we use acorn_optimizer in all cases except wasm2js. IIUC wasm2js is the only user of js_optimizer.py

@sbc100 sbc100 merged commit 679a213 into emscripten-core:main May 20, 2026
28 of 30 checks passed
@sbc100 sbc100 deleted the remove_extra_info branch May 20, 2026 16:51
@kripken
Copy link
Copy Markdown
Member

kripken commented May 20, 2026

Oh, I forgot that distinction. Yes, maybe we can remove this, then.

@kripken
Copy link
Copy Markdown
Member

kripken commented May 20, 2026

(depending on how well the replacement performs, of course)

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