From: Chris Hanson Date: Sat, 26 Mar 2005 04:17:04 +0000 (+0000) Subject: Change MAKE-DEFINITION so that its second argument is required. When X-Git-Tag: 20090517-FFI~1352 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=0527529e85c9baa45bced54c40560325bcd77d4a;p=mit-scheme.git Change MAKE-DEFINITION so that its second argument is required. When it was optional, a definition (define foo #!default) was incorrectly treated as if it were (define foo) --- diff --git a/v7/src/runtime/scan.scm b/v7/src/runtime/scan.scm index 651960a81..9ba63ef64 100644 --- a/v7/src/runtime/scan.scm +++ b/v7/src/runtime/scan.scm @@ -1,8 +1,9 @@ #| -*-Scheme-*- -$Id: scan.scm,v 14.8 2003/02/14 18:28:33 cph Exp $ +$Id: scan.scm,v 14.9 2005/03/26 04:16:57 cph Exp $ -Copyright (c) 1988-1999 Massachusetts Institute of Technology +Copyright 1986,1987,1988,1989,1990,1992 Massachusetts Institute of Technology +Copyright 2005 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -131,7 +132,8 @@ USA. body*))))) (define (unscan-loop names body receiver) - (cond ((null? names) (receiver '() body)) + (cond ((not (pair? names)) + (receiver '() body)) ((assignment? body) (assignment-components body (lambda (name value) @@ -176,7 +178,10 @@ USA. (vector open-block-tag names declarations) (if (null? names) '() - (make-sequence (map make-definition names))) + (make-sequence + (map (lambda (name) + (make-definition name (make-unassigned-reference-trap))) + names))) body))) (define (open-block? object) diff --git a/v7/src/runtime/scode.scm b/v7/src/runtime/scode.scm index 643a8e14c..681a6b258 100644 --- a/v7/src/runtime/scode.scm +++ b/v7/src/runtime/scode.scm @@ -1,8 +1,9 @@ #| -*-Scheme-*- -$Id: scode.scm,v 14.19 2003/02/14 18:28:33 cph Exp $ +$Id: scode.scm,v 14.20 2005/03/26 04:17:04 cph Exp $ -Copyright (c) 1988-1999, 2001 Massachusetts Institute of Technology +Copyright 1986,1987,1988,1989,1990,1991 Massachusetts Institute of Technology +Copyright 1992,2001,2005 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -105,12 +106,8 @@ USA. ;;;; Definition/Assignment -(define (make-definition name #!optional value) - (&typed-pair-cons (ucode-type definition) - name - (if (default-object? value) - (make-unassigned-reference-trap) - value))) +(define-integrable (make-definition name value) + (&typed-pair-cons (ucode-type definition) name value)) (define-integrable (definition? object) (object-type? (ucode-type definition) object))