master: Delete alien-linkage-value macro
snuglas via Sbcl-commits <[email protected]>
| Newsgroups | gmane.lisp.steel-bank.cvs |
|---|---|
| Message-ID | <[email protected]> |
The branch "master" has been updated in SBCL:
via db01e571c0470fe2eb6f8e64060373f07ddb1cc5 (commit)
from 473201d8fd0cec719fd7f0e1f2713d23b59ccbd3 (commit)
- Log -----------------------------------------------------------------
commit db01e571c0470fe2eb6f8e64060373f07ddb1cc5
Author: Douglas Katzman <[email protected]>
Date: Tue Apr 14 15:00:18 2026 -0400
Delete alien-linkage-value macro
---
src/code/foreign.lisp | 1 -
src/compiler/generic/core.lisp | 16 +++++-----------
2 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/src/code/foreign.lisp b/src/code/foreign.lisp
index cd9afafb2..18de4081c 100644
--- a/src/code/foreign.lisp
+++ b/src/code/foreign.lisp
@@ -130,7 +130,6 @@ Returns a secondary value T for historical reasons.
The returned address is always a linkage-table address.
Symbols are entered into the linkage-table if they aren't there already."
- (declare (ignorable datap))
(let ((index (ensure-alien-linkage-index name datap)))
(values (sb-vm::alien-linkage-index-to-addr index datap) t)))
diff --git a/src/compiler/generic/core.lisp b/src/compiler/generic/core.lisp
index 0619bb93f..1c41a4e26 100644
--- a/src/compiler/generic/core.lisp
+++ b/src/compiler/generic/core.lisp
@@ -48,15 +48,6 @@
#-(or arm64 ppc64 x86 x86-64) fun))
(setf (sb-vm::%simple-fun-self fun) self)))
-(defmacro alien-linkage-value (name datap)
- ;; x86-64 foreign fixups pass the machine-dependent code patcher an index into the
- ;; alien linkage table. The index increases by 1 (not LINKAGE-ENTRY-SIZE) per entry.
- ;; This is important if the entry address does not increment linearly with the index.
- ;; See comment above FOREIGN-SYMBOL-SAP in src/compiler/x86-64 for why it may be best
- ;; to arrange all the indirect words adjacent, followed by all the JMP instructions.
- ;; All other architectures expect to receive an address inside the alien linkage table.
- `(#+x86-64 sb-impl::ensure-alien-linkage-index #-x86-64 foreign-symbol-address ,name ,datap))
-
(flet ((fixup (code-obj offset name kind flavor-id real-code-obj callees
&aux (flavor (aref +fixup-flavors+ flavor-id)))
;; NAME depends on the kind and flavor of fixup.
@@ -74,8 +65,11 @@
(error "Unknown asm routine ~S" name)))))
(sap-int (sap+ (code-instructions asm-code)
(aref *asm-routine-offsets* index)))))
- (:foreign (alien-linkage-value name nil))
- (:foreign-dataref (alien-linkage-value name t))
+ ((:foreign :foreign-dataref)
+ (let* ((datap (eq flavor-id #.(encoded-fixup-flavor :foreign-dataref)))
+ (index (sb-impl::ensure-alien-linkage-index name datap)))
+ #-x86-64 (sb-vm::alien-linkage-index-to-addr index datap)
+ #+x86-64 index))
#+linkage-space
(:linkage-cell
(let* ((warn #+x86-64 (= (sap-ref-32 (code-instructions code-obj) offset) 1))
-----------------------------------------------------------------------
hooks/post-receive
--
SBCL