From: Stephen Adams Date: Wed, 22 Feb 1995 04:09:20 +0000 (+0000) Subject: Fixed so that internal declarations are not lost. X-Git-Tag: 20090517-FFI~6608 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=5de0018dd477e5deee689adb6e542779af76134d;p=mit-scheme.git Fixed so that internal declarations are not lost. --- diff --git a/v8/src/compiler/midend/inlate.scm b/v8/src/compiler/midend/inlate.scm index 306b8f5d2..61ef4a092 100644 --- a/v8/src/compiler/midend/inlate.scm +++ b/v8/src/compiler/midend/inlate.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: inlate.scm,v 1.2 1994/11/22 03:49:09 adams Exp $ +$Id: inlate.scm,v 1.3 1995/02/22 04:09:20 adams Exp $ Copyright (c) 1994 Massachusetts Institute of Technology @@ -57,13 +57,25 @@ MIT in each case. |# (inlate/remember (let ((form* (open-block-components form unscan-defines))) (if (sequence? form*) - (beginnify (lmap inlate/scode (sequence-actions form*))) + (beginnify + (inlate/map-declarations + (lmap inlate/scode (sequence-actions form*)))) (inlate/scode form*))) (new-dbg-expression/make form)))) (define (inlate/constant object) `(QUOTE ,(if (unassigned-reference-trap? object) %unassigned object))) +(define (inlate/map-declarations exprs) + (let loop ((exprs exprs)) + (cond ((null? exprs) '()) + ((and (QUOTE/? (car exprs)) + (block-declaration? (quote/text (car exprs)))) + (cons `(DECLARE ,@(block-declaration-text (quote/text (car exprs)))) + (loop (cdr exprs)))) + (else + (cons (car exprs) (loop (cdr exprs))))))) + (define-inlator VARIABLE (name) `(LOOKUP ,name))