code: function emitObject() {
        var item = {
          type: types[type],
          size: length,
          body: bops.join(parts),
          offset: start
        };
        if (ref) item.ref = ref;
        parts.length = 0;
        start = 0;
        offset = 0;
        type = 0;
        length = 0;
        ref = null;
        emit(item);
      }
docs: Common helper for emitting all three object shapes