mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
brown-paper-bag commit
* module/system/vm/debug.scm (frame->module): In which our author misunderstands git's index.
This commit is contained in:
parent
9a598c47f7
commit
615eb45521
1 changed files with 9 additions and 8 deletions
|
@ -147,18 +147,19 @@
|
||||||
(define (frame->module frame)
|
(define (frame->module frame)
|
||||||
(let ((proc (frame-procedure frame)))
|
(let ((proc (frame-procedure frame)))
|
||||||
(if (program? proc)
|
(if (program? proc)
|
||||||
(let* ((mod (or (program-module proc) (current-module )))
|
(let* ((mod (or (program-module proc) (current-module)))
|
||||||
(mod* (make-module)))
|
(mod* (make-module)))
|
||||||
(module-use! mod* mod)
|
(module-use! mod* mod)
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (binding)
|
(lambda (binding)
|
||||||
(module-add!
|
(let* ((x (frame-local-ref frame (binding:index binding)))
|
||||||
mod*
|
(var (if (binding:boxed? binding) x (make-variable x))))
|
||||||
(binding:name binding)
|
(format (debug-output-port)
|
||||||
(let ((x (frame-local-ref frame (binding:index binding))))
|
"~:[Read-only~;Mutable~] local variable ~a = ~70:@y\n"
|
||||||
(if (binding:boxed? binding)
|
(binding:boxed? binding)
|
||||||
x
|
(binding:name binding)
|
||||||
(make-variable x)))))
|
(if (variable-bound? var) (variable-ref var) var))
|
||||||
|
(module-add! mod* (binding:name binding) var)))
|
||||||
(frame-bindings frame))
|
(frame-bindings frame))
|
||||||
mod*)
|
mod*)
|
||||||
(current-module))))
|
(current-module))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue