anchor.diff:          (unless (or (eq type alias-for) (find-class type nil))
             (collect-type-form `(deftype ,type () ',alias-for)))
             (collect-type-form
  -           (make-structure-class-forms type slots non-lazy-fields lazy-fields)))
  +           (make-structure-class-forms type slots non-lazy-fields lazy-fields oneofs)))
         (collect-form `(record-protobuf-object ',type ,message :message))
         ;; Group can never be a top level element.
         `(progn
  
positive.code:                        (find-if #'(lambda (el)
                                      (eq (field-data-internal-slot-name el) '%%is-set))
                                  slots)))
           (additional-slots '(%%is-set)))
      (with-gensyms (obj)
        `(progn
           ;; DEFSTRUCT form.
  
negative.code: 
          (export '(,has-function-name ,clear-function-name ,public-accessor-name))))))
  
  (defun make-oneof-accessor-forms (proto-type oneof)
    (let* ((public-slot-name (oneof-descriptor-external-name oneof))
           (hidden-slot-name (oneof-descriptor-internal-name oneof))
           (is-set-accessor (fintern "~A-%%IS-SET" proto-type))
           (hidden-accessor-name (fintern "~A-~A" proto-type hidden-slot-name))
           (index (oneof-descriptor-index oneof))
           (case-function-name (proto-slot-function-name proto-type public-slot-name :case))
           (has-function-name (proto-slot-function-name proto-type public-slot-name :has))
           (clear-function-name (proto-slot-function-name proto-type public-slot-name :clear)))
      (with-gensyms (obj)
        `(
          (declaim (inline ,case-function-name))
          (defun ,case-function-name (,obj)
            (case (oneof-data-set-field (,hidden-accessor-name ,obj))
              ,@(loop for field across (oneof-descriptor-fields oneof)
                      collect
                      (let ((offset (proto-oneof-offset field))
                            (keyword (keywordify (proto-external-field-name field))))
                        `((,offset) ,keyword)))
              ((nil) :%unset)))
  
          (declaim (inline ,has-function-name))
          (defun ,has-function-name (,obj)
            (= (bit (,is-set-accessor ,obj) ,index) 1))
  
          (declaim (inline ,clear-function-name))
          (defun ,clear-function-name (,obj)
            (setf (oneof-data-value (,hidden-accessor-name ,obj)) nil)
            (setf (bit (,is-set-accessor ,obj) ,index) 0)
            (setf (oneof-data-set-field (,hidden-accessor-name ,obj)) nil))
  
          (export '(,case-function-name ,has-function-name ,clear-function-name))
  
          ,@(loop
              for field across (oneof-descriptor-fields oneof)
              append
              (let* ((public-slot-name (proto-external-field-name field))
                     (public-accessor-name (proto-slot-function-name
                                            proto-type public-slot-name :get))
                     (has-function-name    (proto-slot-function-name
                                            proto-type public-slot-name :has))
                     (clear-function-name  (proto-slot-function-name
                                            proto-type public-slot-name :clear))
                     (default-form (get-default-form (proto-set-type field)
                                                     (proto-default field)))
                     (field-type (proto-set-type field)))
                (with-gensyms (obj new-value)
                  `((declaim (inline ,public-accessor-name))
                    (defun ,public-accessor-name (,obj)
                      (if (eq (oneof-data-set-field (,hidden-accessor-name ,obj))
                              ,(proto-oneof-offset field))
                          (oneof-data-value (,hidden-accessor-name ,obj))
                          ,default-form))
  
                    (declaim (inline (setf ,public-accessor-name)))
                    (defun (setf ,public-accessor-name) (,new-value ,obj)
                      (declare (type ,field-type ,new-value))
                      (setf (bit (,is-set-accessor ,obj) ,index) 1)
                      (setf (oneof-data-set-field (,hidden-accessor-name ,obj))
                            ,(proto-oneof-offset field))
                      (setf (oneof-data-value (,hidden-accessor-name ,obj)) ,new-value))
  
                    (declaim (inline ,has-function-name))
                    (defun ,has-function-name (,obj)
                      (and (= (bit (,is-set-accessor ,obj) ,index) 1)
                           (eq (oneof-data-set-field (,hidden-accessor-name ,obj))
                               ,(proto-oneof-offset field))))
  
                    (declaim (inline ,clear-function-name))
                    (defun ,clear-function-name (,obj)
                      (when (,has-function-name ,obj)
                        (setf (bit (,is-set-accessor ,obj) ,index) 0)
                        (setf (oneof-data-value (,hidden-accessor-name ,obj)) nil)
                        (setf (oneof-data-set-field (,hidden-accessor-name ,obj)) nil)))
  
                    (defmethod ,public-slot-name ((,obj ,proto-type))
                      (,public-accessor-name ,obj))
  
                    (defmethod (setf ,public-slot-name) (,new-value (,obj ,proto-type))
                      (setf (,public-accessor-name ,obj) ,new-value))
  
                    (export '(,has-function-name ,clear-function-name
                              ,public-accessor-name))))))))))
  
  (defun make-map-accessor-forms (proto-type public-slot-name slot-name field)
    "This creates forms that define map accessors which are type safe. Using these will
  