From 5de0018dd477e5deee689adb6e542779af76134d Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Wed, 22 Feb 1995 04:09:20 +0000 Subject: [PATCH] Fixed so that internal declarations are not lost. --- v8/src/compiler/midend/inlate.scm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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)) -- 2.25.1