#| -*-Scheme-*-
-$Id: infutl.scm,v 1.48 1993/11/09 04:31:38 cph Exp $
+$Id: infutl.scm,v 1.49 1993/11/18 00:47:13 cph Exp $
-Copyright (c) 1988-1993 Massachusetts Institute of Technology
+Copyright (c) 1988-93 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(else
false)))
-(define (read-binf-file filename)
- (let ((pathname (merge-pathnames filename)))
+(define (read-binf-file pathname)
+ (let ((pathname (canonicalize-debug-info-pathname pathname)))
(if (file-exists? pathname)
(fasload-loader (->namestring pathname))
(find-alternate-file-type pathname
(define (compiled-code-block/filename block)
(let loop ((info (compiled-code-block/debugging-info block)))
- (cond ((string? info) (values info false))
+ (cond ((string? info) (values (canonicalize-debug-info-filename info) #f))
((not (pair? info)) (values false false))
((dbg-info? (car info)) (loop (cdr info)))
((string? (car info))
- (values (car info)
+ (values (canonicalize-debug-info-filename (car info))
(and (exact-nonnegative-integer? (cdr info))
(cdr info))))
(else (values false false)))))
(define directory-rewriting-rules
'())
+(define (with-directory-rewriting-rule match replace thunk)
+ (fluid-let ((directory-rewriting-rules
+ (cons (cons (pathname-as-directory (merge-pathnames match))
+ replace)
+ directory-rewriting-rules)))
+ (thunk)))
+
(define (add-directory-rewriting-rule! match replace)
(let ((match (pathname-as-directory (merge-pathnames match))))
(let ((rule
(pathname-directory (car rule)))))))
(->namestring
(if rule
- (let ((replacement (cdr rule))
- (remaining-directories
- (list-tail (pathname-directory pathname)
- (length (pathname-directory (car rule))))))
- ;; Moby kludge: we are going to fool the pathname abstraction
- ;; into giving us a namestring that might contain uncanonicalized
- ;; characters in them. This will break if the pathname abstraction
- ;; cares at all.
- (pathname-new-device
- (pathname-new-directory
- pathname
- `(relative ,replacement ,@remaining-directories))
- false))
+ (merge-pathnames
+ (pathname-new-directory
+ pathname
+ (list-tail (pathname-directory pathname)
+ (length (pathname-directory (car rule)))))
+ (cdr rule))
pathname))))
(define (directory-prefix? x y)
(and (not (null? x))
(equal? (car x) (car y))
(loop (cdr x) (cdr y)))))))
+
+(define (canonicalize-debug-info-filename filename)
+ (->namestring (canonicalize-debug-info-pathname filename)))
+
+(define (canonicalize-debug-info-pathname pathname)
+ (if (pathname-absolute? pathname)
+ pathname
+ (merge-pathnames
+ pathname
+ (let ((value
+ (get-environment-variable "MITSCHEME_INF_DIRECTORY")))
+ (if value
+ (pathname-as-directory value)
+ (system-library-directory-pathname "SRC"))))))
\f
(define-integrable (dbg-block/layout-first-offset block)
(let ((layout (dbg-block/layout block)))
(define (read-bsm-file name)
(let ((pathname
- (let ((pathname (merge-pathnames (process-bsym-filename name))))
+ (let ((pathname
+ (canonicalize-debug-info-pathname
+ (rewrite-directory (merge-pathnames name)))))
(if (file-exists? pathname)
pathname
(let loop ((types '("bsm" "bcs")))
(if (equal? "bcs" (pathname-type pathname))
((compressed-loader "bsm") pathname)
(fasload-loader pathname)))))
-
-(define (process-bsym-filename name)
- (rewrite-directory (merge-pathnames name)))
-
\f
;;;; Splitting of info structures
#| -*-Scheme-*-
-$Id: make.scm,v 14.49 1993/09/19 22:38:02 adams Exp $
+$Id: make.scm,v 14.50 1993/11/18 00:47:19 cph Exp $
-Copyright (c) 1988-1993 Massachusetts Institute of Technology
+Copyright (c) 1988-93 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(let ((roots
(list->vector
- (let ((fasload/update-debugging-info!
- (access fasload/update-debugging-info!
- (->environment '(RUNTIME COMPILER-INFO))))
- (load/purification-root
- (access load/purification-root
- (->environment '(RUNTIME LOAD)))))
- (map (lambda (entry)
- (let ((object (cdr entry)))
- (fasload/update-debugging-info! object (car entry))
- (load/purification-root object)))
- fasload-purification-queue)))))
+ ((access with-directory-rewriting-rule
+ (->environment '(RUNTIME COMPILER-INFO)))
+ (working-directory-pathname)
+ (pathname-as-directory "runtime")
+ (lambda ()
+ (let ((fasload/update-debugging-info!
+ (access fasload/update-debugging-info!
+ (->environment '(RUNTIME COMPILER-INFO))))
+ (load/purification-root
+ (access load/purification-root
+ (->environment '(RUNTIME LOAD)))))
+ (map (lambda (entry)
+ (let ((object (cdr entry)))
+ (fasload/update-debugging-info! object (car entry))
+ (load/purification-root object)))
+ fasload-purification-queue)))))))
(set! (access gc-boot-loading? (->environment '(RUNTIME GARBAGE-COLLECTOR)))
false)
(set! fasload-purification-queue)
(package/add-child! system-global-package 'USER user-initial-environment)
(start-thread-timer)
-(initial-top-level-repl)
+(initial-top-level-repl)
\ No newline at end of file
#| -*-Scheme-*-
-$Id: site.scm.dos,v 1.12 1993/09/07 21:59:02 gjr Exp $
+$Id: site.scm.dos,v 1.13 1993/11/18 00:47:30 cph Exp $
-Copyright (c) 1992 Massachusetts Institute of Technology
+Copyright (c) 1992-93 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
;;;; Switzerland site specific stuff
(declare (usual-integrations))
-\f
+
;;; Local hacks
(define (call/cc . args)
(warn "call/cc: Invoking the C compiler:" args)
(warn "Segmentation fault (core dumped)"))
-;;; Normalization of various directory structures.
-
-(let ((add-directory-rewriting-rule!
- (access add-directory-rewriting-rule!
- (->environment '(runtime compiler-info)))))
- (for-each
- (lambda (path)
- (add-directory-rewriting-rule! path "$MITSCHEME_INF_DIRECTORY"))
- '("/scheme")))
-
(set-environment-variable-default! "MITSCHEME_INF_DIRECTORY" "\\scheme")
(set-environment-variable-default!
"TERM"
(lambda ()
(if (string-ci=? microcode-id/operating-system-name "NT")
"ansi.sys"
- "ibm_pc_bios")))
-
\ No newline at end of file
+ "ibm_pc_bios")))
\ No newline at end of file
#| -*-Scheme-*-
-$Id: site.scm.unix,v 1.13 1993/11/13 03:52:54 gjr Exp $
+$Id: site.scm.unix,v 1.14 1993/11/18 00:47:36 cph Exp $
Copyright (c) 1988-93 Massachusetts Institute of Technology
(lambda ()
(set! inside ((ucode-primitive working-directory-pathname 0)))
((ucode-primitive set-working-directory-pathname! 1) outside)
- (start-thread-timer)))))
-
-;;; Normalization of various directory structures.
-
-(let ((add-directory-rewriting-rule!
- (access add-directory-rewriting-rule!
- (->environment '(runtime compiler-info)))))
- (for-each
- (lambda (path)
- (add-directory-rewriting-rule! path "/usr/local/lib/mit-scheme/SRC"))
- '("/scheme/300"
- "/nfs/martigny/scheme/300"
- "/scheme/700"
- "/nfs/martigny/scheme/700"
- "/usr/local/scheme/nws3250"
- "/scheme/nws3250"
- "/nfs/martigny/scheme/nws3250")))
\ No newline at end of file
+ (start-thread-timer)))))
\ No newline at end of file
#| -*-Scheme-*-
-$Id: infutl.scm,v 1.48 1993/11/09 04:31:38 cph Exp $
+$Id: infutl.scm,v 1.49 1993/11/18 00:47:13 cph Exp $
-Copyright (c) 1988-1993 Massachusetts Institute of Technology
+Copyright (c) 1988-93 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(else
false)))
-(define (read-binf-file filename)
- (let ((pathname (merge-pathnames filename)))
+(define (read-binf-file pathname)
+ (let ((pathname (canonicalize-debug-info-pathname pathname)))
(if (file-exists? pathname)
(fasload-loader (->namestring pathname))
(find-alternate-file-type pathname
(define (compiled-code-block/filename block)
(let loop ((info (compiled-code-block/debugging-info block)))
- (cond ((string? info) (values info false))
+ (cond ((string? info) (values (canonicalize-debug-info-filename info) #f))
((not (pair? info)) (values false false))
((dbg-info? (car info)) (loop (cdr info)))
((string? (car info))
- (values (car info)
+ (values (canonicalize-debug-info-filename (car info))
(and (exact-nonnegative-integer? (cdr info))
(cdr info))))
(else (values false false)))))
(define directory-rewriting-rules
'())
+(define (with-directory-rewriting-rule match replace thunk)
+ (fluid-let ((directory-rewriting-rules
+ (cons (cons (pathname-as-directory (merge-pathnames match))
+ replace)
+ directory-rewriting-rules)))
+ (thunk)))
+
(define (add-directory-rewriting-rule! match replace)
(let ((match (pathname-as-directory (merge-pathnames match))))
(let ((rule
(pathname-directory (car rule)))))))
(->namestring
(if rule
- (let ((replacement (cdr rule))
- (remaining-directories
- (list-tail (pathname-directory pathname)
- (length (pathname-directory (car rule))))))
- ;; Moby kludge: we are going to fool the pathname abstraction
- ;; into giving us a namestring that might contain uncanonicalized
- ;; characters in them. This will break if the pathname abstraction
- ;; cares at all.
- (pathname-new-device
- (pathname-new-directory
- pathname
- `(relative ,replacement ,@remaining-directories))
- false))
+ (merge-pathnames
+ (pathname-new-directory
+ pathname
+ (list-tail (pathname-directory pathname)
+ (length (pathname-directory (car rule)))))
+ (cdr rule))
pathname))))
(define (directory-prefix? x y)
(and (not (null? x))
(equal? (car x) (car y))
(loop (cdr x) (cdr y)))))))
+
+(define (canonicalize-debug-info-filename filename)
+ (->namestring (canonicalize-debug-info-pathname filename)))
+
+(define (canonicalize-debug-info-pathname pathname)
+ (if (pathname-absolute? pathname)
+ pathname
+ (merge-pathnames
+ pathname
+ (let ((value
+ (get-environment-variable "MITSCHEME_INF_DIRECTORY")))
+ (if value
+ (pathname-as-directory value)
+ (system-library-directory-pathname "SRC"))))))
\f
(define-integrable (dbg-block/layout-first-offset block)
(let ((layout (dbg-block/layout block)))
(define (read-bsm-file name)
(let ((pathname
- (let ((pathname (merge-pathnames (process-bsym-filename name))))
+ (let ((pathname
+ (canonicalize-debug-info-pathname
+ (rewrite-directory (merge-pathnames name)))))
(if (file-exists? pathname)
pathname
(let loop ((types '("bsm" "bcs")))
(if (equal? "bcs" (pathname-type pathname))
((compressed-loader "bsm") pathname)
(fasload-loader pathname)))))
-
-(define (process-bsym-filename name)
- (rewrite-directory (merge-pathnames name)))
-
\f
;;;; Splitting of info structures
#| -*-Scheme-*-
-$Id: make.scm,v 14.49 1993/09/19 22:38:02 adams Exp $
+$Id: make.scm,v 14.50 1993/11/18 00:47:19 cph Exp $
-Copyright (c) 1988-1993 Massachusetts Institute of Technology
+Copyright (c) 1988-93 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(let ((roots
(list->vector
- (let ((fasload/update-debugging-info!
- (access fasload/update-debugging-info!
- (->environment '(RUNTIME COMPILER-INFO))))
- (load/purification-root
- (access load/purification-root
- (->environment '(RUNTIME LOAD)))))
- (map (lambda (entry)
- (let ((object (cdr entry)))
- (fasload/update-debugging-info! object (car entry))
- (load/purification-root object)))
- fasload-purification-queue)))))
+ ((access with-directory-rewriting-rule
+ (->environment '(RUNTIME COMPILER-INFO)))
+ (working-directory-pathname)
+ (pathname-as-directory "runtime")
+ (lambda ()
+ (let ((fasload/update-debugging-info!
+ (access fasload/update-debugging-info!
+ (->environment '(RUNTIME COMPILER-INFO))))
+ (load/purification-root
+ (access load/purification-root
+ (->environment '(RUNTIME LOAD)))))
+ (map (lambda (entry)
+ (let ((object (cdr entry)))
+ (fasload/update-debugging-info! object (car entry))
+ (load/purification-root object)))
+ fasload-purification-queue)))))))
(set! (access gc-boot-loading? (->environment '(RUNTIME GARBAGE-COLLECTOR)))
false)
(set! fasload-purification-queue)
(package/add-child! system-global-package 'USER user-initial-environment)
(start-thread-timer)
-(initial-top-level-repl)
+(initial-top-level-repl)
\ No newline at end of file