0.pre8.90:
authorChristophe Rhodes <csr21@cam.ac.uk>
Tue, 22 Apr 2003 14:58:32 +0000 (14:58 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Tue, 22 Apr 2003 14:58:32 +0000 (14:58 +0000)
Make COPY-SYMBOL work on threaded builds
... FAST-SYMBOL-VALUE need not be fast, but must not signal an error
on unbound-symbol
... add a smoke test

NEWS
src/compiler/x86/cell.lisp
tests/smoke.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 2aae548..5b88b78 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1666,7 +1666,6 @@ changes in sbcl-0.8.0 relative to sbcl-0.7.14
     call to the GC function during WITHOUT-GCING will not do garbage
     collection until the end of the WITHOUT-GCING.  If you were doing 
     this you were probably losing anyway.
-
   * sb-aclrepl module improvements: an integrated inspector, added
     repl features, and a bug fix to :trace command.
   * fixed some bugs revealed by Paul Dietz' test suite:
@@ -1690,6 +1689,8 @@ changes in sbcl-0.8.0 relative to sbcl-0.7.14
     ** RESTART-CASE understands local macros;
     ** ... and associates exactly its own restarts with a condition;
     ** ENDP in safe mode checks its argument to be of type LIST;
+    ** COPY-SYMBOL in a threaded build no longer fails when the symbol
+       in question is unbound;
 
 planned incompatible changes in 0.8.x:
   * (not done yet, but planned:) When the profiling interface settles
index 332432f..e35ae15 100644 (file)
 
 #!+sb-thread
 (define-vop (fast-symbol-value symbol-value)
+  ;; KLUDGE: not really fast, in fact, because we're going to have to
+  ;; do a full lookup of the thread-local area anyway.  But half of
+  ;; the meaning of FAST-SYMBOL-VALUE is "do not signal an error if
+  ;; unbound", which is used in the implementation of COPY-SYMBOL.  --
+  ;; CSR, 2003-04-22
   (:policy :fast)
-  (:translate symbol-value))
+  (:translate symbol-value)
+  (:generator 8
+    (let ((ret-lab (gen-label)))
+      (loadw value object symbol-tls-index-slot other-pointer-lowtag)
+      (inst fs-segment-prefix)
+      (inst mov value (make-ea :dword :index value :scale 1))
+      (inst cmp value unbound-marker-widetag)
+      (inst jmp :ne ret-lab)
+      (loadw value object symbol-value-slot other-pointer-lowtag)
+      (emit-label ret-lab))))
 
 #!-sb-thread
 (define-vop (symbol-value)
index ff7d4d9..37fd03f 100644 (file)
 (describe '(a list))
 (describe #(a vector))
 
+;;; COPY-SYMBOL should work without signalling an error, even if the
+;;; symbol is unbound.
+(copy-symbol 'foo)
+(copy-symbol 'bar t)
+(defvar *baz* nil)
+(copy-symbol '*baz* t)
+
 ;;; success
 (quit :unix-status 104)
index 83ef7d0..27dcc26 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.pre8.89"
+"0.pre8.90"