- (test-type value err-lab t ,@type-codes)
- (move result value))))))
- ,@(when ptype
- `((primitive-type-vop ,check-name (:check) ,ptype))))))
-
-(defmacro def-simple-type-vops (pred-name check-name ptype error-code
- &rest type-codes)
- (let ((cost (cost-to-test-types (mapcar #'eval type-codes))))
- `(progn
- ,@(when pred-name
- `((define-vop (,pred-name simple-type-predicate)
- (:translate ,pred-name)
- (:generator ,cost
- (test-type value target not-p ,@type-codes)))))
- ,@(when check-name
- `((define-vop (,check-name simple-check-type)
- (:generator ,cost
- (let ((err-lab
- (generate-error-code vop ,error-code value)))
- (test-type value err-lab t ,@type-codes)