Skip to content
Snippets Groups Projects
Commit 2d324704 authored by pfdietz's avatar pfdietz
Browse files

Conditionalize out forms that abcl doesn't compile yet.

parent 5cc635b9
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
(apply (the function (eval `(function ,(getf plist :unoptimized-lambda-form)))) (apply (the function (eval `(function ,(getf plist :unoptimized-lambda-form))))
(getf plist :vals))))) (getf plist :vals)))))
(defun p (i) (write (elt $y i) :pretty t :escape t) (values))
(defun tn (n &optional (size 100)) (defun tn (n &optional (size 100))
(length (setq $y (prune-results (setq $x (test-random-integer-forms size 2 n)))))) (length (setq $y (prune-results (setq $x (test-random-integer-forms size 2 n))))))
...@@ -86,8 +88,8 @@ ...@@ -86,8 +88,8 @@
(defvar *print-immediately* nil) (defvar *print-immediately* nil)
(defvar *compile-unoptimized-form* (defvar *compile-unoptimized-form*
#-(or gcl clisp) t #-(or gcl clisp armedbear) t
#+(or gcl clisp) nil) #+(or gcl clisp armedbear) nil)
(declaim (special *vars*)) (declaim (special *vars*))
...@@ -257,6 +259,7 @@ ...@@ -257,6 +259,7 @@
;; (> size 1) ;; (> size 1)
(rcase (rcase
;; flet call ;; flet call
#-(or armedbear)
(30 ;; 5 (30 ;; 5
(make-random-integer-flet-call-form size)) (make-random-integer-flet-call-form size))
...@@ -265,19 +268,22 @@ ...@@ -265,19 +268,22 @@
(let ((op (random-from-seq '(- abs signum 1+ 1- conjugate (let ((op (random-from-seq '(- abs signum 1+ 1- conjugate
rational rationalize rational rationalize
numerator denominator numerator denominator
identity progn floor ignore-errors identity progn floor
#-(or armedbear) ignore-errors
cl:handler-case restart-case cl:handler-case restart-case
ceiling truncate round realpart imagpart ceiling truncate round realpart imagpart
integer-length logcount values integer-length logcount values
locally)))) locally))))
`(,op ,(make-random-integer-form (1- size))))) `(,op ,(make-random-integer-form (1- size)))))
#-(or armedbear)
(4 (4
(make-random-integer-unwind-protect-form size)) (make-random-integer-unwind-protect-form size))
(5 (make-random-integer-mapping-form size)) (5 (make-random-integer-mapping-form size))
;; prog1, multiple-value-prog1 ;; prog1, multiple-value-prog1
#-(or armedbear)
(4 (4
(let* ((op (random-from-seq #(prog1 multiple-value-prog1))) (let* ((op (random-from-seq #(prog1 multiple-value-prog1)))
(nforms (random 4)) (nforms (random 4))
...@@ -297,6 +303,7 @@ ...@@ -297,6 +303,7 @@
(1 `(cl:handler-bind nil ,(make-random-integer-form (1- size)))) (1 `(cl:handler-bind nil ,(make-random-integer-form (1- size))))
(1 `(restart-bind nil ,(make-random-integer-form (1- size)))) (1 `(restart-bind nil ,(make-random-integer-form (1- size))))
#-(or armedbear)
(1 `(macrolet () ,(make-random-integer-form (1- size)))) (1 `(macrolet () ,(make-random-integer-form (1- size))))
;; dotimes ;; dotimes
...@@ -315,7 +322,7 @@ ...@@ -315,7 +322,7 @@
;; loop ;; loop
(5 (make-random-loop-form (1- size))) (5 (make-random-loop-form (1- size)))
#-(or gcl ecl) #-(or gcl ecl armedbear)
;; load-time-value ;; load-time-value
(2 (2
(let ((arg (let ((*flet-names* nil) (let ((arg (let ((*flet-names* nil)
...@@ -434,6 +441,7 @@ ...@@ -434,6 +441,7 @@
(20 (make-random-integer-binding-form size)) (20 (make-random-integer-binding-form size))
;; progv ;; progv
#-(or armedbear)
(4 (make-random-integer-progv-form size)) (4 (make-random-integer-progv-form size))
(4 `(let () ,(make-random-integer-form (1- size)))) (4 `(let () ,(make-random-integer-form (1- size))))
...@@ -443,6 +451,7 @@ ...@@ -443,6 +451,7 @@
(*random-int-form-blocks* (adjoin name *random-int-form-blocks*))) (*random-int-form-blocks* (adjoin name *random-int-form-blocks*)))
`(block ,name ,(make-random-integer-form (1- size))))) `(block ,name ,(make-random-integer-form (1- size)))))
#-(or armedbear)
(20 (20
(let* ((tag (list 'quote (random-from-seq #(ct1 ct2 ct2 ct4 ct5 ct6 ct7 ct8)))) (let* ((tag (list 'quote (random-from-seq #(ct1 ct2 ct2 ct4 ct5 ct6 ct7 ct8))))
(*random-int-form-catch-tags* (cons tag *random-int-form-catch-tags*))) (*random-int-form-catch-tags* (cons tag *random-int-form-catch-tags*)))
...@@ -480,6 +489,7 @@ ...@@ -480,6 +489,7 @@
;; No blocks -- try again ;; No blocks -- try again
(make-random-integer-form size))) (make-random-integer-form size)))
#-(or armedbear)
(20 (20
(make-random-flet-form size)) (make-random-flet-form size))
...@@ -628,6 +638,7 @@ ...@@ -628,6 +638,7 @@
(,sequence-op (,sequence-op
,@(mapcar #'make-random-integer-form sizes)) ,@(mapcar #'make-random-integer-form sizes))
,@keyargs))) ,@keyargs)))
#-(or armedbear)
(1 (1
(destructuring-bind (size1 size2) (random-partition (1- size) 2) (destructuring-bind (size1 size2) (random-partition (1- size) 2)
(let* ((vars '(lmv1 lmv2 lmv3 lmv4 lmv5 lmv6)) (let* ((vars '(lmv1 lmv2 lmv3 lmv4 lmv5 lmv6))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment