bug-mit-scheme
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-mit-scheme] The loader doesn't like the C backend?


From: Taylor R Campbell
Subject: Re: [Bug-mit-scheme] The loader doesn't like the C backend?
Date: Sun, 28 Jun 2009 16:11:12 -0400
User-agent: IMAIL/1.21; Edwin/3.116; MIT-Scheme/7.7.90.+

Unfortunately, this is somewhat hard to fix.  The microcode doesn't
have any way to reload object files with the same name, and even if it
were changed to accept that, it wouldn't GC the compiled blocks of the
old object file.  Gambit works around part of this by generating new
names, foo.o1, foo.o2, &c., and just loading the file whose name has
the highest number.  I don't know whether Gambit ever GCs old blocks,
though.

I think you could change the order of operations in TRY-OBJECT-FILE of
runtime/load.scm, and change `if (block == 0)' to `if (true)' in
declare_compiled_code_ns_1 of microcode/cmpauxmd/c.c, in order to
force Scheme always to load an object file if it is available, but I
haven't tried this, and you probably have faster machines handy than I
do to build Scheme with the C back end.

(define (try-object-file pathname)
  (if (object-file? pathname)
      (lambda ()
        (values pathname
                (lambda () (fasload-object-file pathname))
                (loading-notifier pathname)))
      (let ((object (built-in-object-file pathname)))
        (and object
             (lambda ()
               (values pathname
                       (lambda () object)
                       (init-notifier pathname)))))))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]