1.0.41.25: compiler: Create sb!vm::static-fdefn-offset.
authorAlastair Bridgewater <lisphacker@users.sourceforge.net>
Sat, 7 Aug 2010 15:19:51 +0000 (15:19 +0000)
committerAlastair Bridgewater <lisphacker@users.sourceforge.net>
Sat, 7 Aug 2010 15:19:51 +0000 (15:19 +0000)
  * Create sb!vm::static-fdefn-offset to provide the byte offset
from NIL to the tagged form of the fdefinition.

  * Reimplement sb!vm:static-fun-offset (a misnomer) in terms of
sb!vm::static-fdefn-offset.

src/compiler/generic/utils.lisp
version.lisp-expr

index 7b433a2..3625f66 100644 (file)
@@ -59,7 +59,7 @@
 
 ;;; Return the (byte) offset from NIL to the start of the fdefn object
 ;;; for the static function NAME.
-(defun static-fun-offset (name)
+(defun static-fdefn-offset (name)
   (let ((static-syms (length *static-symbols*))
         (static-fun-index (position name *static-funs*)))
     (unless static-fun-index
        (pad-data-block (1- symbol-size))
        (- list-pointer-lowtag)
        (* static-fun-index (pad-data-block fdefn-size))
-       (* fdefn-raw-addr-slot n-word-bytes))))
+       other-pointer-lowtag)))
+
+;;; Return the (byte) offset from NIL to the raw-addr slot of the
+;;; fdefn object for the static function NAME.
+(defun static-fun-offset (name)
+  (+ (static-fdefn-offset name)
+     (- other-pointer-lowtag)
+     (* fdefn-raw-addr-slot n-word-bytes)))
 \f
 ;;; Various error-code generating helpers
 (defvar *adjustable-vectors* nil)
index 3064229..88839c1 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".)
-"1.0.41.24"
+"1.0.41.25"