proper printing of thunks, reduced disasm verbosity
authorAndy Wingo <wingo@pobox.com>
Sun, 2 Nov 2008 00:37:00 +0000 (01:37 +0100)
committerAndy Wingo <wingo@pobox.com>
Sun, 2 Nov 2008 00:37:00 +0000 (01:37 +0100)
* 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.

module/system/vm/disasm.scm
module/system/vm/program.scm

index efb8ae3..0987354 100644 (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)
index e78a308..b2ad299 100644 (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?