Remove get2 variant of get.
[sbcl.git] / src / code / symbol.lisp
index 6210a6d..978074e 100644 (file)
@@ -15,7 +15,7 @@
 
 (in-package "SB!IMPL")
 
-(declaim (maybe-inline get get2 get3 %put getf remprop %putf get-properties keywordp))
+(declaim (maybe-inline get get3 %put getf remprop %putf get-properties keywordp))
 
 (defun symbol-value (symbol)
   #!+sb-doc
   (declare (optimize (safety 1)))
   (symbol-value symbol))
 
+#-sb-xc-host
+(define-compiler-macro symbol-value (&whole form symbol &environment env)
+  (when (sb!xc:constantp symbol env)
+    (let ((name (constant-form-value symbol env)))
+      (when (symbolp name)
+        (check-deprecated-variable name))))
+  form)
+
 (defun boundp (symbol)
   #!+sb-doc
   "Return non-NIL if SYMBOL is bound to a value."
@@ -52,8 +60,7 @@ distinct from the global value. Can also be SETF."
 
 (declaim (inline %makunbound))
 (defun %makunbound (symbol)
-  (%set-symbol-value symbol (%primitive sb!c:make-other-immediate-type
-                                        0 sb!vm:unbound-marker-widetag)))
+  (%set-symbol-value symbol (%primitive sb!c:make-unbound-marker)))
 
 (defun makunbound (symbol)
   #!+sb-doc
@@ -116,20 +123,6 @@ distinct from the global value. Can also be SETF."
   is found, return the associated value, else return DEFAULT."
   (get3 symbol indicator default))
 
-(defun get2 (symbol indicator)
-  (get3 symbol indicator nil))
-#|
-  (let (cdr-pl)
-    (do ((pl (symbol-plist symbol) (cdr cdr-pl)))
-        ((atom pl) nil)
-      (setf cdr-pl (cdr pl))
-      (cond ((atom cdr-pl)
-             (error "~S has an odd number of items in its property list."
-                    symbol))
-            ((eq (car pl) indicator)
-             (return (car cdr-pl)))))))
-|#
-
 (defun get3 (symbol indicator default)
   (let (cdr-pl)
     (do ((pl (symbol-plist symbol) (cdr cdr-pl)))
@@ -274,7 +267,7 @@ distinct from the global value. Can also be SETF."
     (multiple-value-bind (prefix int)
         (etypecase thing
           (simple-string (values thing old))
-          (fixnum (values "G" thing))
+          (unsigned-byte (values "G" thing))
           (string (values (coerce thing 'simple-string) old)))
       (declare (simple-string prefix))
       (make-symbol (%make-symbol-name prefix int)))))