X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Ftypetran.lisp;h=ddd606605eabfa31237dbba151e87e2e32473355;hb=6e7e59adb6f6c30f84b31695b48cb51e2c519d75;hp=74940f51f1f8a28b2e69d3ae0147c71a851be5d3;hpb=dec94b039e8ec90baf21463df839a6181de606f6;p=sbcl.git diff --git a/src/compiler/typetran.lisp b/src/compiler/typetran.lisp index 74940f5..ddd6066 100644 --- a/src/compiler/typetran.lisp +++ b/src/compiler/typetran.lisp @@ -77,7 +77,8 @@ ;;; Flush %TYPEP tests whose result is known at compile time. (deftransform %typep ((object type)) - (unless (constant-continuation-p type) (give-up-ir1-transform)) + (unless (constant-continuation-p type) + (give-up-ir1-transform)) (ir1-transform-type-predicate object (specifier-type (continuation-value type)))) @@ -86,7 +87,7 @@ ;;; whether the single argument is known to (not) be of the ;;; appropriate type, expanding to T or NIL as appropriate. (deftransform fold-type-predicate ((object) * * :node node :defun-only t) - (let ((ctype (gethash (leaf-name + (let ((ctype (gethash (leaf-source-name (ref-leaf (continuation-use (basic-combination-fun node)))) @@ -96,7 +97,7 @@ ;;; If FIND-CLASS is called on a constant class, locate the CLASS-CELL ;;; at load time. -(deftransform find-class ((name) ((constant-argument symbol)) * +(deftransform find-class ((name) ((constant-arg symbol)) * :when :both) (let* ((name (continuation-value name)) (cell (find-class-cell name))) @@ -144,7 +145,7 @@ ;;;; ;;;; See also VM dependent transforms. -(def-source-transform atom (x) +(define-source-transform atom (x) `(not (consp ,x))) ;;;; TYPEP source transform @@ -270,8 +271,8 @@ (satisfies `(if (funcall #',(second spec) ,object) t nil)) ((not and) (once-only ((n-obj object)) - `(,(first spec) ,@(mapcar #'(lambda (x) - `(typep ,n-obj ',x)) + `(,(first spec) ,@(mapcar (lambda (x) + `(typep ,n-obj ',x)) (rest spec)))))))))) ;;; Do source transformation for TYPEP of a known union type. If a @@ -484,7 +485,7 @@ ;;; to that predicate. Otherwise, we dispatch off of the type's type. ;;; These transformations can increase space, but it is hard to tell ;;; when, so we ignore policy and always do them. -(def-source-transform typep (object spec) +(define-source-transform typep (object spec) ;; KLUDGE: It looks bad to only do this on explicitly quoted forms, ;; since that would overlook other kinds of constants. But it turns ;; out that the DEFTRANSFORM for TYPEP detects any constant @@ -506,8 +507,8 @@ (member-type `(member ,object ',(member-type-members type))) (args-type - (compiler-warning "illegal type specifier for TYPEP: ~S" - (cadr spec)) + (compiler-warn "illegal type specifier for TYPEP: ~S" + (cadr spec)) `(%typep ,object ,spec)) (t nil)) (typecase type