1.0.29.18: delete more debugging cruft that should never have been committed
[sbcl.git] / src / code / cross-misc.lisp
index 530782a..0e1e82e 100644 (file)
   (declare (type symbol symbol))
   (sxhash symbol))
 
+(defvar sb!xc:*gensym-counter* 0)
+
+(defun sb!xc:gensym (&optional (thing "G"))
+  (declare (type string thing))
+  (let ((n sb!xc:*gensym-counter*))
+    (prog1
+        (make-symbol (concatenate 'string thing (write-to-string n :base 10 :radix nil :pretty nil)))
+      (incf sb!xc:*gensym-counter*))))
+
 ;;; These functions are needed for constant-folding.
 (defun sb!kernel:simple-array-nil-p (object)
   (when (typep object 'array)