1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

proper printing of thunks, reduced disasm verbosity

* module/system/vm/disasm.scm (disassemble-program): Don't print the
  nargs= nrest= etc line, it's redundant.

* module/system/vm/program.scm (program-bindings-as-lambda-list): If the
  program bindings is null, then that's that.
This commit is contained in:
Andy Wingo 2008-11-02 01:37:00 +01:00
parent 6c3686ea14
commit 2651e3c412
2 changed files with 1 additions and 3 deletions

View file

@ -59,8 +59,6 @@
(srcs (program-sources prog)))
;; Disassemble this bytecode
(format #t "Disassembly of ~A:\n\n" prog)
(format #t "nargs = ~A nrest = ~A nlocs = ~A nexts = ~A\n\n"
nargs nrest nlocs nexts)
(format #t "Bytecode:\n\n")
(disassemble-bytecode bytes objs nargs blocs bexts srcs)
(if (pair? exts)

View file

@ -86,7 +86,7 @@
(let ((bindings (program-bindings prog))
(nargs (arity:nargs (program-arity prog)))
(rest? (not (zero? (arity:nrest (program-arity prog))))))
(if (or (null? bindings) (not bindings))
(if (not bindings)
(if rest? (cons (1- nargs) 1) (list nargs))
(let ((args (map binding:name (list-head bindings nargs))))
(if rest?