summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2015-11-27 15:29:33 +0100
committerAndy Wingo <wingo@pobox.com>2015-12-01 11:30:54 +0100
commita7e1c392c27481f1f8bda11bd8ceb0fde9f06c14 (patch)
tree676da4c8d8ca5afe8cf1220c6e3e422710faf54a
parentdfbe869e2421e6db03fd14c6fbfc0838e5e1988b (diff)
downloadguile-a7e1c392c27481f1f8bda11bd8ceb0fde9f06c14.tar.gz
Remove frame->module
* module/system/repl/debug.scm (frame->module): Remove. Has been broken for a while, had no callers, and was calling frame-procedure. We can revive again in a better way, like ice-9 local-eval.
-rw-r--r--module/system/repl/debug.scm29
1 files changed, 1 insertions, 28 deletions
diff --git a/module/system/repl/debug.scm b/module/system/repl/debug.scm
index e148d444f..18ac10f5b 100644
--- a/module/system/repl/debug.scm
+++ b/module/system/repl/debug.scm
@@ -34,7 +34,7 @@
make-debug debug?
debug-frames debug-index debug-error-message
terminal-width
- print-registers print-locals print-frame print-frames frame->module
+ print-registers print-locals print-frame print-frames
stack->vector narrow-stack->vector
frame->stack-vector))
@@ -164,33 +164,6 @@
(lp (+ i inc)
(frame-source frame)))))))
-;; Ideally here we would have something much more syntactic, in that a set! to a
-;; local var that is not settable would raise an error, and export etc forms
-;; would modify the module in question: but alack, this is what we have now.
-;; Patches welcome!
-(define (frame->module frame)
- (let ((proc (frame-procedure frame)))
- (if #f
- ;; FIXME: program-module does not exist.
- (let* ((mod (or (program-module proc) (current-module)))
- (mod* (make-module)))
- (module-use! mod* mod)
- (for-each
- (lambda (binding)
- (let* ((x (frame-local-ref frame (binding-slot binding)
- (binding-representation binding)))
- (var (if (variable? x) x (make-variable x))))
- (format #t
- "~:[Read-only~;Mutable~] local variable ~a = ~70:@y\n"
- (not (variable? x))
- (binding-name binding)
- (if (variable-bound? var) (variable-ref var) var))
- (module-add! mod* (binding-name binding) var)))
- (frame-bindings frame))
- mod*)
- (current-module))))
-
-
(define (stack->vector stack)
(let* ((len (stack-length stack))
(v (make-vector len)))