You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5f49ce5
Browse filesBrowse the repository at this point in the historyBrowse files
perf(javascript): print a mangled program once, naming it afterwards
The mangle phase printed the tree twice: once to count the characters
the names are chosen from, once for the result. It now prints before
the names are chosen, recording where each name, each `const` the
improve phase writes as `let` and each import or export `as` clause
lies, counts the characters off that text and writes the names into it
once chosen, moving the source map's columns with them. A print that
wrote a comment, shebang or preamble still counts with a print of its
own, as those are not counted.
* @property {PrintIdentifier[] | null} functionDeclarators under `keep_fnames`, the names declarators give anonymous functions, in the order the mangler asks `keep_fnames` of them
1685
1685
* @property {PrintIdentifier[]} catchParameters unless `ie8` or `safari10` move them, the catch parameters, in the order the mangler walks them
1686
1686
* @property {number[]} catchParameterScopeCounts how many scopes the walk had opened at each catch parameter
1687
+
* @property {boolean} namesPrivate whether the program names a private member, which renaming walks it for
1687
1688
*/
1688
1689
1689
1690
/**
@@ -1832,6 +1833,8 @@ class MinifierScopeAnalyzer extends ScopeAnalyzer {
1832
1833
this.catchParameters=[];
1833
1834
/** @type {number[]} */
1834
1835
this.catchParameterScopeCounts=[];
1836
+
/** @type {boolean} whether the program names a private member */
1837
+
this.namesPrivate=false;
1835
1838
/** @type {PrintNode[]} the nodes terser's walk has pushed, the node visited last */
1836
1839
this.stack=[];
1837
1840
/** @type {boolean} */
@@ -2509,6 +2512,7 @@ class MinifierScopeAnalyzer extends ScopeAnalyzer {
0 commit comments