Diff of /src/code/early-extensions.lisp [7631b1] .. [cabec2] Maximize Restore

  Switch to side-by-side view

--- a/src/code/early-extensions.lisp
+++ b/src/code/early-extensions.lisp
@@ -64,6 +64,20 @@
 	    ,(truncate (- (+ (1- (ash 1 16)) lowtag)
 			  (* max-offset sb!vm:n-word-bytes))
 		       scale)))
+
+;;; Similar to FUNCTION, but the result type is "exactly" specified:
+;;; if it is an obkect type, then the function returns exactly one
+;;; value, if it is a short form of VALUES, then this short form
+;;; specifies the exact number of values.
+(def!type sfunction (args &optional result)
+  (let ((result (cond ((eq result '*) '*)
+                      ((or (atom result)
+                           (not (eq (car result) 'values)))
+                       `(values ,result &optional))
+                      ((intersection (cdr result) lambda-list-keywords)
+                       result)
+                      (t `(values ,@(cdr result) &optional)))))
+    `(function ,args ,result)))
 
 ;;; the default value used for initializing character data. The ANSI
 ;;; spec says this is arbitrary, so we use the value that falls