Disassemble: print the function size in bytes.
authorStas Boukarev <stassats@gmail.com>
Fri, 12 Apr 2013 15:27:50 +0000 (19:27 +0400)
committerStas Boukarev <stassats@gmail.com>
Fri, 12 Apr 2013 15:27:50 +0000 (19:27 +0400)
Print "; Size: 981 bytes" at the beginning of DISASSEMBLE output.

src/compiler/target-disassem.lisp

index b1f09cc..5473481 100644 (file)
            (type stream stream)
            (type disassem-state dstate))
   (unless (null segments)
+    (format t "~&; Size: ~a bytes"
+            (reduce #'+ segments :key #'seg-length))
     (let ((first (car segments))
           (last (car (last segments))))
       (set-location-printing-range dstate
-                                  (seg-virtual-location first)
-                                  (- (+ (seg-virtual-location last)
-                                        (seg-length last))
-                                     (seg-virtual-location first)))
+                                   (seg-virtual-location first)
+                                   (- (+ (seg-virtual-location last)
+                                         (seg-length last))
+                                      (seg-virtual-location first)))
       (setf (dstate-output-state dstate) :beginning)
       (dolist (seg segments)
         (disassemble-segment seg stream dstate)))))