We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
hoist_props
Bug report or feature request? feature
ES5 or ES6+ input? ES5
Uglify version (uglifyjs -V) uglify-js 3.1.10
uglifyjs -V
JavaScript input
Split out the ES5 test cases from #2503 (comment)
Object/Array literals ought to work in hoist_props as numbers already do:
$ echo 'var o = { a:1, f:function(x){console.log(x)} }; o.f(o.a);' | bin/uglifyjs --toplevel -c hoist_props,passes=9 -b console.log(1);
$ echo 'var o = { a:[1], f:function(x){console.log(x)} }; o.f(o.a);' | bin/uglifyjs --toplevel -c hoist_props,passes=9 -b var o = { a: [ 1 ], f: function(x) { console.log(x); } }; o.f(o.a);
$ echo 'var o = { a:{b:2}, f:function(x){console.log(x)} }; o.f(o.a);' | bin/uglifyjs --toplevel -c hoist_props,passes=9 -b var o = { a: { b: 2 }, f: function(x) { console.log(x); } }; o.f(o.a);
The text was updated successfully, but these errors were encountered:
extend escape analysis on constant expression properties
f5c6118
fixes mishoo#2508
extend escape analysis on constant expression properties (#2509)
3b28b91
fixes #2508
Successfully merging a pull request may close this issue.
Bug report or feature request?
feature
ES5 or ES6+ input?
ES5
Uglify version (
uglifyjs -V
)uglify-js 3.1.10
JavaScript input
Split out the ES5 test cases from #2503 (comment)
Object/Array literals ought to work in
hoist_props
as numbers already do:The text was updated successfully, but these errors were encountered: