mangleScope(scope) {
      const mangler = this;
      const { scopeTracker } = mangler;

      // Unsafe Scope
      if (!mangler.eval && hasEval(scope)) {
        return;
      }

      // Already visited
      // This is because for a function, in Babel, the function and
      // the function body's BlockStatement has the same scope, and will
      // be visited twice by the Scopable handler, and we want to mangle
      // it only once
      if (mangler.visitedScopes.has(scope)) {
        return;
      }
      mangler.visitedScopes.add(scope);

      const bindings = scopeTracker.bindings.get(scope);
      const names = [...bindings.keys()];

      // A counter to generate names and reset
      // so we can reuse removed names
      let counter = 0;

      /**
       * 1. Iterate through the list of BindingIdentifiers
       * 2. Rename each of them in-place
       * 3. Update the scope tree.
       *
       * We cannot use a for..of loop over bindings.keys()
       * because (2) we rename in place and update the bindings
       * as we traverse through the keys
       */
      for (const oldName of names) {
        const binding = bindings.get(oldName);

        if (mangler.canMangle(oldName, binding, scope)) {
          let next;
          do {
            next = mangler.charset.getIdentifier(counter++);
          } while (!mangler.isValidName(next, binding, scope));

          // Reset so variables which are removed can be reused
          //
          // the following is an assumtion (for perf)
          // the length 3 is an assumption that if the oldName isn't
          // 1 or 2 characters, then probably we are not going to find
          // a name - because for almost all usecases we have 1 or 2
          // character new names only. And for the edge cases where
          // one scope has lots and lots of variables, it's okay to
          // name something with 3 characters instead of 1
          if (oldName.length < 3) {
            counter = 0;
          }

          // Once we detected a valid `next` Identifier which could be used,
          // call the renamer
          mangler.rename(scope, binding, oldName, next);
        }
      }
    }
Mangle the scope
@param {Scope} scope