From 4fb3490dbc4014c689407a443386448b1ef9df8b Mon Sep 17 00:00:00 2001
From: toy <toy>
Date: Mon, 7 Oct 2002 14:31:10 +0000
Subject: [PATCH] o Correct some spelling mistakes o Fix a few typos in code. o
 Delete a few unused symbols from various places o Use something better than
 %%RWSEQ-EOF%% for the eof marker. o Add target-foreign-linkage vars for the
 PPC and HPPA ports to aid   cross-compilation.  (The values are very likely
 wrong, but they're   not used yet.)

Based on a larger patch from Eric Marsden.
---
 code/linux-os.lisp            |  6 +-----
 code/osf1-os.lisp             |  3 +--
 code/pprint.lisp              |  4 ++--
 code/print.lisp               |  8 ++------
 code/remote.lisp              |  4 ++--
 code/stream.lisp              | 33 +++++++++++++++++----------------
 compiler/alpha/parms.lisp     | 10 ++++++++--
 compiler/disassem.lisp        |  3 +--
 compiler/generic/vm-macs.lisp |  5 ++---
 compiler/hppa/parms.lisp      |  9 +++++++--
 compiler/new-assem.lisp       |  6 +++---
 compiler/ppc/parms.lisp       |  9 ++++++---
 docs/cmu-user/aliens.tex      |  2 +-
 docs/cmu-user/debugger.tex    |  2 +-
 14 files changed, 54 insertions(+), 50 deletions(-)

diff --git a/code/linux-os.lisp b/code/linux-os.lisp
index ffa7ec6e6..e28497088 100644
--- a/code/linux-os.lisp
+++ b/code/linux-os.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/linux-os.lisp,v 1.1 1997/01/18 14:30:35 ram Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/linux-os.lisp,v 1.2 2002/10/07 14:31:04 toy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -19,8 +19,6 @@
 (in-package "SYSTEM")
 (use-package "EXTENSIONS")
 (export '(get-system-info get-page-size os-init))
-#+nil
-(export '(*task-self* *task-data* *task-notify*))
 
 (pushnew :linux *features*)
 
@@ -43,8 +41,6 @@
 (defvar *task-self*)
 
 (defun os-init ()			; don't know what to do here
-  #+nil
-  (setf *task-self* (mach:mach-task_self))
   #+sparc ;; Can't use #x20000000 thru #xDFFFFFFF, but mach tries to let us.
   (system:allocate-system-memory-at (system:int-sap #x20000000) #xc0000000))
 
diff --git a/code/osf1-os.lisp b/code/osf1-os.lisp
index 221397846..49677467a 100644
--- a/code/osf1-os.lisp
+++ b/code/osf1-os.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/osf1-os.lisp,v 1.5 1998/03/10 18:27:35 dtc Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/osf1-os.lisp,v 1.6 2002/10/07 14:31:04 toy Rel $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -17,7 +17,6 @@
 (in-package "SYSTEM")
 (use-package "EXTENSIONS")
 (export '(get-system-info get-page-size os-init))
-(export '(*task-self* *task-data* *task-notify*))
 
 (pushnew :osf1 *features*)
 
diff --git a/code/pprint.lisp b/code/pprint.lisp
index 2829f53f6..2dfd1f8c6 100644
--- a/code/pprint.lisp
+++ b/code/pprint.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/pprint.lisp,v 1.31 2002/07/22 17:05:00 toy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/pprint.lisp,v 1.32 2002/10/07 14:31:05 toy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -700,7 +700,7 @@
    stream, T (for *TERMINAL-IO*), or NIL (for *STANDARD-OUTPUT*).  The printer
    control variable *PRINT-LEVEL* is automatically handled."
   (when (and prefix per-line-prefix)
-    (error "Cannot specify both a prefix and a per-line-perfix."))
+    (error "Cannot specify both a prefix and a per-line-prefix."))
   (multiple-value-bind
       (stream-var stream-expression)
       (case stream-symbol
diff --git a/code/print.lisp b/code/print.lisp
index 6b0792ee6..be53b3020 100644
--- a/code/print.lisp
+++ b/code/print.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/print.lisp,v 1.82 2002/01/18 19:45:49 pmai Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/print.lisp,v 1.83 2002/10/07 14:31:05 toy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -331,11 +331,7 @@
    is assigned at this time.  Note: CHECK-FOR-CIRCULARITY must be called
    *EXACTLY* once with ASSIGN T, or the circularity detection noise will get
    confused about when to use #n= and when to use #n#.  If this returns
-   non-NIL when ASSIGN is T, then you must call HANDLE-CIRCULARITY on it.
-   If you are not using this inside a WITH-CIRCULARITY-DETECTION, then you
-   have to be prepared to handle a return value of :INITIATE which means it
-   needs to initiate the circularity detection noise.  See the source for
-   info on how to do that."
+   non-NIL when ASSIGN is T, then you must call HANDLE-CIRCULARITY on it."
   (cond ((null *print-circle*)
 	 ;; Don't bother, nobody cares.
 	 nil)
diff --git a/code/remote.lisp b/code/remote.lisp
index 39d5f4d11..974325d78 100644
--- a/code/remote.lisp
+++ b/code/remote.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/remote.lisp,v 1.6 1999/03/29 14:16:05 pw Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/remote.lisp,v 1.7 2002/10/07 14:31:05 toy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -239,7 +239,7 @@ to aborting due to a throw."
 	  (setf worked t))
       (if worked
 	(remote *current-wire*
-	  (return-1-values result values))
+	  (return-1-value result values))
 	(remote *current-wire*
 	  (remote-return-abort result)))
       (wire-force-output *current-wire*))))
diff --git a/code/stream.lisp b/code/stream.lisp
index 05f2ff846..2e7b40739 100644
--- a/code/stream.lisp
+++ b/code/stream.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/stream.lisp,v 1.52 2002/08/12 20:53:37 toy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/stream.lisp,v 1.53 2002/10/07 14:31:05 toy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1805,8 +1805,9 @@ POSITION: an INTEGER greater than or equal to zero, and less than or
   (declare (type (integer 0 *) start end))
   (if (or (endp l) (= start end))
       start
-      (let ((el (funcall read-function stream nil '%%RWSEQ-EOF%%)))
-	(cond ((eq el '%%RWSEQ-EOF%%) start)
+      (let* ((eof-marker (load-time-value (list 'eof-marker)))
+             (el (funcall read-function stream nil eof-marker)))
+	(cond ((eq el eof-marker) start)
 	      (t (setf (first l) el)
 		 (read-into-list-1 (rest l)
 				   (1+ start)
@@ -1830,11 +1831,11 @@ POSITION: an INTEGER greater than or equal to zero, and less than or
       ((or (endp lis) (>= i end)) i)
     (declare (type list lis))
     (declare (type index i))
-    (let ((el (funcall read-function stream nil '%%RWSEQ-EOF%%)))
-      (when (eq el '%%RWSEQ-EOF%%)
+    (let* ((eof-marker (load-time-value (list 'eof-marker)))
+           (el (funcall read-function stream nil eof-marker)))
+      (when (eq el eof-marker)
 	(return i))
-      (setf (first lis) el))
-    ))
+      (setf (first lis) el))))
 
 
 ;;; READ-INTO-SIMPLE-STRING --
@@ -1871,12 +1872,12 @@ POSITION: an INTEGER greater than or equal to zero, and less than or
        )
       ((or (>= i s-len) (>= i end)) i)
     (declare (type index i s-len))
-    (let ((el (read-char stream nil '%%RWSEQ-EOF%%)))
-      (declare (type (or character (member %%RWSEQ-EOF%%)) el))
-      (when (eq el '%%RWSEQ-EOF%%)
+    (let* ((eof-marker (load-time-value (list 'eof-marker)))
+	   (el (read-char stream nil eof-marker)))
+      (declare (type (or character stream) el))
+      (when (eq el eof-marker)
 	(return i))
-      (setf (char s i) (the character el)))
-    ))
+      (setf (char s i) (the character el)))))
 
 
 ;;; READ-INTO-SIMPLE-ARRAY --
@@ -2027,11 +2028,11 @@ POSITION: an INTEGER greater than or equal to zero, and less than or
 	 )
 	((or (>= i a-len) (>= i end)) i)
       (declare (type index i a-len))
-      (let ((el (funcall read-function stream nil '%%RWSEQ-EOF%%)))
-	(when (eq el '%%RWSEQ-EOF%%)
+      (let* ((eof-marker (load-time-value (list 'eof-marker)))
+	     (el (funcall read-function stream nil eof-marker)))
+	(when (eq el eof-marker)
 	  (return i))
-	(setf (aref v i) el))
-      )))
+	(setf (aref v i) el)))))
 
 (declaim (end-block))			; READ-SEQUENCE block
 
diff --git a/compiler/alpha/parms.lisp b/compiler/alpha/parms.lisp
index 24c3d71d1..5b9b5c975 100644
--- a/compiler/alpha/parms.lisp
+++ b/compiler/alpha/parms.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/alpha/parms.lisp,v 1.7 2002/03/31 14:48:37 pw Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/alpha/parms.lisp,v 1.8 2002/10/07 14:31:07 toy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -130,17 +130,23 @@
 
 (export '(target-read-only-space-start
 	  target-static-space-start
-	  target-dynamic-space-start))
+	  target-dynamic-space-start
+          target-foreign-linkage-space-start
+	  target-foreign-linkage-entry-size))
 
 ;;; Where to put the different spaces.
 ;;; 
 #-linux (defparameter target-read-only-space-start #x20000000)
 #-linux (defparameter target-static-space-start    #x28000000)
 #-linux (defparameter target-dynamic-space-start   #x30000000)
+#-linux (defparameter target-foreign-linkage-space-start #x0fc00000)
+#-linux (defconstant target-foreign-linkage-entry-size 8) ;In bytes.  Duh.
 
 #+linux (defparameter target-read-only-space-start #x10000000)
 #+linux (defparameter target-static-space-start    #x28000000)
 #+linux (defparameter target-dynamic-space-start   #x30000000)
+#+linux (defparameter target-foreign-linkage-space-start #x0fc00000)
+#+linux (defconstant target-foreign-linkage-entry-size 8) ;In bytes.  Duh.
 
 ;; The space-register holding the lisp heap.
 (defconstant lisp-heap-space 4)
diff --git a/compiler/disassem.lisp b/compiler/disassem.lisp
index 09f00f217..3856658a8 100644
--- a/compiler/disassem.lisp
+++ b/compiler/disassem.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/disassem.lisp,v 1.32 2002/08/27 22:18:26 moore Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/disassem.lisp,v 1.33 2002/10/07 14:31:06 toy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -59,7 +59,6 @@
 	  sap-ref-dchunk
 	  get-inst-space
 	  find-inst
-	  make-decoded-inst
 
 	  ;; getting at the dstate (usually from mach-dep code)
 	  disassem-state dstate-cur-offs dstate-next-offs
diff --git a/compiler/generic/vm-macs.lisp b/compiler/generic/vm-macs.lisp
index 238a0d423..558f6199c 100644
--- a/compiler/generic/vm-macs.lisp
+++ b/compiler/generic/vm-macs.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/vm-macs.lisp,v 1.18 2002/01/15 20:43:06 toy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/vm-macs.lisp,v 1.19 2002/10/07 14:31:07 toy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -62,8 +62,7 @@
 	  primitive-object-lowtag primitive-object-options
 	  primitive-object-slots primitive-object-size
 	  primitive-object-variable-length slot-name slot-docs slot-rest-p
-	  slot-offset slot-length slot-options *primitive-objects*
-	  define-for-each-primitive-object))
+	  slot-offset slot-length slot-options *primitive-objects*))
 
 
 (defun remove-keywords (options keywords)
diff --git a/compiler/hppa/parms.lisp b/compiler/hppa/parms.lisp
index 6b57c5827..9632960ea 100644
--- a/compiler/hppa/parms.lisp
+++ b/compiler/hppa/parms.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/hppa/parms.lisp,v 1.8 2002/03/31 14:48:39 pw Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/hppa/parms.lisp,v 1.9 2002/10/07 14:31:08 toy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -121,13 +121,18 @@
 
 (export '(target-read-only-space-start
 	  target-static-space-start
-	  target-dynamic-space-start))
+	  target-dynamic-space-start
+          target-foreign-linkage-space-start
+	  target-foreign-linkage-entry-size))
+
 
 ;;; Where to put the different spaces.
 ;;; 
 (defparameter target-read-only-space-start #x20000000)
 (defparameter target-static-space-start    #x28000000)
 (defparameter target-dynamic-space-start   #x30000000)
+(defparameter target-foreign-linkage-space-start #x0fc00000)
+(defconstant target-foreign-linkage-entry-size 8) ; in bytes
 
 ;; The space-register holding the lisp heap.
 (defconstant lisp-heap-space 5)
diff --git a/compiler/new-assem.lisp b/compiler/new-assem.lisp
index 2025d31bd..23fd366bd 100644
--- a/compiler/new-assem.lisp
+++ b/compiler/new-assem.lisp
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/new-assem.lisp,v 1.30 2002/08/09 20:18:47 toy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/new-assem.lisp,v 1.31 2002/10/07 14:31:06 toy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -24,7 +24,7 @@
 (in-package :new-assem)
 (export '(emit-byte emit-skip emit-back-patch emit-chooser emit-postit
 	  define-emitter define-instruction define-instruction-macro
-	  def-assembler-params branch flushable variable-length reads writes
+	  def-assembler-params branch flushable variable-length
 
 	  segment make-segment segment-name segment-collect-dynamic-statistics
 	  assemble align inst without-scheduling 
@@ -292,7 +292,7 @@
 		      (function-lambda-expression emitter)
 		    (declare (ignore lambda lexenv-p))
 		    name)
-		  '<flushed>)))
+		  "<flushed>")))
     (when (inst-depth inst)
       (format stream ", depth=~D" (inst-depth inst)))))
 
diff --git a/compiler/ppc/parms.lisp b/compiler/ppc/parms.lisp
index af5ce1694..eb0d02cad 100644
--- a/compiler/ppc/parms.lisp
+++ b/compiler/ppc/parms.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ppc/parms.lisp,v 1.3 2002/03/31 14:48:40 pw Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ppc/parms.lisp,v 1.4 2002/10/07 14:31:09 toy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -137,8 +137,9 @@
 ;;;; Description of the target address space.
 (export '(target-read-only-space-start
 	  target-static-space-start
-	  target-dynamic-space-start))
-
+	  target-dynamic-space-start
+          target-foreign-linkage-space-start
+	  target-foreign-linkage-entry-size))
 
 
 ;;; Where to put the different spaces.
@@ -146,6 +147,8 @@
 (defparameter target-read-only-space-start #x01000000)
 (defparameter target-static-space-start    #x05000000)
 (defparameter target-dynamic-space-start   #x07000000)
+(defparameter target-foreign-linkage-space-start #x0fc00000)
+(defconstant target-foreign-linkage-entry-size 8) ;In bytes.  Duh.
 
 
 
diff --git a/docs/cmu-user/aliens.tex b/docs/cmu-user/aliens.tex
index da04d48b7..019c2f648 100644
--- a/docs/cmu-user/aliens.tex
+++ b/docs/cmu-user/aliens.tex
@@ -555,7 +555,7 @@ referenced.
 Note that if a Lisp core image is saved (using \funref{save-lisp}), all
 loaded foreign code is lost when the image is restarted.
 
-\begin{defun}{alien:}{load-foreign}{%
+\begin{defun}{ext:}{load-foreign}{%
     \args{\var{files} \keys{\kwd{libraries} \kwd{base-file} \kwd{env}}}}
   
   \var{files} is a \code{simple-string} or list of
diff --git a/docs/cmu-user/debugger.tex b/docs/cmu-user/debugger.tex
index 21f959e31..a2d7ca28b 100644
--- a/docs/cmu-user/debugger.tex
+++ b/docs/cmu-user/debugger.tex
@@ -534,7 +534,7 @@ available, and even then, values are only available at known locations.
 When the debugger command loop establishes variable bindings for available
 variables, these variable bindings have lexical scope and dynamic
 extent.\footnote{The variable bindings are actually created using the \clisp{}
-\code{symbol-macro-let} special form.}  You can close over them, but such closures
+\code{symbol-macrolet} special form.}  You can close over them, but such closures
 can't be used as upward funargs.
 
 You can also set local variables using \code{setq}, but if the variable was closed
-- 
GitLab