|
[Sbcl-commits] master: genesis: Export assembly slot offsets for
primitive-objects without lowtags.
From: Alastair Bridgewater <lisphacker@us...> - 2011-10-26 01:17
|
The branch "master" has been updated in SBCL:
via ae9741f992d37df9b5b05ddf79260ae29e9ebab9 (commit)
from a743f02226d235f461a0bc5aeddcf63e8ac0dcf3 (commit)
- Log -----------------------------------------------------------------
commit ae9741f992d37df9b5b05ddf79260ae29e9ebab9
Author: Alastair Bridgewater <nyef@...>
Date: Tue Oct 25 18:35:03 2011 -0400
genesis: Export assembly slot offsets for primitive-objects without lowtags.
* If a primitive-object has no lowtag, export its slot offsets
to assembly language as if it had a lowtag of zero.
* While we're here, use SYMBOL-VALUE instead of EVAL to find the
numeric value of a lowtag.
---
src/compiler/generic/genesis.lisp | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/compiler/generic/genesis.lisp b/src/compiler/generic/genesis.lisp
index 9dd2264..3dc5fd6 100644
--- a/src/compiler/generic/genesis.lisp
+++ b/src/compiler/generic/genesis.lisp
@@ -2947,14 +2947,14 @@ core and return a descriptor to it."
(format t "/* These offsets are SLOT-OFFSET * N-WORD-BYTES - LOWTAG~%")
(format t " * so they work directly on tagged addresses. */~2%")
(let ((name (sb!vm:primitive-object-name obj))
- (lowtag (eval (sb!vm:primitive-object-lowtag obj))))
- (when lowtag
- (dolist (slot (sb!vm:primitive-object-slots obj))
- (format t "#define ~A_~A_OFFSET ~D~%"
- (c-symbol-name name)
- (c-symbol-name (sb!vm:slot-name slot))
- (- (* (sb!vm:slot-offset slot) sb!vm:n-word-bytes) lowtag)))
- (terpri)))
+ (lowtag (or (symbol-value (sb!vm:primitive-object-lowtag obj))
+ 0)))
+ (dolist (slot (sb!vm:primitive-object-slots obj))
+ (format t "#define ~A_~A_OFFSET ~D~%"
+ (c-symbol-name name)
+ (c-symbol-name (sb!vm:slot-name slot))
+ (- (* (sb!vm:slot-offset slot) sb!vm:n-word-bytes) lowtag)))
+ (terpri))
(format t "#endif /* LANGUAGE_ASSEMBLY */~2%"))
(defun write-structure-object (dd)
-----------------------------------------------------------------------
hooks/post-receive
--
SBCL
|
| Thread | Author | Date |
|---|---|---|
| [Sbcl-commits] master: genesis: Export assembly slot offsets for primitive-objects without lowtags. | Alastair Bridgewater <lisphacker@us...> |