From: Alexey Dejneka Date: Tue, 2 Sep 2003 11:11:46 +0000 (+0000) Subject: 0.8.3.25: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=835768a81dad03b7eb94c2058e234413ba066396;p=sbcl.git 0.8.3.25: * Fix bug 277: IGNORE/IGNORABLE declarations should work for symbol macros; * fix bug in CERROR recognition inside RESTART-CASE. --- diff --git a/BUGS b/BUGS index 545ec9c..28cde75 100644 --- a/BUGS +++ b/BUGS @@ -1072,7 +1072,9 @@ WORKAROUND: 274: CLHS says that type declaration of a symbol macro should not affect - its expansion, but in SBCL it does. + its expansion, but in SBCL it does. (If you like magic and want to + fix it, don't forget to change all uses of MACROEXPAND to + MACROEXPAND*.) 275: The following code (taken from CLOCC) takes a lot of time to compile: @@ -1091,10 +1093,6 @@ WORKAROUND: (taken from CLOCC) -277: - IGNORE/IGNORABLE declarations should be acceptable for symbol - macros. - 278: a. (defun foo () @@ -1230,3 +1228,12 @@ WORKAROUND: (the type error doesn't seem to be terribly deterministic in when it occurs. Bigger numbers seem better able to trigger the error) + +286: "recursive known functions" + Self-call recognition conflicts with known function + recognition. Currently cross compiler and target COMPILE do not + recognize recursion, and in target compiler it can be disabled. We + can always disable it for known functions with RECURSIVE attribute, + but there remains a possibility of a function with a + (tail)-recursive simplification pass and transforms/VOPs for base + cases. diff --git a/contrib/sb-cltl2/defpackage.lisp b/contrib/sb-cltl2/defpackage.lisp index bd948b3..696e1b8 100644 --- a/contrib/sb-cltl2/defpackage.lisp +++ b/contrib/sb-cltl2/defpackage.lisp @@ -1,5 +1,5 @@ (defpackage :sb-cltl2 - (:use :cl :sb-c :sb-int) + (:use :cl :sb-c :sb-int :sb-kernel) (:export #:compiler-let #:macroexpand-all ;; environment access diff --git a/contrib/sb-cltl2/env.lisp b/contrib/sb-cltl2/env.lisp index 0abdf8c..379de12 100644 --- a/contrib/sb-cltl2/env.lisp +++ b/contrib/sb-cltl2/env.lisp @@ -9,20 +9,23 @@ define-declaration |# (declaim (ftype (sfunction - (symbol &optional (or null sb-kernel:lexenv)) + (symbol &optional (or null lexenv)) (values (member nil :special :lexical :symbol-macro :constant) boolean list)) variable-information)) (defun variable-information (var &optional env) - (let* ((*lexenv* (or env (sb-kernel:make-null-lexenv))) + "Return three values. The first indicates a binding kind of VAR; the +second is True if there is a local binding of VAR; the third is an +alist of declarations that apply to the apparent binding of VAR." + (let* ((*lexenv* (or env (make-null-lexenv))) (info (lexenv-find var vars))) (etypecase info - (sb-c::leaf (let ((type (sb-kernel:type-specifier - (sb-kernel:type-intersection + (sb-c::leaf (let ((type (type-specifier + (type-intersection (sb-c::leaf-type info) (or (lexenv-find info type-restrictions) - sb-kernel:*universal-type*))))) + *universal-type*))))) (etypecase info (sb-c::lambda-var (values :lexical t @@ -46,24 +49,22 @@ define-declaration (:global nil)) nil `( ; XXX ignore - (type . ,(sb-kernel:type-specifier ; XXX local type + (type . ,(type-specifier ; XXX local type (info :variable :type var))))))))) -(defun parse-macro (name lambda-list body - &optional env) +(defun parse-macro (name lambda-list body &optional env) (declare (ignore env)) (with-unique-names (whole environment) (multiple-value-bind (body decls) - (sb-kernel:parse-defmacro lambda-list whole body name - 'parse-macro - :environment environment) + (parse-defmacro lambda-list whole body name + 'parse-macro + :environment environment) `(lambda (,whole ,environment) ,@decls ,body)))) -(defun enclose (lambda-expression - &optional env) +(defun enclose (lambda-expression &optional env) (let ((env (if env (sb-c::make-restricted-lexenv env) - (sb-kernel:make-null-lexenv)))) + (make-null-lexenv)))) (compile-in-lexenv nil lambda-expression env))) diff --git a/src/code/defboot.lisp b/src/code/defboot.lisp index 2379081..978a3c8 100644 --- a/src/code/defboot.lisp +++ b/src/code/defboot.lisp @@ -383,7 +383,7 @@ ,n-cond (car *restart-clusters*) ,(if (eq name 'cerror) - `(cerror ,(second expression) ,n-cond) + `(cerror ,(second exp) ,n-cond) `(,name ,n-cond)))) expression)) expression))) diff --git a/src/compiler/ir1tran.lisp b/src/compiler/ir1tran.lisp index 7ee9fed..3745b28 100644 --- a/src/compiler/ir1tran.lisp +++ b/src/compiler/ir1tran.lisp @@ -1061,7 +1061,7 @@ (compiler-style-warn "declaring unknown variable ~S to be ignored" name)) ;; FIXME: This special case looks like non-ANSI weirdness. - ((and (consp var) (consp (cdr var)) (eq (cadr var) 'macro)) + ((and (consp var) (eq (car var) 'macro)) ;; Just ignore the IGNORE decl. ) ((functional-p var) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 948d419..a5fd491 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -520,3 +520,12 @@ (+ i 2))) (sb-ext:compiler-note (c) (return :good)))) :good)) + +;;; bug 277: IGNORE/IGNORABLE declarations should be acceptable for +;;; symbol macros +(assert (not (nth-value 1 (compile nil '(lambda (u v) + (symbol-macrolet ((x u) + (y v)) + (declare (ignore x) + (ignorable y)) + (list u v))))))) diff --git a/version.lisp-expr b/version.lisp-expr index cf9174f..89b15f7 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.3.24" +"0.8.3.25"