Update runtime system to use lower case as the canonical case for
authorChris Hanson <org/chris-hanson/cph>
Tue, 18 Apr 1989 16:30:11 +0000 (16:30 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 18 Apr 1989 16:30:11 +0000 (16:30 +0000)
interned symbols.

v7/src/runtime/defstr.scm
v7/src/runtime/lambda.scm
v7/src/runtime/make.scm
v7/src/runtime/parse.scm
v7/src/runtime/runtime.pkg
v7/src/runtime/scan.scm
v7/src/runtime/scode.scm
v7/src/runtime/syntax.scm
v8/src/runtime/make.scm
v8/src/runtime/runtime.pkg

index 719010c5e912c7da00e363c8227d39d29aa67738..c5d83c56024de66c8916d98cd52f5b8cb98d3b99 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/defstr.scm,v 14.6 1989/02/28 18:23:55 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/defstr.scm,v 14.7 1989/04/18 16:29:25 cph Exp $
 
-Copyright (c) 1988 Massachusetts Institute of Technology
+Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -345,7 +345,7 @@ must be defined when the defstruct is evaluated.
     read-only?))
 
 (define-integrable structure
-  (string->symbol "#[DEFSTRUCT-DESCRIPTION]"))
+  (string->symbol "#[defstruct-description]"))
 
 (define slot-assoc)
 
index 730ae3fda64acce47b97285d249d57291119fc84..7a79743f34ea7378cdc5ea88ac77216a44141e58 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/lambda.scm,v 14.4 1988/12/30 06:42:58 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/lambda.scm,v 14.5 1989/04/18 16:29:32 cph Rel $
 
-Copyright (c) 1988 Massachusetts Institute of Technology
+Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -470,10 +470,10 @@ MIT in each case. |#
 ;;;; Internal Lambda
 
 (define-integrable lambda-tag:internal-lambda
-  (string->symbol "#[INTERNAL-LAMBDA]"))
+  (string->symbol "#[internal-lambda]"))
 
 (define-integrable lambda-tag:internal-lexpr
-  (string->symbol "#[INTERNAL-LEXPR]"))
+  (string->symbol "#[internal-lexpr]"))
 
 (define-integrable (make-internal-lambda names body)
   (make-slambda lambda-tag:internal-lambda names body))
index 92527948e15f766f3d2d82cafd6a7bf4a1883a9b..8d107f75c4e500b547c3a55fec8d277fc1aed4c7 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/make.scm,v 14.9 1988/12/31 06:39:18 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/make.scm,v 14.10 1989/04/18 16:29:39 cph Exp $
 
-Copyright (c) 1988 Massachusetts Institute of Technology
+Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -62,7 +62,7 @@ MIT in each case. |#
   string-length
   substring=?
   substring-move-right!
-  substring-upcase!
+  substring-downcase!
   tty-beep
   tty-flush-output
   tty-read-char-immediate
@@ -170,7 +170,8 @@ MIT in each case. |#
   object)
 
 (define (implemented-primitive-procedure? primitive)
-  (get-primitive-address (get-primitive-name (object-datum primitive)) false))
+  (get-primitive-address (intern (get-primitive-name (object-datum primitive)))
+                        false))
 
 (define map-filename
   (if (and (implemented-primitive-procedure? file-exists?)
@@ -191,17 +192,20 @@ MIT in each case. |#
       (substring-move-right! y 0 y-length result x-length)
       result)))
 
-(define (string-upcase string)
+(define (string-downcase string)
   (let ((size (string-length string)))
     (let ((result (string-allocate size)))
       (substring-move-right! string 0 size result 0)
-      (substring-upcase! result 0 size)
+      (substring-downcase! result 0 size)
       result)))
 
 (define (string=? string1 string2)
   (substring=? string1 0 (string-length string1)
               string2 0 (string-length string2)))
 
+(define (intern string)
+  (string->symbol (string-downcase string)))
+
 (define (package-initialize package-name procedure-name)
   (tty-write-char newline-char)
   (tty-write-string "initialize: (")
@@ -300,7 +304,7 @@ MIT in each case. |#
                (string=? filename "gc")))
        (eval (purify (fasload (map-filename filename) true)) environment)))
  `((SORT-TYPE . MERGE-SORT)
-   (OS-TYPE . ,(string->symbol (string-upcase os-name-string)))
+   (OS-TYPE . ,(intern os-name-string))
    (OPTIONS . NO-LOAD)))
 \f
 ;; Funny stuff is done.  Rest of sequence is standardized.
index 37dd0b38f18adeb67a7b0cc7bf67aee3d343c5af..2681ffe5096e0695422f8758893abc867f8ce7c5 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/parse.scm,v 14.6 1989/02/10 22:13:50 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/parse.scm,v 14.7 1989/04/18 16:29:45 cph Rel $
 
-Copyright (c) 1988 Massachusetts Institute of Technology
+Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -269,7 +269,7 @@ MIT in each case. |#
 
 (define (intern-string! string)
   ;; Special version of `intern' to reduce consing and increase speed.
