anchor.diff:             (old (gethash n *id->name*)))
         (when (and old
                    (not (equal id old)))
  -        (setf *id-conflicts* t)
  +        (push :id-conflicts *need-second-pass*)
           (setf (gethash (incf *next-id*) *id->name*) old)
           (setf (gethash old *name->id*) *next-id*))
         (setf (gethash n *id->name*) id)
  
positive.code:                         ,@(unless operands
                              `((declare (ignore args))))
                          ,@(loop for cap in required-capabilities
                                  collect `(assert (gethash ',cap *enabled-caps*)))
                          ,@(when (and resultp ;; ??
                                       ;; type-forward-pointer doesn't have dest?
                                       (alexandria:starts-with-subseq
  
negative.code:   (setf (gethash string *imported-exts*) id)
    (setf (gethash id *ext-enums*) (getf 3b-spirv::*spec* :glsl-opcodes)))
  
  (defun add-missing-caps ()
    (loop for c = (pop *automatic-caps*)
          while c
          do (format t "adding cap ~s~%" c)
          do (ll-assemble1 `(spirv-core:capability ,c))))
  
  (defun check-section (op)
    ;; section numbers from
    ;; https://www.khronos.org/registry/spir-v/specs/1.1/SPIRV.html#_a_id_logicallayout_a_logical_layout_of_a_module
    (let* ((section (gethash op *opcode-sections* '(11)))
           (min (reduce 'min section)))
      (when (and (<= *current-section* 1)
                 (<= 2 min))
        (add-missing-caps))
      (unless (member *current-section* section)
        (if (< *current-section* min)
            (setf *current-section* min)
            (error "got instruction ~s in section ~s, should be in ~s" op
                   *current-section* section)))))
  
  
  (defun check-cap (cap)
    (format t "check cap ~s (~s ~s)~%" cap
             (gethash cap *enabled-caps*)
                (member cap *automatic-caps*))
    (unless (or (gethash cap *enabled-caps*)
                (member cap *automatic-caps*))
      (restart-case
          (error (make-condition 'cap-not-enabled :cap cap))
        (add-caps ()
          :report "Add capabilities automatically"
          (pushnew :missing-caps *need-second-pass*)
          (pushnew cap *automatic-caps*)))))
  
  (defun use-type (type &key define)
    #++(when define (format t "define types ~s~%" type))
  