X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Ftypetran.lisp;h=3117ce28b2a7c64d6687f9749c1593fef85e5180;hb=ba38798a5ca26b90647a1993f348806cb32f2d1b;hp=3abec13e25d6541f993131a9924d30ae50105739;hpb=1a6def3955b715472eb2c75b15660912b9f90173;p=sbcl.git diff --git a/src/compiler/typetran.lisp b/src/compiler/typetran.lisp index 3abec13..3117ce2 100644 --- a/src/compiler/typetran.lisp +++ b/src/compiler/typetran.lisp @@ -97,8 +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)) * - :when :both) +(deftransform find-class ((name) ((constant-arg symbol)) *) (let* ((name (continuation-value name)) (cell (find-class-cell name))) `(or (class-cell-class ',cell) @@ -145,7 +144,7 @@ ;;;; ;;;; See also VM dependent transforms. -(def-source-transform atom (x) +(define-source-transform atom (x) `(not (consp ,x))) ;;;; TYPEP source transform @@ -271,8 +270,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 @@ -385,7 +384,7 @@ ;;; then we also check whether the layout for the object is invalid ;;; and signal an error if so. Otherwise, look up the indirect ;;; class-cell and call CLASS-CELL-TYPEP at runtime. -(deftransform %instance-typep ((object spec) (* *) * :node node :when :both) +(deftransform %instance-typep ((object spec) (* *) * :node node) (aver (constant-continuation-p spec)) (let* ((spec (continuation-value spec)) (class (specifier-type spec)) @@ -485,7 +484,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 @@ -507,8 +506,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 @@ -526,7 +525,7 @@ ;;;; coercion -(deftransform coerce ((x type) (* *) * :when :both) +(deftransform coerce ((x type) (* *) *) (unless (constant-continuation-p type) (give-up-ir1-transform)) (let ((tspec (specifier-type (continuation-value type))))