From: Chris Hanson Date: Tue, 9 Jan 2007 06:37:50 +0000 (+0000) Subject: Don't allow MAKE-CONDITIONAL to accept two arguments; require three. X-Git-Tag: 20090517-FFI~805 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=cfd10af222c9f734b5e170f22fcd3d47aa416da6;p=mit-scheme.git Don't allow MAKE-CONDITIONAL to accept two arguments; require three. Otherwise, programs of the form (IF #!DEFAULT) miscompile. --- diff --git a/v7/src/runtime/scomb.scm b/v7/src/runtime/scomb.scm index 275b7a977..87188c214 100644 --- a/v7/src/runtime/scomb.scm +++ b/v7/src/runtime/scomb.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: scomb.scm,v 14.26 2007/01/05 21:19:28 cph Exp $ +$Id: scomb.scm,v 14.27 2007/01/09 06:37:50 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -173,20 +173,16 @@ USA. ;;;; Conditional -(define (make-conditional predicate consequent #!optional alternative) - (let ((alternative - (if (default-object? alternative) - undefined-conditional-branch - alternative))) - (if (and (combination? predicate) - (eq? (combination-operator predicate) (ucode-primitive not))) - (make-conditional (car (combination-operands predicate)) - alternative - consequent) - (&typed-triple-cons (ucode-type conditional) - predicate - consequent - alternative)))) +(define (make-conditional predicate consequent alternative) + (if (and (combination? predicate) + (eq? (combination-operator predicate) (ucode-primitive not))) + (make-conditional (car (combination-operands predicate)) + alternative + consequent) + (&typed-triple-cons (ucode-type conditional) + predicate + consequent + alternative))) (define (conditional? object) (object-type? (ucode-type conditional) object))