-  (substring-upcase! string 0 (string-length string))
+  (substring-downcase! string 0 (string-length string))
   (string->symbol string))
 
 (define (parse-object/symbol)
index fd41b26eb7a4023140b7adea991f7ab2571437ce..70f35de8c513ced652abdbc09f9dffbc604014ca 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.34 1989/04/15 01:24:38 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.35 1989/04/18 16:29:51 cph Exp $
 
 Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
@@ -1341,7 +1341,6 @@ MIT in each case. |#
          make-definition
          make-delay
          make-in-package
-         make-named-tag
          make-quotation
          make-the-environment
          make-variable
@@ -1355,7 +1354,6 @@ MIT in each case. |#
          string->symbol
          string->uninterned-symbol
          symbol->string
-         symbol->string/downcase?
          symbol-append
          symbol-hash
          symbol?
index 411429b5950fce8c5c719bcd0c6f64d4e08b8bb0..bd3a4556cedf739e929691727d79b6df8efa29b8 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/scan.scm,v 14.2 1988/06/16 06:28:56 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/scan.scm,v 14.3 1989/04/18 16:29:59 cph Rel $
 
-Copyright (c) 1988 Massachusetts Institute of Technology
+Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -54,7 +54,7 @@ MIT in each case. |#
 ;;; UNSCAN-DEFINES, respectively.
 
 (define-integrable open-block-tag
-  (string->symbol "#[OPEN-BLOCK]"))
+  (string->symbol "#[open-block]"))
 
 (define-integrable sequence-2-type
   (ucode-type sequence-2))
index 77b89a6ce069f717ae51bb499c2e3a917cbdd725..6f53db152ae6917eccbe7c1d876c8db389c7e77e 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/scode.scm,v 14.4 1989/04/15 01:22:03 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/scode.scm,v 14.5 1989/04/18 16:30:05 cph Rel $
 
-Copyright (c) 1988 Massachusetts Institute of Technology
+Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -106,28 +106,19 @@ MIT in each case. |#
 (define-integrable string->symbol
   (ucode-primitive string->symbol))
 
-(define symbol->string/downcase?
-  true)
-
-(define (symbol->string symbol)
-  (let ((string (system-pair-car symbol)))
-    (if (and symbol->string/downcase?
-            (object-type? (ucode-type interned-symbol) symbol)
-            (not (string-find-next-char-in-set string char-set:lower-case)))
-       (string-downcase string)
-       (string-copy string))))
-
-(define (make-named-tag name)
-  (string->symbol (string-append "#[" name "]")))
+(define-integrable (symbol->string symbol)
+  (string-copy (system-pair-car symbol)))
 
 (define-integrable (intern string)
-  (string->symbol (string-upcase string)))
+  (string->symbol (string-downcase string)))
 
 (define-integrable (symbol-hash symbol)
   (string-hash (system-pair-car symbol)))
 
 (define (symbol-append . symbols)
-  (string->symbol (apply string-append (map system-pair-car symbols))))
+  (let ((string (apply string-append (map system-pair-car symbols))))
+    (string-downcase! string)
+    (string->symbol string)))
 
 ;;;; Variable
 
@@ -234,7 +225,7 @@ MIT in each case. |#
              (eq? (car text) declaration-tag)))))
 
 (define-integrable declaration-tag
-  (string->symbol "#[DECLARATION]"))
+  (string->symbol "#[declaration]"))
 
 (define-integrable (declaration-text declaration)
   (cdr (comment-text declaration)))
