Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ansi-test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michał Herda
ansi-test
Commits
2d324704
Commit
2d324704
authored
21 years ago
by
pfdietz
Browse files
Options
Downloads
Patches
Plain Diff
Conditionalize out forms that abcl doesn't compile yet.
parent
5cc635b9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ansi-tests/random-int-form.lsp
+15
-4
15 additions, 4 deletions
ansi-tests/random-int-form.lsp
with
15 additions
and
4 deletions
ansi-tests/random-int-form.lsp
+
15
−
4
View file @
2d324704
...
@@ -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))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment