(etypecase x
(simple-byte-function
`(function ,(make-list (simple-byte-function-num-args x)
- :initial-element 't)
+ :initial-element t)
*))
(hairy-byte-function
(collect ((res))
(let ((min (hairy-byte-function-min-args x))
(max (hairy-byte-function-max-args x)))
- (dotimes (i min) (res 't))
+ (dotimes (i min) (res t))
(when (> max min)
(res '&optional)
(dotimes (i (- max min))
- (res 't))))
+ (res t))))
(when (hairy-byte-function-rest-arg-p x)
- (res '&rest 't))
+ (res '&rest t))
(ecase (hairy-byte-function-keywords-p x)
((t :allow-others)
(res '&key)
;;; FIXME: This doesn't seem to be needed in the target Lisp, only
;;; at build-the-system time.
;;;
-;;; KLUDGE: This expands into code a la
+;;; KLUDGE: This expands into code like
;;; (IF (ZEROP (LOGAND BYTE 16))
;;; (IF (ZEROP (LOGAND BYTE 8))
;;; (IF (ZEROP (LOGAND BYTE 4))
;;; implement suitable code as jump tables.
(defmacro expand-into-inlines ()
#+nil (declare (optimize (inhibit-warnings 3)))
- (iterate build-dispatch
- ((bit 4)
- (base 0))
+ (named-let build-dispatch ((bit 4)
+ (base 0))
(if (minusp bit)
(let ((info (svref *inline-functions* base)))
(if info
(defun %byte-special-unbind ()
(sb!sys:%primitive unbind)
(values))
-
-;;; obsolete...
-#!-sb-fluid (declaim (inline cons-unique-tag))
-(defun cons-unique-tag ()
- (list '#:%unique-tag%))
-;;; FIXME: Delete this once the system is working.
\f
;;;; two-arg function stubs
;;;;
(closure-vars (make-array num-closure-vars)))
(declare (type index num-closure-vars)
(type simple-vector closure-vars))
- (iterate frob ((index (1- num-closure-vars)))
+ (named-let frob ((index (1- num-closure-vars)))
(unless (minusp index)
(setf (svref closure-vars index) (pop-eval-stack))
(frob (1- index))))
(type stack-pointer old-sp old-fp)
(type (or null simple-vector) closure-vars))
(when closure-vars
- (iterate more ((index (1- (length closure-vars))))
+ (named-let more ((index (1- (length closure-vars))))
(unless (minusp index)
(push-eval-stack (svref closure-vars index))
(more (1- index)))))
;;; Call a function with some arguments popped off of the interpreter
;;; stack, and restore the SP to the specifier value.
(defun byte-apply (function num-args restore-sp)
- (declare (function function) (type index num-args))
+ (declare (type function function) (type index num-args))
(let ((start (- (current-stack-pointer) num-args)))
(declare (type stack-pointer start))
(macrolet ((frob ()
(type stack-pointer more-args-start))
(cond
((not (hairy-byte-function-keywords-p xep))
- (assert restp)
+ (aver restp)
(setf (current-stack-pointer) (1+ more-args-start))
(setf (eval-stack-ref more-args-start) rest))
(t
(unless (evenp more-args-supplied)
(with-debugger-info (old-component ret-pc old-fp)
- (error "odd number of keyword arguments")))
- ;; If there are keyword args, then we need to leave the
- ;; defaulted and supplied-p values where the more args
- ;; currently are. There might be more or fewer. And also,
- ;; we need to flatten the parsed args with the defaults
- ;; before we scan the keywords. So we copy all the more
- ;; args to a temporary area at the end of the stack.
+ (error "odd number of &KEY arguments")))
+ ;; If there are &KEY args, then we need to leave
+ ;; the defaulted and supplied-p values where the
+ ;; more args currently are. There might be more or
+ ;; fewer. And also, we need to flatten the parsed
+ ;; args with the defaults before we scan the
+ ;; keywords. So we copy all the more args to a
+ ;; temporary area at the end of the stack.
(let* ((num-more-args
(hairy-byte-function-num-more-args xep))
(new-sp (+ more-args-start num-more-args))