Change `(values)` to `nil`
SBCL likes when a function just returns `nil` much more.
author |
Steve Losh <steve@stevelosh.com> |
date |
Sun, 17 Jul 2016 16:59:50 +0000 |
parents |
ba96e98a1d54
|
children |
3325913a9b16
|
branches/tags |
(none) |
files |
src/wam/compiler/2-register-allocation.lisp src/wam/ui.lisp src/wam/vm.lisp src/wam/wam.lisp |
Changes
--- a/src/wam/compiler/2-register-allocation.lisp Sun Jul 17 16:49:06 2016 +0000
+++ b/src/wam/compiler/2-register-allocation.lisp Sun Jul 17 16:59:50 2016 +0000
@@ -210,7 +210,7 @@
(defmethod allocate-register ((node top-level-node) state)
(declare (ignore node state))
- (values))
+ nil)
(defmethod allocate-register ((node variable-node) state)
(set-when-nil (node-register node)
--- a/src/wam/ui.lisp Sun Jul 17 16:49:06 2016 +0000
+++ b/src/wam/ui.lisp Sun Jul 17 16:59:50 2016 +0000
@@ -44,15 +44,15 @@
(wam-logic-frame-add-clause! *database*
(list* (normalize-term head)
(mapcar #'normalize-term body)))
- (values))
+ nil)
(defun invoke-fact (fact)
(invoke-rule fact)
- (values))
+ nil)
(defun invoke-facts (&rest facts)
(mapc #'invoke-fact facts)
- (values))
+ nil)
(defmacro rule (head &body body)
@@ -140,7 +140,7 @@
(invoke (lambda (result)
(funcall function result)
nil))
- (values))
+ nil)
(define-invocation (invoke-query-find invoke-query-find-aot) (predicate)
(let ((results nil)
--- a/src/wam/vm.lisp Sun Jul 17 16:49:06 2016 +0000
+++ b/src/wam/vm.lisp Sun Jul 17 16:59:50 2016 +0000
@@ -863,7 +863,7 @@
(#.+opcode-done+
:increment-pc nil
:raw (if (funcall done-thunk)
- (return-from run (values))
+ (return-from run nil)
(backtrack! wam))))
(setf (wam-backtracked wam) nil)
@@ -871,7 +871,7 @@
(when (>= (wam-program-counter wam)
(wam-code-pointer wam))
(error "Fell off the end of the program code store."))))
- (values))
+ nil)
(defun %run-query (wam vars result-function)
@@ -881,7 +881,7 @@
(funcall result-function
(extract-query-results wam vars))))
(wam-reset! wam)
- (values))
+ nil)
(defun run-query (wam terms &key (result-function
(lambda (results)
--- a/src/wam/wam.lisp Sun Jul 17 16:49:06 2016 +0000
+++ b/src/wam/wam.lisp Sun Jul 17 16:59:50 2016 +0000
@@ -392,12 +392,11 @@
(when (not (< +stack-start+ address +stack-end+))
(error "Stack bounds crossed. Game over.")))
(t nil)) ; wew lads
- (values))
+ nil)
(defun wam-stack-ensure-size (wam address)
"Ensure the WAM stack is large enough to be able to write to `address`."
- (assert-inside-stack wam address)
- (values))
+ (assert-inside-stack wam address))
(defun wam-stack-word (wam address)
@@ -678,7 +677,7 @@
(clrhash predicates)
(setf start 0 final nil))
(push frame (wam-logic-pool wam))
- (values))
+ nil)
(defun wam-logic-pool-request (wam)
(or (pop (wam-logic-pool wam))
@@ -707,7 +706,7 @@
(setf (logic-frame-start frame)
(wam-code-pointer wam))
(push frame (wam-logic-stack wam)))
- (values))
+ nil)
(defun assert-logic-frame-poppable (wam)
(let ((logic-stack (wam-logic-stack wam)))
@@ -733,7 +732,7 @@
:being :the hash-keys :of (logic-frame-predicates frame)
:do (wam-code-label-remove! wam functor arity))
(wam-logic-pool-release wam frame)))
- (values))
+ nil)
(defun assert-label-not-already-compiled (wam clause functor arity)
@@ -753,7 +752,7 @@
(cons functor arity)
(logic-frame-predicates (wam-current-logic-frame wam))
(make-queue))))
- (values))
+ nil)
(defun wam-finalize-logic-frame! (wam)
@@ -765,7 +764,7 @@
;; circular dep on the compiler here, ugh.
:do (compile-rules wam (queue-contents clauses)))
(setf final t))
- (values))
+ nil)
;;;; Registers