((nil)))
`(function ,(res) *))))))
\f
-;;;; the evaluation stack
+;;;; the 'evaluation stack'
+;;;;
+;;;; (The name dates back to CMU CL, when it was used for the IR1
+;;;; interpreted implementation of EVAL. In SBCL >=0.7.0, it's just
+;;;; the byte interpreter stack.)
-;;; the interpreter's evaluation stack
(defvar *eval-stack* (make-array 100)) ; will grow as needed
-;;; FIXME: This seems to be used by the ordinary (non-byte) interpreter
-;;; too, judging from a crash I had when I removed byte-interp.lisp from
-;;; the cold build sequence. It would probably be clearer to pull the
-;;; shared interpreter machinery out of the byte interpreter and ordinary
-;;; interpreter files and put them into their own file shared-interp.lisp
-;;; or something.
;;; the index of the next free element of the interpreter's evaluation stack
(defvar *eval-stack-top* 0)
(new-sp-var (gensym "NEW-SP-"))
(decls nil))
(loop
- (unless (and (consp body) (consp (car body)) (eq (caar body) 'declare))
+ (unless (and (consp body)
+ (consp (car body))
+ (eq (caar body) 'declare))
(return))
(push (pop body) decls))
`(let ((,new-sp-var (- *eval-stack-top* ,num-vars)))
\f
;;;; miscellaneous primitive stubs
-(macrolet ((frob (name &optional (args '(x)))
+(macrolet ((def-frob (name &optional (args '(x)))
`(defun ,name ,args (,name ,@args))))
- (frob %CODE-CODE-SIZE)
- (frob %CODE-DEBUG-INFO)
- (frob %CODE-ENTRY-POINTS)
- (frob %FUNCALLABLE-INSTANCE-FUNCTION)
- (frob %FUNCALLABLE-INSTANCE-LAYOUT)
- (frob %FUNCALLABLE-INSTANCE-LEXENV)
- (frob %FUNCTION-NEXT)
- (frob %FUNCTION-SELF)
- (frob %SET-FUNCALLABLE-INSTANCE-FUNCTION (fin new-val)))
+ (def-frob %code-code-size)
+ (def-frob %code-debug-info)
+ (def-frob %code-entry-points)
+ (def-frob %funcallable-instance-function)
+ (def-frob %funcallable-instance-layout)
+ (def-frob %funcallable-instance-lexenv)
+ (def-frob %function-next)
+ (def-frob %function-self)
+ (def-frob %set-funcallable-instance-function (fin new-val)))
\f
;;;; funny functions
(funcall function ,@(args))))))
(frob))))
+;;; Note: negative RET-PC is a convention for "we need multiple return
+;;; values".
(defun do-call (old-component call-pc ret-pc old-fp num-args named)
(declare (type code-component old-component)
(type pc call-pc)