[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 17/41: Remove frame->module
From: |
Andy Wingo |
Subject: |
[Guile-commits] 17/41: Remove frame->module |
Date: |
Wed, 02 Dec 2015 08:06:51 +0000 |
wingo pushed a commit to branch master
in repository guile.
commit a7e1c392c27481f1f8bda11bd8ceb0fde9f06c14
Author: Andy Wingo <address@hidden>
Date: Fri Nov 27 15:29:33 2015 +0100
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.
---
module/system/repl/debug.scm | 29 +----------------------------
1 files changed, 1 insertions(+), 28 deletions(-)
diff --git a/module/system/repl/debug.scm b/module/system/repl/debug.scm
index e148d44..18ac10f 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)))
- [Guile-commits] 06/41: Apply of non-programs has IP that is not from prev frame, (continued)
- [Guile-commits] 06/41: Apply of non-programs has IP that is not from prev frame, Andy Wingo, 2015/12/02
- [Guile-commits] 07/41: Remove primitive?, add primitive-code?, Andy Wingo, 2015/12/02
- [Guile-commits] 10/41: More robust low-level frame printer, Andy Wingo, 2015/12/02
- [Guile-commits] 05/41: All arities serialize a "closure" binding, Andy Wingo, 2015/12/02
- [Guile-commits] 12/41: ,registers doesn't use frame-procedure, Andy Wingo, 2015/12/02
- [Guile-commits] 11/41: Better frame-call-representation printing of GC clobbers, Andy Wingo, 2015/12/02
- [Guile-commits] 09/41: frame-call-representation avoids frame-procedure., Andy Wingo, 2015/12/02
- [Guile-commits] 15/41: Remove frame-procedure, Andy Wingo, 2015/12/02
- [Guile-commits] 13/41: Remove `procedure' repl command, Andy Wingo, 2015/12/02
- [Guile-commits] 14/41: VM traps don't match on value of slot 0, Andy Wingo, 2015/12/02
- [Guile-commits] 17/41: Remove frame->module,
Andy Wingo <=
- [Guile-commits] 19/41: Add bv-length instruction, Andy Wingo, 2015/12/02
- [Guile-commits] 18/41: Range inference over the full U64+S64 range, Andy Wingo, 2015/12/02
- [Guile-commits] 20/41: bv-f{32, 64}-{ref, set!} take unboxed u64 index, Andy Wingo, 2015/12/02
- [Guile-commits] 23/41: Beginning of u64 phi unboxing, Andy Wingo, 2015/12/02
- [Guile-commits] 16/41: Add low-level support for unboxed 64-bit unsigned ints, Andy Wingo, 2015/12/02
- [Guile-commits] 22/41: Specialize u64 comparisons, Andy Wingo, 2015/12/02
- [Guile-commits] 26/41: Slower range saturation in type inference, Andy Wingo, 2015/12/02
- [Guile-commits] 21/41: Add instructions to branch on u64 comparisons, Andy Wingo, 2015/12/02
- [Guile-commits] 25/41: Add unsigned 64-bit arithmetic operators: uadd, usub, umul, Andy Wingo, 2015/12/02
- [Guile-commits] 24/41: Unbox u64 phi values, Andy Wingo, 2015/12/02