arguments, but it could be tricky to check result types of PROG1, IF
etc.
-223: "(SETF FDEFINITION) and #' semantics broken for wrappers"
- Although this
- (defun foo (x)
- (print x))
- (defun traced (fn)
- (lambda (&rest rest)
- (format t "~&about to call ~S on ~S~%" fn rest)
- (apply fn rest)
- (format t "~&returned from ~S~%" fn)))
- (setf (fdefinition 'foo)
- (traced #'foo))
- (foo 11)
- does what one would expect, this
- (defun bar (x)
- (print x))
- (let ((bar0 #'bar))
- (setf (fdefinition 'bar)
- (lambda (&rest rest)
- (format t "~&about to enter BAR ~S~%" rest)
- (apply bar0 rest)
- (format t "~&back from BAR~%"))))
- (bar 12)
- recurses endlessly in sbcl-0.7.9.32. (Or it works if #' and
- FDEFINITION are replaced by SYMBOL-FUNCTION.)
-
228: "function-lambda-expression problems"
in sbcl-0.7.9.6x, from the REPL:
* (progn (declaim (inline foo)) (defun foo (x) x))
* incremented fasl file version number, because of the incompatible
change to the DEFSTRUCT-DESCRIPTION structure, and again because
of the new implementation of DEFINE-COMPILER-MACRO.
+ * fixed bug 223: functional binding is considered to be constant
+ only for symbols in the CL package.
planned incompatible changes in 0.7.x:
* (not done yet, but planned:) When the profiling interface settles
(null (lambda-var-sets leaf)))
(defined-fun
(not (eq (defined-fun-inlinep leaf) :notinline)))
+ #!+(and (not sb-fluid) (not sb-xc-host))
(global-var
(case (global-var-kind leaf)
- (:global-function t))))))
+ (:global-function (eq (symbol-package (leaf-source-name leaf))
+ *cl-package*)))))))
;;; If we have a non-set LET var with a single use, then (if possible)
;;; replace the variable reference's CONT with the arg continuation.
(sets () :type list))
;;; The GLOBAL-VAR structure represents a value hung off of the symbol
-;;; NAME. We use a :CONSTANT VAR when we know that the thing is a
-;;; constant, but don't know what the value is at compile time.
+;;; NAME.
(def!struct (global-var (:include basic-var))
;; kind of variable described
(kind (missing-arg)
(do-optimizations
(compile nil '(lambda (x) (let ((y (error ""))) (list x y)))))
+;;; bug 223: invalid moving of global function name referencing
+(defun bug223-int (n)
+ `(int ,n))
+
+(defun bug223-wrap ()
+ (let ((old #'bug223-int))
+ (setf (fdefinition 'bug223-int)
+ (lambda (n)
+ (assert (> n 0))
+ `(ext ,@(funcall old (1- n)))))))
+(compile 'bug223-wrap)
+
+(assert (equal (bug223-int 4) '(int 4)))
+(bug223-wrap)
+(assert (equal (bug223-int 4) '(ext int 3)))
+(bug223-wrap)
+(assert (equal (bug223-int 4) '(ext ext int 2)))
+
\f
;;;; tests not in the problem domain, but of the consistency of the
;;;; compiler machinery itself
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.7.10.22"
+"0.7.10.23"