kzc
kzc
This error supports the analysis above: ``` $ echo 'var a=0; { function a(){} a(); } console.log("PASS");' | node0_12_9 --use_strict [stdin]:1 var a=0; { function a(){} a(); } console.log("PASS"); ^^^^^^^^...
Yeah, it seems to be a `harmony` issue.
Neutral on the PR, but the concept seems okay behind a flag defaulting to false. Needs a command line flag and documentation. Please put a `WIP:` prefix in PR title.
AST_SymbolRef#global() will tell you whether it's global or not. Mind you if a global is aliased via assignment or passed via a function argument all bets are off. There's no...
AST_SymbolRef#global() does work. Something else is wrong in your algorithm. Add some debug print statements. You still have to handle AST_Sub cases and mangle collisions as well.
Yes, the second example above is definitely wrong. It apparently ignores the side effects of the outermost `AST_Call.expression`. Are we in agreement that the first example above is fine, and...
This shows the issue more clearly: ``` $ echo '/*#__PURE__*/fn1(fn2(a()), b())(c());' | bin/uglifyjs -c -b c(); ``` This call should be removed: ``` /*#__PURE__*/fn1(fn2(a()), b())(c()); ^ ^ ``` It should...
> Not rly :troll: I've written babel-plugin-annotate-pure-calls and was playing around with test cases when Ive discovered this. Good to know that this wasn't discovered in real life code. I...
@alexlamsl What's your take on this issue? Should a pure annotated call ignore the side effects of `AST_Call.expression` as it does now or should side effects be considered as is...
> (I like how pure_funcs assumes both expression & call are pure, but that's topic for another day.) Actually, that is the topic for today. :-) @alexlamsl Implementation aside, do...