From d4d536d1e435cee04a91d545f7d93a73dfc97397 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 19 Nov 2004 07:12:03 +0000 Subject: [PATCH] Add syntax for #!UNASSIGNED and #!UNSPECIFIC. --- v7/src/runtime/global.scm | 8 ++++---- v7/src/runtime/parse.scm | 4 +++- v7/src/runtime/runtime.pkg | 8 ++++++-- v7/src/runtime/unpars.scm | 6 +++--- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/v7/src/runtime/global.scm b/v7/src/runtime/global.scm index 2e1ed9b56..1eaaacb9e 100644 --- a/v7/src/runtime/global.scm +++ b/v7/src/runtime/global.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: global.scm,v 14.70 2004/10/30 03:58:54 cph Exp $ +$Id: global.scm,v 14.71 2004/11/19 07:11:36 cph Exp $ Copyright 1988,1989,1991,1992,1993,1995 Massachusetts Institute of Technology Copyright 1998,2000,2001,2003,2004 Massachusetts Institute of Technology @@ -317,13 +317,13 @@ USA. ;; same as `undefined-conditional-branch'. ;; (eq? object *the-non-printing-object*) ;; (eq? object unspecific) - (eq? object (microcode-object/unassigned)))) + (eq? object unassigned-object))) (define unspecific (object-new-type (ucode-type constant) 1)) -(define *the-non-printing-object* - unspecific) +(define unassigned-object + (object-new-type (ucode-type constant) 2)) (define (obarray->list #!optional obarray) (let ((obarray diff --git a/v7/src/runtime/parse.scm b/v7/src/runtime/parse.scm index 13821f9db..f9ccd33b6 100644 --- a/v7/src/runtime/parse.scm +++ b/v7/src/runtime/parse.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: parse.scm,v 14.54 2004/11/19 06:56:11 cph Exp $ +$Id: parse.scm,v 14.55 2004/11/19 07:11: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 @@ -489,6 +489,8 @@ USA. ((string-ci=? name "aux") lambda-aux-tag) ((string-ci=? name "eof") (make-eof-object #f)) ((string-ci=? name "default") (default-object)) + ((string-ci=? name "unassigned") unassigned-object) + ((string-ci=? name "unspecific") unspecific) (else (error:illegal-named-constant name))))) (define lambda-optional-tag (object-new-type (ucode-type constant) 3)) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 6223d2ec1..62ab36906 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.515 2004/11/19 07:00:01 cph Exp $ +$Id: runtime.pkg,v 14.516 2004/11/19 07:11:55 cph Exp $ Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology @@ -273,7 +273,7 @@ USA. (export () %exit %quit - *the-non-printing-object* + (*the-non-printing-object* unspecific) append-hook-to-list apply @@ -370,6 +370,10 @@ USA. with-interrupt-mask with-values write-to-string) + (export (runtime parser) + unassigned-object) + (export (runtime unparser) + unassigned-object) (initialization (initialize-package!))) (define-package (runtime alternative-lambda) diff --git a/v7/src/runtime/unpars.scm b/v7/src/runtime/unpars.scm index 0b52b5b7d..5750c1a57 100644 --- a/v7/src/runtime/unpars.scm +++ b/v7/src/runtime/unpars.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: unpars.scm,v 14.60 2004/11/19 07:04:52 cph Exp $ +$Id: unpars.scm,v 14.61 2004/11/19 07:12:03 cph Exp $ Copyright 1986,1987,1990,1991,1992,1995 Massachusetts Institute of Technology Copyright 1996,2001,2002,2003,2004 Massachusetts Institute of Technology @@ -316,14 +316,14 @@ USA. (cond ((not object) (*unparse-string "#f")) ((null? object) (*unparse-string "()")) ((eq? object #t) (*unparse-string "#t")) - ((undefined-value? object) - (*unparse-string "#[unspecified-return-value]")) ((default-object? object) (*unparse-string "#!default")) ((eof-object? object) (*unparse-string "#!eof")) ((eq? object lambda-aux-tag) (*unparse-string "#!aux")) ((eq? object lambda-key-tag) (*unparse-string "#!key")) ((eq? object lambda-optional-tag) (*unparse-string "#!optional")) ((eq? object lambda-rest-tag) (*unparse-string "#!rest")) + ((eq? object unassigned-object) (*unparse-string "#!unassigned")) + ((eq? object unspecific) (*unparse-string "#!unspecific")) (else (unparse/default object)))) (define (unparse/return-address return-address) -- 2.25.1