Repository navigation
🐛 fix(js): keep stores to top-level bindings - #2525
Conversation
Merging this PR will regress 1 benchmark2 warnings
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
dead_store_value dropped an assignment to any binding the script never read again, top-level ones included. A top-level var, let or function is a global another script can read, so its stores are observable and now stay.
566f920 to
77b832a
Compare
minify_js()dropped assignments to top-level bindings that the script never read again:A top-level
var,letor function is a global that another script on the page can read, so its stores are observable.dead_store_valuenow refuses a target declared in the global scope. Stores to function-local bindings are still dropped as before.The minify-js benchmark sizes don't change: the libraries keep their code inside a function wrapper.