#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/gc.scm,v 14.2 1989/03/29 02:45:39 jinx Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/gc.scm,v 14.3 1989/08/11 02:59:14 cph Exp $
Copyright (c) 1988, 1989 Massachusetts Institute of Technology
(pure-space?
(with-absolutely-no-interrupts
(lambda ()
- (set! pure-space-queue (cons item pure-space-queue)))))
+ (set! pure-space-queue (cons item pure-space-queue))
+ unspecific)))
(else
(with-absolutely-no-interrupts
(lambda ()
- (set! constant-space-queue
- (cons item constant-space-queue))))))))
+ (set! constant-space-queue (cons item constant-space-queue))
+ unspecific))))))
(define (default/stack-overflow)
(abort "maximum recursion depth exceeded"))
(hook/gc-flip (if (default-object? safety-margin)
default-safety-margin
safety-margin)))))
+
+(define (flush-purification-queue!)
+ (if (or (not (null? pure-space-queue))
+ (not (null? constant-space-queue)))
+ (begin
+ (gc-flip)
+ (flush-purification-queue!))))
+
(define (purify item #!optional pure-space? queue?)
;; Purify an item -- move it into pure space and clean everything by
;; doing a gc-flip.
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/make.scm,v 14.15 1989/08/07 07:36:42 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/make.scm,v 14.16 1989/08/11 02:59:18 cph Exp $
Copyright (c) 1988, 1989 Massachusetts Institute of Technology
(define (implemented-primitive-procedure? primitive)
(get-primitive-address (intern (get-primitive-name (object-datum primitive)))
- false))
+ #f))
(define map-filename
(if (implemented-primitive-procedure? file-exists?)
\f
;; Construct the package structure.
;; Lotta hair here to load the package code before its package is built.
-(eval (cold-load/purify (fasload (map-filename "packag") true))
+(eval (cold-load/purify (fasload (map-filename "packag") #t))
environment-for-package)
((access initialize-package! environment-for-package))
(let loop ((names
(car names))
(loop (cdr names)))))
(package/add-child! system-global-package 'PACKAGE environment-for-package)
-(eval (fasload "runtim.bcon" false)
- ;; (cold-load/purify (fasload "runtim.bcon" false))
+(eval (fasload "runtim.bcon" #f)
+ ;; (cold-load/purify (fasload "runtim.bcon" #f))
system-global-environment)
;; Global databases. Load, then initialize.
(if (not (null? files))
(begin
(eval (cold-load/purify
- (fasload (map-filename (car (car files))) true))
+ (fasload (map-filename (car (car files))) #t))
(package-reference (cdr (car files))))
(loop (cdr files)))))
(package-initialize '(RUNTIME GC-DAEMONS) 'INITIALIZE-PACKAGE!)
constant-space/base)
;; Load everything else.
-((eval (fasload "runtim.bldr" false) system-global-environment)
+((eval (fasload "runtim.bldr" #f) system-global-environment)
(lambda (filename environment)
(if (not (or (string=? filename "packag")
(string=? filename "gcdemn")
(string=? filename "boot")
(string=? filename "queue")
(string=? filename "gc")))
- (eval (purify (fasload (map-filename filename) true)) environment)))
+ (eval (purify (fasload (map-filename filename) #t)) environment)))
`((SORT-TYPE . MERGE-SORT)
(OS-TYPE . ,(intern os-name-string))
(OPTIONS . NO-LOAD)))
\f
(let ((filename (map-filename "site")))
(if (file-exists? filename)
- (eval (purify (fasload filename true)) system-global-environment)))
+ (eval (purify (fasload filename #t)) system-global-environment)))
(let ((fasload/update-debugging-info!
(access fasload/update-debugging-info!
)
-(package/add-child! system-global-package 'USER user-initial-environment)(initial-top-level-repl)
\ No newline at end of file
+(package/add-child! system-global-package 'USER user-initial-environment)(flush-purification-queue!)(initial-top-level-repl)
\ No newline at end of file
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/packag.scm,v 14.8 1989/08/07 07:36:45 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/packag.scm,v 14.9 1989/08/11 02:59:22 cph Rel $
Copyright (c) 1988, 1989 Massachusetts Institute of Technology
(lambda (filename environment)
(load filename environment syntax-table true))
options))))))
- unspecific)
+ ;; Make sure that everything we just loaded is purified. If the
+ ;; program runs before it gets purified, some of its run-time state
+ ;; can end up being purified also.
+ (flush-purification-queue!))
+
(define-integrable (package/reference package name)
(lexical-reference (package/environment package) name))
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.46 1989/08/10 08:18:17 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.47 1989/08/11 02:59:26 cph Exp $
Copyright (c) 1988, 1989 Massachusetts Institute of Technology
(files "gc")
(parent ())
(export ()
- constant-space/in-use gc-flip
+ constant-space/in-use
+ flush-purification-queue!
+ gc-flip
purify
set-gc-safety-margin!)
(export (runtime gc-statistics)
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.51 1989/08/10 08:18:40 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.52 1989/08/11 02:59:31 cph Exp $
Copyright (c) 1988, 1989 Massachusetts Institute of Technology
'()))
(add-system! microcode-system)
(add-event-receiver! event:after-restore snarf-microcode-version!)
- (add-identification! "Runtime" 14 51))
+ (add-identification! "Runtime" 14 52))
(define microcode-system)
(define (snarf-microcode-version!)
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/make.scm,v 14.15 1989/08/07 07:36:42 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/make.scm,v 14.16 1989/08/11 02:59:18 cph Exp $
Copyright (c) 1988, 1989 Massachusetts Institute of Technology
(define (implemented-primitive-procedure? primitive)
(get-primitive-address (intern (get-primitive-name (object-datum primitive)))
- false))
+ #f))
(define map-filename
(if (implemented-primitive-procedure? file-exists?)
\f
;; Construct the package structure.
;; Lotta hair here to load the package code before its package is built.
-(eval (cold-load/purify (fasload (map-filename "packag") true))
+(eval (cold-load/purify (fasload (map-filename "packag") #t))
environment-for-package)
((access initialize-package! environment-for-package))
(let loop ((names
(car names))
(loop (cdr names)))))
(package/add-child! system-global-package 'PACKAGE environment-for-package)
-(eval (fasload "runtim.bcon" false)
- ;; (cold-load/purify (fasload "runtim.bcon" false))
+(eval (fasload "runtim.bcon" #f)
+ ;; (cold-load/purify (fasload "runtim.bcon" #f))
system-global-environment)
;; Global databases. Load, then initialize.
(if (not (null? files))
(begin
(eval (cold-load/purify
- (fasload (map-filename (car (car files))) true))
+ (fasload (map-filename (car (car files))) #t))
(package-reference (cdr (car files))))
(loop (cdr files)))))
(package-initialize '(RUNTIME GC-DAEMONS) 'INITIALIZE-PACKAGE!)
constant-space/base)
;; Load everything else.
-((eval (fasload "runtim.bldr" false) system-global-environment)
+((eval (fasload "runtim.bldr" #f) system-global-environment)
(lambda (filename environment)
(if (not (or (string=? filename "packag")
(string=? filename "gcdemn")
(string=? filename "boot")
(string=? filename "queue")
(string=? filename "gc")))
- (eval (purify (fasload (map-filename filename) true)) environment)))
+ (eval (purify (fasload (map-filename filename) #t)) environment)))
`((SORT-TYPE . MERGE-SORT)
(OS-TYPE . ,(intern os-name-string))
(OPTIONS . NO-LOAD)))
\f
(let ((filename (map-filename "site")))
(if (file-exists? filename)
- (eval (purify (fasload filename true)) system-global-environment)))
+ (eval (purify (fasload filename #t)) system-global-environment)))
(let ((fasload/update-debugging-info!
(access fasload/update-debugging-info!
)
-(package/add-child! system-global-package 'USER user-initial-environment)(initial-top-level-repl)
\ No newline at end of file
+(package/add-child! system-global-package 'USER user-initial-environment)(flush-purification-queue!)(initial-top-level-repl)
\ No newline at end of file
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.46 1989/08/10 08:18:17 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.47 1989/08/11 02:59:26 cph Exp $
Copyright (c) 1988, 1989 Massachusetts Institute of Technology
(files "gc")
(parent ())
(export ()
- constant-space/in-use gc-flip
+ constant-space/in-use
+ flush-purification-queue!
+ gc-flip
purify
set-gc-safety-margin!)
(export (runtime gc-statistics)