aboutsummaryrefslogtreecommitdiff
path: root/lib/scope.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-04-15 22:23:11 +0800
committerGitHub <noreply@github.com>2019-04-15 22:23:11 +0800
commit5172ba5f2ade22716e65ff2333218fc08996bfcc (patch)
treef5d5084980b543c64b7fedd1c233eb8b4414ddb2 /lib/scope.js
parenta57b069409d84e3768dfd8e786532e458f68e553 (diff)
downloadtracifyjs-5172ba5f2ade22716e65ff2333218fc08996bfcc.tar.gz
tracifyjs-5172ba5f2ade22716e65ff2333218fc08996bfcc.zip
introduce `functions` (#3360)
`var f = function() {};` => `function f() {}`
Diffstat (limited to 'lib/scope.js')
-rw-r--r--lib/scope.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/scope.js b/lib/scope.js
index f78b4c5e..b6bfe1a8 100644
--- a/lib/scope.js
+++ b/lib/scope.js
@@ -333,7 +333,7 @@ function next_mangled_name(scope, options, def) {
} while (scope = scope.parent_scope);
});
var name;
- for (var i = 0, len = holes.length; i < len; i++) {
+ for (var i = 0; i < holes.length; i++) {
name = base54(holes[i]);
if (names[name]) continue;
holes.splice(i, 1);
@@ -555,7 +555,7 @@ var base54 = (function() {
var freq = Object.create(null);
function init(chars) {
var array = [];
- for (var i = 0, len = chars.length; i < len; i++) {
+ for (var i = 0; i < chars.length; i++) {
var ch = chars[i];
array.push(ch);
freq[ch] = -1e-2 * i;