#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/back/lapgn1.scm,v 4.12 1991/10/22 09:53:38 cph Exp $
+$Id: lapgn1.scm,v 4.13 1992/10/24 16:01:03 jinx Exp $
-Copyright (c) 1987-91 Massachusetts Institute of Technology
+Copyright (c) 1987-1992 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(constant->label (vector-ref remote-link 0)))
unspecific)
remote-links)
- (with-values
- (lambda ()
- (generate/constants-block *interned-constants*
- *interned-variables*
- *interned-assignments*
- *interned-uuo-links*
- *interned-global-links*
- *interned-static-variables*))
+ (with-values prepare-constants-block
(or process-constants-block
(lambda (constants-code environment-label free-ref-label
n-sections)
#| -*-Scheme-*-
-$Id: lapgn3.scm,v 4.10 1992/10/19 19:14:11 jinx Exp $
+$Id: lapgn3.scm,v 4.11 1992/10/24 16:01:10 jinx Exp $
Copyright (c) 1987-1992 Massachusetts Institute of Technology
(uuo-link-label (lambda () *interned-global-links*)
(lambda (new)
(set! *interned-global-links* new))
- "GLOBAL-"))
\ No newline at end of file
+ "GLOBAL-"))
+
+(define (prepare-constants-block)
+ (generate/constants-block *interned-constants*
+ *interned-variables*
+ *interned-assignments*
+ *interned-uuo-links*
+ *interned-global-links*
+ *interned-static-variables*))
\ No newline at end of file
#| -*-Scheme-*-
-$Id: asstop.scm,v 1.1 1992/10/19 19:11:52 jinx Exp $
+$Id: asstop.scm,v 1.2 1992/10/24 16:00:56 jinx Exp $
Copyright (c) 1988-1992 Massachusetts Institute of Technology
(define (compiled-scode->procedure scode environment)
(scode-eval scode environment))
-;;; State variables for the assembler and linker
+;;; Global variables for the assembler and linker
+
+(define *recursive-compilation-results*)
;; First set: phase/rtl-generation
;; Last used: phase/link
(lap:make-entry-point entry-label *block-label*))
,@some-lap))
\f
+(define (bind-assembler&linker-top-level-variables thunk)
+ (fluid-let ((*recursive-compilation-results* '()))
+ (thunk)))
+
(define (bind-assembler&linker-variables thunk)
(fluid-let ((*block-label*)
(*external-labels*)
(thunk)))
(define (assembler&linker-reset!)
+ (set! *recursive-compilation-results* '())
(set! *block-label*)
(set! *external-labels*)
(set! *end-of-block-code*)
#| -*-Scheme-*-
-$Id: toplev.scm,v 4.46 1992/10/19 19:13:30 jinx Exp $
+$Id: toplev.scm,v 4.47 1992/10/24 16:00:50 jinx Exp $
Copyright (c) 1988-1992 Massachusetts Institute of Technology
(define *recursive-compilation-count*)
(define *recursive-compilation-number*)
-(define *recursive-compilation-results*)
(define *procedure-result?*)
(define *remote-links*)
(define *process-time*)
(run-compiler))
(fluid-let ((*recursive-compilation-number* 0)
(*recursive-compilation-count* 1)
- (*recursive-compilation-results* '())
(*procedure-result?* false)
(*remote-links* '())
(*process-time* 0)
(*real-time* 0))
- (bind-compiler-variables run-compiler)))))
+ (bind-assembler&linker-top-level-variables
+ (lambda ()
+ (bind-compiler-variables run-compiler)))))))
\f
(define (bind-compiler-variables thunk)
;; Split this fluid-let because compiler was choking on it.
(define (compiler:reset!)
(set! *recursive-compilation-number* 0)
(set! *recursive-compilation-count* 1)
- (set! *recursive-compilation-results* '())
(set! *procedure-result?* false)
(set! *remote-links* '())
(set! *process-time* 0)