From 8d54d913d62d4649f4eba6729942378c22d303b0 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 8 Aug 1997 21:29:38 +0000 Subject: [PATCH] Add switch to disable canonicalization of symbol case by reader. --- v7/src/runtime/parse.scm | 10 +++++++--- v7/src/runtime/runtime.pkg | 3 ++- v8/src/runtime/runtime.pkg | 3 ++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/v7/src/runtime/parse.scm b/v7/src/runtime/parse.scm index a19435239..16861b394 100644 --- a/v7/src/runtime/parse.scm +++ b/v7/src/runtime/parse.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: parse.scm,v 14.27 1994/12/02 01:50:28 adams Exp $ +$Id: parse.scm,v 14.28 1997/08/08 21:29:38 cph Exp $ -Copyright (c) 1988-94 Massachusetts Institute of Technology +Copyright (c) 1988-97 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -76,6 +76,7 @@ MIT in each case. |# (set! *parser-associate-positions?* false) (set! *parser-associate-position* parser-associate-positions/default) (set! *parser-current-position* parser-current-position/default) + (set! *parser-canonicalize-symbols?* #t) (set! system-global-parser-table (make-system-global-parser-table)) (set-current-parser-table! system-global-parser-table)) @@ -351,9 +352,12 @@ MIT in each case. |# (string->number string (if (memv *parser-radix* '(2 8 10 16)) *parser-radix* 10))) +(define *parser-canonicalize-symbols?*) + (define (intern-string! string) ;; Special version of `intern' to reduce consing and increase speed. - (substring-downcase! string 0 (string-length string)) + (if *parser-canonicalize-symbols?* + (substring-downcase! string 0 (string-length string))) (string->symbol string)) (define-accretor (parse-object/symbol) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index e625cce52..33b604d9b 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.286 1997/07/26 07:40:41 cph Exp $ +$Id: runtime.pkg,v 14.287 1997/08/08 21:29:19 cph Exp $ Copyright (c) 1988-97 Massachusetts Institute of Technology @@ -1621,6 +1621,7 @@ MIT in each case. |# (files "parse") (parent ()) (export () + *parser-canonicalize-symbols?* *parser-radix* parse-object parse-objects diff --git a/v8/src/runtime/runtime.pkg b/v8/src/runtime/runtime.pkg index 9ea628a54..4a727c61f 100644 --- a/v8/src/runtime/runtime.pkg +++ b/v8/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.292 1997/07/26 07:40:06 cph Exp $ +$Id: runtime.pkg,v 14.293 1997/08/08 21:29:26 cph Exp $ Copyright (c) 1988-97 Massachusetts Institute of Technology @@ -1625,6 +1625,7 @@ MIT in each case. |# (files "parse") (parent ()) (export () + *parser-canonicalize-symbols?* *parser-radix* parse-object parse-objects -- 2.25.1