1.0.17.37: better indenting of compiler diagnostic messages.
[sbcl.git] / src / compiler / srctran.lisp
index 37c3a73..5ae92be 100644 (file)
     (t (values nil t))))
 
 ;;; And similarly for LIST*.
-(define-source-transform list* (&rest args)
-  (case (length args)
-    (2 `(cons ,(first args) ,(second args)))
-    (t (values nil t))))
+(define-source-transform list* (arg &rest others)
+  (cond ((not others) arg)
+        ((not (cdr others)) `(cons ,arg ,(car others)))
+        (t (values nil t))))
+
+(defoptimizer (list* derive-type) ((arg &rest args))
+  (if args
+      (specifier-type 'cons)
+      (lvar-type arg)))
 
 ;;; Translate RPLACx to LET and SETF.
 (define-source-transform rplaca (x y)