index b2558ff4b5250ca5fc90b6c2af758552344e71ba..7b414d4d6ded1acb0fcd7457436c8f78626eaa00 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/Attic/syntax.scm,v 14.7 1988/12/05 23:32:12 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/Attic/syntax.scm,v 14.8 1989/04/18 16:30:11 cph Rel $
 
-Copyright (c) 1988 Massachusetts Institute of Technology
+Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -603,16 +603,16 @@ MIT in each case. |#
                               (list body)))))
 
 (define-integrable lambda-tag:unnamed
-  (string->symbol "#[UNNAMED-PROCEDURE]"))
+  (string->symbol "#[unnamed-procedure]"))
 
 (define-integrable lambda-tag:let
-  (string->symbol "#[LET-PROCEDURE]"))
+  (string->symbol "#[let-procedure]"))
 
 (define-integrable lambda-tag:fluid-let
-  (string->symbol "#[FLUID-LET-PROCEDURE]"))
+  (string->symbol "#[fluid-let-procedure]"))
 
 (define-integrable lambda-tag:make-environment
-  (string->symbol "#[MAKE-ENVIRONMENT]"))
+  (string->symbol "#[make-environment]"))
 \f
 ;;;; Lambda List Parser
 
index 1f520a3ce156871e7131d2c282961373805d44b7..bc87dbc24fe36c3b944d46bc00a85a766af6b342 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/make.scm,v 14.9 1988/12/31 06:39:18 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/make.scm,v 14.10 1989/04/18 16:29:39 cph Exp $
 
-Copyright (c) 1988 Massachusetts Institute of Technology
+Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -62,7 +62,7 @@ MIT in each case. |#
   string-length
   substring=?
   substring-move-right!
-  substring-upcase!
+  substring-downcase!
   tty-beep
   tty-flush-output
   tty-read-char-immediate
@@ -170,7 +170,8 @@ MIT in each case. |#
   object)
 
 (define (implemented-primitive-procedure? primitive)
-  (get-primitive-address (get-primitive-name (object-datum primitive)) false))
+  (get-primitive-address (intern (get-primitive-name (object-datum primitive)))
+                        false))
 
 (define map-filename
   (if (and (implemented-primitive-procedure? file-exists?)
@@ -191,17 +192,20 @@ MIT in each case. |#
       (substring-move-right! y 0 y-length result x-length)
       result)))
 
-(define (string-upcase string)
+(define (string-downcase string)
   (let ((size (string-length string)))
     (let ((result (string-allocate size)))
       (substring-move-right! string 0 size result 0)
-      (substring-upcase! result 0 size)
+      (substring-downcase! result 0 size)
       result)))
 
 (define (string=? string1 string2)
   (substring=? string1 0 (string-length string1)
               string2 0 (string-length string2)))
 
+(define (intern string)
+  (string->symbol (string-downcase string)))
+
 (define (package-initialize package-name procedure-name)
   (tty-write-char newline-char)
   (tty-write-string "initialize: (")
@@ -300,7 +304,7 @@ MIT in each case. |#
                (string=? filename "gc")))
        (eval (purify (fasload (map-filename filename) true)) environment)))
  `((SORT-TYPE . MERGE-SORT)
-   (OS-TYPE . ,(string->symbol (string-upcase os-name-string)))
+   (OS-TYPE . ,(intern os-name-string))
    (OPTIONS . NO-LOAD)))
 \f
 ;; Funny stuff is done.  Rest of sequence is standardized.
index bd510f77c96a1de92674bc9297ebd50e860f1671..24a39ae100717d180549e5fde1e2176873b92ae5 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.34 1989/04/15 01:24:38 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.35 1989/04/18 16:29:51 cph Exp $
 
 Copyright (c) 1988, 1989 Massachusetts Institute of Technology
 
@@ -1341,7 +1341,6 @@ MIT in each case. |#
          make-definition
          make-delay
          make-in-package
-         make-named-tag
          make-quotation
          make-the-environment
          make-variable
@@ -1355,7 +1354,6 @@ MIT in each case. |#
          string->symbol
          string->uninterned-symbol
          symbol->string
-         symbol->string/downcase?
          symbol-append
          symbol-hash
          symbol?