From 30e8b62a755ea44f29e917a2c32cd0e30a122719 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 17 Sep 2008 03:36:54 +0000 Subject: [PATCH] Allow ADD-BOOT-INIT! to work after the cold load, by immediately executing the argument. --- v7/src/runtime/boot.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/v7/src/runtime/boot.scm b/v7/src/runtime/boot.scm index d9b82d456..1c73d3ffc 100644 --- a/v7/src/runtime/boot.scm +++ b/v7/src/runtime/boot.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: boot.scm,v 14.31 2008/08/31 07:27:00 cph Exp $ +$Id: boot.scm,v 14.32 2008/09/17 03:36:54 cph Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -149,12 +149,14 @@ USA. unspecific) (define (add-boot-init! thunk) - (set! boot-inits (cons thunk boot-inits)) + (if boot-inits + (set! boot-inits (cons thunk boot-inits)) + (thunk)) unspecific) (define (save-boot-inits! environment) (let ((inits (reverse! boot-inits))) - (set! boot-inits) + (set! boot-inits #f) ((ucode-primitive local-assignment) environment saved-boot-inits inits))) (define (run-boot-inits! environment) @@ -164,5 +166,5 @@ USA. (for-each (lambda (init) (init)) inits))) -(define boot-inits) +(define boot-inits #f) (define saved-boot-inits '|#[saved-boot-inits]|) \ No newline at end of file -- 2.25.1