From: Chris Hanson Date: Wed, 18 Sep 1991 20:05:55 +0000 (+0000) Subject: Redefine #!optional and #!rest to be something distinct from symbols. X-Git-Tag: 20090517-FFI~10199 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=e1db131701b83ff9713d9a19a347bfb27d5540db;p=mit-scheme.git Redefine #!optional and #!rest to be something distinct from symbols. --- diff --git a/v7/src/runtime/parse.scm b/v7/src/runtime/parse.scm index ad33f4b0e..ed4c80c89 100644 --- a/v7/src/runtime/parse.scm +++ b/v7/src/runtime/parse.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/parse.scm,v 14.15 1991/08/27 23:20:30 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/parse.scm,v 14.16 1991/09/18 20:00:17 cph Exp $ -Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology +Copyright (c) 1988-91 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -57,8 +57,8 @@ MIT in each case. |# (char-set #\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9 #\+ #\- #\. #\#))) - (set! lambda-optional-tag (intern "#!optional")) - (set! lambda-rest-tag (intern "#!rest")) + (set! lambda-optional-tag (object-new-type (ucode-type true) 3)) + (set! lambda-rest-tag (object-new-type (ucode-type true) 4)) (set! dot-symbol (intern ".")) (set! named-objects `((NULL . ,(list)) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 78bfea77f..30232cf19 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.122 1991/09/08 02:57:03 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.123 1991/09/18 20:01:00 cph Exp $ Copyright (c) 1988-91 Massachusetts Institute of Technology @@ -1348,6 +1348,9 @@ MIT in each case. |# (export (runtime syntaxer) lambda-optional-tag lambda-rest-tag) + (export (runtime unparser) + lambda-optional-tag + lambda-rest-tag) (export (runtime macros) lambda-optional-tag) (export (runtime unsyntaxer) diff --git a/v7/src/runtime/unpars.scm b/v7/src/runtime/unpars.scm index 73b6fc271..3a8a59f67 100644 --- a/v7/src/runtime/unpars.scm +++ b/v7/src/runtime/unpars.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/unpars.scm,v 14.23 1991/08/27 23:21:20 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/unpars.scm,v 14.24 1991/09/18 20:00:45 cph Exp $ Copyright (c) 1988-91 Massachusetts Institute of Technology @@ -279,6 +279,8 @@ MIT in each case. |# (define (unparse/true object) (cond ((eq? object true) (*unparse-string "#T")) ((undefined-value? object) (*unparse-string "#[undefined-value]")) + ((eq? object lambda-optional-tag) (*unparse-string "#!optional")) + ((eq? object lambda-rest-tag) (*unparse-string "#!rest")) (else (unparse/default object)))) (define (unparse/return-address return-address) diff --git a/v7/src/runtime/version.scm b/v7/src/runtime/version.scm index 4b8162ff8..ab6bec903 100644 --- a/v7/src/runtime/version.scm +++ b/v7/src/runtime/version.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.139 1991/09/08 02:58:16 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.140 1991/09/18 20:05:55 cph Exp $ Copyright (c) 1988-91 Massachusetts Institute of Technology @@ -45,7 +45,7 @@ MIT in each case. |# '())) (add-system! microcode-system) (add-event-receiver! event:after-restore snarf-microcode-version!) - (add-identification! "Runtime" 14 139)) + (add-identification! "Runtime" 14 140)) (define microcode-system) diff --git a/v8/src/runtime/runtime.pkg b/v8/src/runtime/runtime.pkg index eec2b102c..355091b65 100644 --- a/v8/src/runtime/runtime.pkg +++ b/v8/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.122 1991/09/08 02:57:03 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.123 1991/09/18 20:01:00 cph Exp $ Copyright (c) 1988-91 Massachusetts Institute of Technology @@ -1348,6 +1348,9 @@ MIT in each case. |# (export (runtime syntaxer) lambda-optional-tag lambda-rest-tag) + (export (runtime unparser) + lambda-optional-tag + lambda-rest-tag) (export (runtime macros) lambda-optional-tag) (export (runtime unsyntaxer)