From 568b75331113ecd0601449f337557cd1c1776e8d Mon Sep 17 00:00:00 2001 From: William Harold Newman Date: Tue, 27 Mar 2001 21:27:50 +0000 Subject: [PATCH] 0.6.11.28: removed FIXME "MAKE-LOAD-FORM is supposed to be handled here, too", since it's of date; in SBCL DEF!STRUCT handles MAKE-LOAD-FORM by a different mechanism, and vanilla DEFSTRUCT doesn't mess with it at all. (thanks to MNA question) tweaked FIND-FREE-REALLY-FUNCTION so that it doesn't complain about an undefined function when the function is defined in the running Lisp (to fix undefined function warnings reported by MNA sbcl-devel 2001-03-26) moved CONSTANTLY-FOO functions to SB!INT (as per old FIXME) --- package-data-list.lisp-expr | 1 + src/code/defstruct.lisp | 4 +--- src/code/early-extensions.lisp | 8 ++++++++ src/code/fdefinition.lisp | 2 +- src/compiler/ir1tran.lisp | 8 +++++++- src/pcl/defclass.lisp | 11 +++++++++++ src/pcl/macros.lisp | 8 -------- tests/compiler.pure-cload.lisp | 5 +++++ version.lisp-expr | 2 +- 9 files changed, 35 insertions(+), 14 deletions(-) diff --git a/package-data-list.lisp-expr b/package-data-list.lisp-expr index 7e1f40e..5195c23 100644 --- a/package-data-list.lisp-expr +++ b/package-data-list.lisp-expr @@ -682,6 +682,7 @@ retained, possibly temporariliy, because it might be used internally." "SWAPPED-ARGS-FUN" "ANY/TYPE" "EVERY/TYPE" "TYPE-BOUND-NUMBER" + "CONSTANTLY-T" "CONSTANTLY-NIL" "CONSTANTLY-0" ;; ..and macros.. "COLLECT" diff --git a/src/code/defstruct.lisp b/src/code/defstruct.lisp index 459f726..241bf15 100644 --- a/src/code/defstruct.lisp +++ b/src/code/defstruct.lisp @@ -210,9 +210,7 @@ ,@(let ((def-con (dd-default-constructor defstruct))) (when (and def-con (not (dd-alternate-metaclass defstruct))) `((setf (structure-class-constructor (sb!xc:find-class ',name)) - #',def-con)))) - ;; FIXME: MAKE-LOAD-FORM is supposed to be handled here, too. - )))) + #',def-con)))))))) ;;; FIXME: I really would like to make structure accessors less special, ;;; just ordinary inline functions. (Or perhaps inline functions with special ;;; compact implementations of their expansions, to avoid bloating the system.) diff --git a/src/code/early-extensions.lisp b/src/code/early-extensions.lisp index 4834c06..0d40d30 100644 --- a/src/code/early-extensions.lisp +++ b/src/code/early-extensions.lisp @@ -404,6 +404,14 @@ (if (consp x) (destructuring-bind (result) x result) x)) + +;;; some commonly-occuring CONSTANTLY forms +(macrolet ((def-constantly-fun (name constant-expr) + `(setf (symbol-function ',name) + (constantly ,constant-expr)))) + (def-constantly-fun constantly-t t) + (def-constantly-fun constantly-nil nil) + (def-constantly-fun constantly-0 0)) ;;;; utilities for two-VALUES predicates diff --git a/src/code/fdefinition.lisp b/src/code/fdefinition.lisp index 5be9930..607b8bb 100644 --- a/src/code/fdefinition.lisp +++ b/src/code/fdefinition.lisp @@ -341,7 +341,7 @@ (defun fmakunbound (name) #!+sb-doc - "Make Name have no global function definition." + "Make NAME have no global function definition." (let ((fdefn (fdefinition-object name nil))) (when fdefn (fdefn-makunbound fdefn))) diff --git a/src/compiler/ir1tran.lisp b/src/compiler/ir1tran.lisp index 4461b9b..ae11f5d 100644 --- a/src/compiler/ir1tran.lisp +++ b/src/compiler/ir1tran.lisp @@ -72,7 +72,13 @@ (setf (info :function :where-from name) :assumed)) (let ((where (info :function :where-from name))) - (when (eq where :assumed) + (when (and (eq where :assumed) + ;; In the ordinary target Lisp, it's silly to report + ;; undefinedness when the function is defined in the + ;; running Lisp. But at cross-compile time, the current + ;; definedness of a function is irrelevant to the + ;; definedness at runtime, which is what matters. + #-sb-xc-host (not (fboundp name))) (note-undefined-reference name :function)) (make-global-var :kind :global-function :name name diff --git a/src/pcl/defclass.lisp b/src/pcl/defclass.lisp index 320c5aa..f4d934a 100644 --- a/src/pcl/defclass.lisp +++ b/src/pcl/defclass.lisp @@ -108,6 +108,17 @@ (when defstruct-p '(:from-defclass-p t)) other-initargs))))))) + ;; FIXME: The way that we do things like (EVAL DEFCLASS-FORM) + ;; here is un-ANSI-Common-Lisp-y and leads to problems + ;; (like DEFUN for the type predicate being called more than + ;; once when we do DEFCLASS at the interpreter prompt), + ;; causing bogus style warnings. It would be better to + ;; rewrite this so that the macroexpansion looks like e.g. + ;; (PROGN + ;; (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE) + ;; (FROB1 ..)) + ;; (EVAL-WHEN (:LOAD-TOPLEVEL :EXECUTE) + ;; (FROB2 ..))) (if defstruct-p (progn (eval defclass-form) ; Define the class now, so that.. diff --git a/src/pcl/macros.lisp b/src/pcl/macros.lisp index 764c14c..7013080 100644 --- a/src/pcl/macros.lisp +++ b/src/pcl/macros.lisp @@ -37,14 +37,6 @@ ;; information around, I'm not sure. -- WHN 2000-12-30 %variable-rebinding)) -;;; FIXME: CONSTANTLY-FOO should be boosted up to SB-INT too. -(macrolet ((def-constantly-fun (name constant-expr) - `(setf (symbol-function ',name) - (constantly ,constant-expr)))) - (def-constantly-fun constantly-t t) - (def-constantly-fun constantly-nil nil) - (def-constantly-fun constantly-0 0)) - ;;; FIXME: This looks like SBCL's PARSE-BODY, and should be shared. (eval-when (:compile-toplevel :load-toplevel :execute) (defun extract-declarations (body &optional environment) diff --git a/tests/compiler.pure-cload.lisp b/tests/compiler.pure-cload.lisp index c1b5ef1..279b850 100644 --- a/tests/compiler.pure-cload.lisp +++ b/tests/compiler.pure-cload.lisp @@ -35,3 +35,8 @@ ;;; This is a slightly different way of getting the same symptoms out ;;; of the sbcl-0.6.11.13 byte compiler bug. (print (setq *print-level* *print-level*)) + + +;;; sbcl-0.6.11.25 or so had DEF!STRUCT/MAKE-LOAD-FORM/HOST screwed up +;;; so that the compiler couldn't dump pathnames. +(format t "Now the compiler can dump pathnames again: ~S ~S~%" #p"" #p"/x/y/z") diff --git a/version.lisp-expr b/version.lisp-expr index 0a87c61..77c9375 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -15,4 +15,4 @@ ;;; versions, and a string like "0.6.5.12" is used for versions which ;;; aren't released but correspond only to CVS tags or snapshots. -"0.6.11.27" +"0.6.11.28" -- 1.7.10.4