Remove redundant functions.
authorFrancois-Rene Rideau <fare@tunes.org>
Sun, 27 May 2012 06:45:36 +0000 (02:45 -0400)
committerFrancois-Rene Rideau <fare@tunes.org>
Sun, 27 May 2012 06:45:36 +0000 (02:45 -0400)
run-generic.lisp
run-sbcl.lisp

index c6575ec..5975f4c 100644 (file)
               (eval-pred predicate rest))
           (let ((next (car rest)))
             (generic-run-spec next input output error predicate (cdr rest)
-                           (if (typep next 'sequence-spec)
-                               r
-                               resume)))
+                              (if (typep next 'sequence-spec)
+                                  r
+                                  resume)))
           (when resume
             (with-slots (predicate rest resume input output error) resume
               (when (and (consp rest) (consp (cdr rest)))
                 (let ((remainder (cdr rest)))
                   (when (eval-pred predicate remainder)
                     (generic-run-spec (second rest) input output error
-                                   predicate (cddr rest) resume))))))))))
+                                      predicate (cddr rest) resume))))))))))
 
 (defun process-result-list (rl)
   (if (listp rl)
index 97fdd8f..331c651 100644 (file)
 (defun process-wait (p)
   (sb-ext:process-wait p))
 
-(defmethod process-result ((r result))
-  (labels ((eval-pred (pred rest)
-             (and (consp rest)
-                  (or (null pred)
-                      (and (functionp pred) (funcall pred (result-process r)))))))
-    (with-slots (process predicate rest input output error resume) r
-      (when process
-        (sb-ext:process-wait process))
-      (if (or (not process)
-              (eval-pred predicate rest))
-          (let ((next (car rest)))
-            (generic-run-spec next input output error predicate (cdr rest)
-                              (if (typep next 'sequence-spec)
-                                  r
-                                  resume)))
-          (when resume
-            (with-slots (predicate rest resume input output error) resume
-              (when (and (consp rest) (consp (cdr rest)))
-                (let ((remainder (cdr rest)))
-                  (when (eval-pred predicate remainder)
-                    (generic-run-spec (second rest) input output error
-                                      predicate (cddr rest) resume))))))))))
-
-(defun process-result-list (rl)
-  (if (listp rl)
-      (mapcar #'process-result-list rl)
-      (let ((next (process-result rl)))
-        (when next
-          (alexandria:flatten (list next (process-result-list next)))))))
-
 (defun sbcl-run (spec &key input output error ignore-error-status)
   (declare (ignore ignore-error-status)) ;; THIS IS A BUG!
   (labels ((collect-threads (r)