#| -*-Scheme-*-
-$Id: parse.scm,v 14.59 2005/04/12 18:28:31 cph Exp $
+$Id: parse.scm,v 14.60 2005/05/30 18:48:43 cph Exp $
Copyright 1986,1987,1988,1989,1990,1991 Massachusetts Institute of Technology
Copyright 1992,1993,1994,1997,1998,1999 Massachusetts Institute of Technology
ctx
(receive (string quoted?) (parse-atom port db (list char))
(if quoted?
- (%string->symbol string)
+ (string->symbol string)
(or (string->number string (db-radix db))
- (%string->symbol string)))))
+ (string->symbol string)))))
(define (handler:symbol port db ctx char)
ctx
(receive (string quoted?) (parse-atom port db (list char))
quoted?
- (%string->symbol string)))
+ (string->symbol string)))
(define (handler:number port db ctx char1 char2)
ctx
#| -*-Scheme-*-
-$Id: runtime.pkg,v 14.550 2005/05/30 04:42:24 cph Exp $
+$Id: runtime.pkg,v 14.551 2005/05/30 18:48:53 cph Exp $
Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology
Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology
symbol
symbol->string
symbol->utf8-string
+ symbol->wide-string
symbol-append
symbol-hash
symbol-hash-mod
symbol?
uninterned-symbol?
utf8-string->symbol
- utf8-string->uninterned-symbol)
- (export (runtime parser)
- %string->symbol))
+ utf8-string->uninterned-symbol))
(define-package (runtime microcode-data)
(files "udata")
#| -*-Scheme-*-
-$Id: symbol.scm,v 1.18 2005/05/24 04:50:35 cph Exp $
+$Id: symbol.scm,v 1.19 2005/05/30 18:49:01 cph Exp $
Copyright 1992,1993,2001,2003,2004,2005 Massachusetts Institute of Technology
(error:wrong-type-argument object "uninterned symbol" caller)))
(define (string->uninterned-symbol string)
- (guarantee-string string 'STRING->UNINTERNED-SYMBOL)
- ((ucode-primitive system-pair-cons) (ucode-type uninterned-symbol)
- (string->utf8-string string)
- (make-unmapped-unbound-reference-trap)))
+ (make-uninterned-symbol (if (string? string)
+ (string->utf8-string string)
+ (wide-string->utf8-string string))))
(define (utf8-string->uninterned-symbol string)
- (guarantee-utf8-string string 'UTF8-STRING->UNINTERNED-SYMBOL)
+ (make-uninterned-symbol (if (utf8-string? string)
+ (string-copy string)
+ (wide-string->utf8-string string))))
+
+(define (make-uninterned-symbol string)
((ucode-primitive system-pair-cons) (ucode-type uninterned-symbol)
- (string-copy string)
+ string
(make-unmapped-unbound-reference-trap)))
(define (string->symbol string)
- (guarantee-string string 'STRING->SYMBOL)
- (let ((string* (string->utf8-string string)))
- (if (eq? string* string)
- (or ((ucode-primitive find-symbol) string)
- ((ucode-primitive string->symbol) (string-copy string)))
- ((ucode-primitive string->symbol) string*))))
+ ((ucode-primitive string->symbol) (if (string? string)
+ (string->utf8-string string)
+ (wide-string->utf8-string string))))
(define (utf8-string->symbol string)
- (guarantee-utf8-string string 'UTF8-STRING->SYMBOL)
- (or ((ucode-primitive find-symbol) string)
- ((ucode-primitive string->symbol) (string-copy string))))
-
-(define (%string->symbol string)
- ((ucode-primitive string->symbol) (string->utf8-string string)))
+ (if (utf8-string? string)
+ (or ((ucode-primitive find-symbol) string)
+ ((ucode-primitive string->symbol) (string-copy string)))
+ ((ucode-primitive string->symbol) (wide-string->utf8-string string))))
(define (substring->symbol string start end)
(guarantee-substring string start end 'SUBSTRING->SYMBOL)
(define (symbol->utf8-string symbol)
(string-copy (symbol-name symbol)))
+(define (symbol->wide-string symbol)
+ (utf8-string->wide-string (symbol-name symbol)))
+
(define (symbol->string symbol)
- (wide-string->string (utf8-string->wide-string (symbol-name symbol))))
\ No newline at end of file
+ (wide-string->string (symbol->wide-string symbol)))
\ No newline at end of file