code: function(array) {
      var firstNode = array.length - 2;
      var nextNode = array.length - 1;
      var currentDepth, availableNodes, lastNode, i;
  
      for (currentDepth = 1, availableNodes = 2;
           availableNodes > 0;
           currentDepth++) {
        lastNode = firstNode;
        firstNode = first (array, lastNode - 1, 0);
  
        for (i = availableNodes - (lastNode - firstNode); i > 0; i--) {
          array[nextNode--] = currentDepth;
        }
  
        availableNodes = (lastNode - firstNode) << 1;
      }
    }
docs: A final allocation pass with no code length limit
  @param array The code length array