code: private String serializeMappings() {
          int previousGeneratedColumn = 0;
          int previousGeneratedLine = 1;
          int previousOriginalColumn = 0;
          int previousOriginalLine = 0;
          int previousName = 0;
          int previousSource = 0;
          String result = "";
          Mapping mapping;
          int nameIdx;
          int sourceIdx;
  
          List<Mapping> mappings = this._mappings.toArray();
          for (int i = 0, len = mappings.size(); i < len; i++) {
              mapping = mappings.get(i);
              if (mapping.generated.line != previousGeneratedLine) {
                  previousGeneratedColumn = 0;
                  while (mapping.generated.line != previousGeneratedLine) {
                      result += ';';
                      previousGeneratedLine++;
                  }
              } else {
                  if (i > 0) {
                      if (Util.compareByGeneratedPositionsInflated(mapping, mappings.get(i - 1)) == 0) {
                          continue;
                      }
                      result += ',';
                  }
              }
  
              result += Base64VLQ.encode(mapping.generated.column - previousGeneratedColumn);
              previousGeneratedColumn = mapping.generated.column;
  
              if (mapping.source != null) {
                  sourceIdx = this._sources.indexOf(mapping.source);
                  result += Base64VLQ.encode(sourceIdx - previousSource);
                  previousSource = sourceIdx;
  
                  // lines are stored 0-based in SourceMap spec version 3
                  result += Base64VLQ.encode(mapping.original.line - 1 - previousOriginalLine);
                  previousOriginalLine = mapping.original.line - 1;
  
                  result += Base64VLQ.encode(mapping.original.column - previousOriginalColumn);
                  previousOriginalColumn = mapping.original.column;
  
                  if (mapping.name != null) {
                      nameIdx = this._names.indexOf(mapping.name);
                      result += Base64VLQ.encode(nameIdx - previousName);
                      previousName = nameIdx;
                  }
              }
          }
  
          return result;
      }
docs: Serialize the accumulated mappings in to the stream of base 64 VLQs specified by the source map format.