From: Stephen Adams Date: Thu, 9 Feb 1995 04:29:15 +0000 (+0000) Subject: `Improved' last change by moving test. X-Git-Tag: 20090517-FFI~6662 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=439aef62be0cd60b78d1e2e4de6c8430be47ff69;p=mit-scheme.git `Improved' last change by moving test. --- diff --git a/v8/src/compiler/midend/lamlift.scm b/v8/src/compiler/midend/lamlift.scm index 9299cebd1..a6ae4c5a7 100644 --- a/v8/src/compiler/midend/lamlift.scm +++ b/v8/src/compiler/midend/lamlift.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: lamlift.scm,v 1.3 1995/02/09 04:15:32 adams Exp $ +$Id: lamlift.scm,v 1.4 1995/02/09 04:29:15 adams Exp $ Copyright (c) 1994 Massachusetts Institute of Technology @@ -686,15 +686,17 @@ MIT in each case. |# ;; continuation variable always leftmost (call-with-values (lambda () - (list-split lambda-list** referenced-continuation-variable?)) + (list-split lambda-list** continuation-variable?)) (lambda (cont-vars other-vars) - (if (or (null? cont-vars) - (not (null? (cdr cont-vars)))) - (internal-error "Creating LAMBDA with non-unique continuation" - env)) - (append cont-vars - (list-transform-negative other-vars - ignored-continuation-variable?)))))) + (let ((cont-vars + ;; Discard ignored continuation variables + (list-transform-positive cont-vars + referenced-continuation-variable?))) + (if (or (null? cont-vars) + (not (null? (cdr cont-vars)))) + (internal-error "Creating LAMBDA with non-unique continuation" + env)) + (append cont-vars other-vars)))))) ;; If this LAMBDA expression has a name, find all call sites and ;; rewrite to pass additional arguments (cond ((lamlift/env/binding env)