Skip to content
Snippets Groups Projects
Commit 4ba66e08 authored by pfdietz's avatar pfdietz
Browse files

Changed FUNCTION decl to avoid gcl complaints; removed repeated case tags in...

Changed FUNCTION decl to avoid gcl complaints; removed repeated case tags in pruner to shut up clisp.
parent 6a23fc7b
No related branches found
No related tags found
No related merge requests found
...@@ -451,7 +451,9 @@ ...@@ -451,7 +451,9 @@
(*standard-output*) (*standard-output*)
(let ((*print-escape* t)) (let ((*print-escape* t))
(prin1 c))))))))) (prin1 c)))))))))
(compile nil lambda-form)))) (prog1 (compile nil lambda-form)
#+:ecl (si:gc t)
))))
(let ((optimized-compiled-fn (%compile optimized-fn-src)) (let ((optimized-compiled-fn (%compile optimized-fn-src))
(unoptimized-compiled-fn (%compile unoptimized-fn-src))) (unoptimized-compiled-fn (%compile unoptimized-fn-src)))
(declare (type function optimized-compiled-fn unoptimized-compiled-fn)) (declare (type function optimized-compiled-fn unoptimized-compiled-fn))
...@@ -534,7 +536,7 @@ ...@@ -534,7 +536,7 @@
;;; The return value of PRUNE should be ignored. ;;; The return value of PRUNE should be ignored.
;;; ;;;
(defun prune (form try-fn) (defun prune (form try-fn)
(declare (function try-fn)) (declare (type function try-fn))
(flet ((try (x) (funcall try-fn x))) (flet ((try (x) (funcall try-fn x)))
(when (consp form) (when (consp form)
(let ((op (car form)) (let ((op (car form))
...@@ -549,7 +551,7 @@ ...@@ -549,7 +551,7 @@
(try -1) (try -1)
(prune-fn form try-fn)) (prune-fn form try-fn))
((abs 1+ 1- identity values progn realpart imagpart) ((abs 1+ 1- identity values progn)
(mapc #'try args) (mapc #'try args)
(prune-fn form try-fn)) (prune-fn form try-fn))
...@@ -750,7 +752,7 @@ ...@@ -750,7 +752,7 @@
;; Assume each case has a single form ;; Assume each case has a single form
(prune-list cases (prune-list cases
#'(lambda (case try-fn) #'(lambda (case try-fn)
(declare (function try-fn)) (declare (type function try-fn))
(when (eql (length case) 2) (when (eql (length case) 2)
(prune (cadr case) (prune (cadr case)
#'(lambda (form) #'(lambda (form)
...@@ -762,7 +764,7 @@ ...@@ -762,7 +764,7 @@
(defun prune-fn (form try-fn) (defun prune-fn (form try-fn)
"Attempt to simplify a function call form. It is considered "Attempt to simplify a function call form. It is considered
acceptable to replace the call by one of its argument forms." acceptable to replace the call by one of its argument forms."
(declare (function try-fn)) (declare (type function try-fn))
(prune-list (cdr form) (prune-list (cdr form)
#'prune #'prune
#'(lambda (args) #'(lambda (args)
...@@ -770,7 +772,7 @@ ...@@ -770,7 +772,7 @@
(defun prune-let (form try-fn) (defun prune-let (form try-fn)
"Attempt to simplify a LET form." "Attempt to simplify a LET form."
(declare (function try-fn)) (declare (type function try-fn))
(let* ((op (car form)) (let* ((op (car form))
(binding-list (cadr form)) (binding-list (cadr form))
(body (cddr form)) (body (cddr form))
...@@ -786,7 +788,7 @@ ...@@ -786,7 +788,7 @@
;; Try to simplify the forms in the RHS of the bindings ;; Try to simplify the forms in the RHS of the bindings
(prune-list binding-list (prune-list binding-list
#'(lambda (binding try-fn) #'(lambda (binding try-fn)
(declare (function try-fn)) (declare (type function try-fn))
(prune (cadr binding) (prune (cadr binding)
#'(lambda (form) #'(lambda (form)
(funcall try-fn (funcall try-fn
...@@ -822,7 +824,7 @@ ...@@ -822,7 +824,7 @@
(defun prune-flet (form try-fn) (defun prune-flet (form try-fn)
"Attempt to simplify a FLET form." "Attempt to simplify a FLET form."
(declare (function try-fn)) (declare (type function try-fn))
(let* ((op (car form)) (let* ((op (car form))
(binding-list (cadr form)) (binding-list (cadr form))
...@@ -831,7 +833,7 @@ ...@@ -831,7 +833,7 @@
;; Try to simplify the forms in the RHS of the bindings ;; Try to simplify the forms in the RHS of the bindings
(prune-list binding-list (prune-list binding-list
#'(lambda (binding try-fn) #'(lambda (binding try-fn)
(declare (function try-fn)) (declare (type function try-fn))
(prune (third binding) (prune (third binding)
#'(lambda (form) #'(lambda (form)
(funcall try-fn (funcall try-fn
......
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