From: Guillermo J. Rozas Date: Sun, 10 May 1992 13:36:29 +0000 (+0000) Subject: Add Matt Birkholz's new fasdump, which has a restart. X-Git-Tag: 20090517-FFI~9426 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=409e84fc5ba177076ebff4ff1aef4bd44f88e7e6;p=mit-scheme.git Add Matt Birkholz's new fasdump, which has a restart. --- diff --git a/v7/src/runtime/global.scm b/v7/src/runtime/global.scm index bf85b7efb..7707e9435 100644 --- a/v7/src/runtime/global.scm +++ b/v7/src/runtime/global.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/global.scm,v 14.35 1992/02/08 15:08:26 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/global.scm,v 14.36 1992/05/10 13:36:29 jinx Exp $ Copyright (c) 1988-92 Massachusetts Institute of Technology @@ -238,12 +238,17 @@ MIT in each case. |# (define (fasdump object filename) (let ((filename (->namestring (merge-pathnames filename))) (port (nearest-cmdl/port))) - (fresh-line port) - (write-string ";Dumping " port) - (write (enough-namestring filename) port) - (if (not ((ucode-primitive primitive-fasdump) object filename false)) - (error "FASDUMP: Object is too large to be dumped:" object)) - (write-string " -- done" port))) + (let loop () + (fresh-line port) + (write-string ";Dumping " port) + (write (enough-namestring filename) port) + (if ((ucode-primitive primitive-fasdump) object filename false) + (write-string " -- done" port) + (begin + (with-simple-restart 'RETRY "Try again." + (lambda () + (error "FASDUMP: Object is too large to be dumped:" object))) + (loop)))))) (define (undefined-value? object) ;; Note: the unparser takes advantage of the fact that objects diff --git a/v8/src/runtime/global.scm b/v8/src/runtime/global.scm index 305713bf6..afc34fd71 100644 --- a/v8/src/runtime/global.scm +++ b/v8/src/runtime/global.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/global.scm,v 14.35 1992/02/08 15:08:26 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/global.scm,v 14.36 1992/05/10 13:36:29 jinx Exp $ Copyright (c) 1988-92 Massachusetts Institute of Technology @@ -238,12 +238,17 @@ MIT in each case. |# (define (fasdump object filename) (let ((filename (->namestring (merge-pathnames filename))) (port (nearest-cmdl/port))) - (fresh-line port) - (write-string ";Dumping " port) - (write (enough-namestring filename) port) - (if (not ((ucode-primitive primitive-fasdump) object filename false)) - (error "FASDUMP: Object is too large to be dumped:" object)) - (write-string " -- done" port))) + (let loop () + (fresh-line port) + (write-string ";Dumping " port) + (write (enough-namestring filename) port) + (if ((ucode-primitive primitive-fasdump) object filename false) + (write-string " -- done" port) + (begin + (with-simple-restart 'RETRY "Try again." + (lambda () + (error "FASDUMP: Object is too large to be dumped:" object))) + (loop)))))) (define (undefined-value? object) ;; Note: the unparser takes advantage of the fact that objects