#| -*-Scheme-*-
-$Id: asstop.scm,v 1.2 1994/11/26 19:14:49 adams Exp $
+$Id: asstop.scm,v 1.3 1995/07/16 22:28:06 adams Exp $
Copyright (c) 1988-1994 Massachusetts Institute of Technology
;;;; Dumping the assembler's symbol table to the debugging file...
(define (phase/info-generation-2 pathname)
- (info-generation-2 pathname set-compiled-code-block/debugging-info!))
+ (info-generation-2 pathname
+ set-compiled-code-block/debugging-info!
+ (compiled-code-block/constant-offset-map *code-vector*)))
-(define (info-generation-2 pathname set-debugging-info!)
+(define (info-generation-2 pathname set-debugging-info! constant-offset-map)
(compiler-phase "Debugging Information Generation"
(lambda ()
(set-debugging-info!
(last-reference *dbg-procedures*)
(last-reference *dbg-continuations*)
*label-bindings*
- (last-reference *external-labels*))))
+ (last-reference *external-labels*)
+ constant-offset-map)))
(cond ((eq? pathname 'KEEP) ; for dynamic execution
info)
((eq? pathname 'RECURSIVE) ; recursive compilation
(lambda (x y)
(< (vector-ref x 0)
(vector-ref y 0)))))
+
+(define (compiled-code-block/constant-offset-map block)
+ (let ((start (compiled-code-block/constants-start block))
+ (end (compiled-code-block/constants-end block))
+ (table (make-eq-hash-table)))
+ (let loop ((i start))
+ (if (< i end)
+ (begin
+ (hash-table/put! table (system-vector-ref block i) i)
+ (loop (+ i 1)))))
+ (lambda (constant)
+ (hash-table/get table constant #F))))
\f
;;; Various ways of dumping an info file
(loop (cdr files))))))))
(define compiler:dump-info-file
- compiler:dump-bci-file)
+ compiler:dump-bci/bcs-files)
\f
;;;; LAP->CODE
;;; Example of `lap->code' usage (MC68020):