0.8.0.49:
authorAlexey Dejneka <adejneka@comail.ru>
Sun, 8 Jun 2003 09:30:01 +0000 (09:30 +0000)
committerAlexey Dejneka <adejneka@comail.ru>
Sun, 8 Jun 2003 09:30:01 +0000 (09:30 +0000)
        Added support of disassembling of closures and funcallable
        instances.

NEWS
src/compiler/target-disassem.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 8db8676..e808be2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1822,6 +1822,7 @@ changes in sbcl-0.8.1 relative to sbcl-0.8.0:
        values of the arguments, even in the presence of assignment.
     ** functions [N]SUBST*, LAST, NRECONC, [N]SUBLIS may return any
        object.
+    ** DISASSEMBLE works with closures and funcallable instances.
 
 planned incompatible changes in 0.8.x:
   * (not done yet, but planned:) When the profiling interface settles
index 6e247fc..c9fdf0f 100644 (file)
   (declare (type compiled-function fun))
   (sb!kernel:%simple-fun-next fun))
 
-(defun fun-address (function)
-  (declare (type compiled-function function))
-  (- (sb!kernel:get-lisp-obj-address function) sb!vm:fun-pointer-lowtag))
+(defun fun-address (fun)
+  (declare (type compiled-function fun))
+  (ecase (sb!kernel:widetag-of fun)
+    (#.sb!vm:simple-fun-header-widetag
+     (- (sb!kernel:get-lisp-obj-address fun) sb!vm:fun-pointer-lowtag))
+    (#.sb!vm:closure-header-widetag
+     (fun-address (sb!kernel:%closure-fun fun)))
+    (#.sb!vm:funcallable-instance-header-widetag
+     (fun-address (sb!kernel:funcallable-instance-fun fun)))))
 
 ;;; the offset of FUNCTION from the start of its code-component's
 ;;; instruction area
index bdbafaa..c72f7ab 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.0.48"
+"0.8.0.49"