master: Fix mark-region with permgen
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 d62ed2476fb4a4f7ed6966426f1608354410d11c (commit)
from 7376db7c79d4cbb7b4dafe8cab2fb80ce09a9c00 (commit)
- Log -----------------------------------------------------------------
commit d62ed2476fb4a4f7ed6966426f1608354410d11c
Author: Douglas Katzman <[email protected]>
Date: Tue Apr 7 10:07:44 2026 -0400
Fix mark-region with permgen
The old way avoided the barrier for non-pointer stores, and so could this
by testing is-lisp-pointer first, but there's really no need.
---
src/code/target-defstruct.lisp | 1 +
src/compiler/x86-64/macros.lisp | 7 -------
src/compiler/x86-64/system.lisp | 8 ++++++++
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/code/target-defstruct.lisp b/src/code/target-defstruct.lisp
index c72f568d5..6130d606c 100644
--- a/src/code/target-defstruct.lisp
+++ b/src/code/target-defstruct.lisp
@@ -15,6 +15,7 @@
(export '(%layout-slot-set %layout-slot-cas))
(defun %layout-slot-set (layout index value)
+ #+permgen (%primitive sb-vm::gc-remember-layout layout)
#-immobile-space (%instance-set layout index value)
#+immobile-space
(sb-vm::with-pseudo-atomic-foreign-calls
diff --git a/src/compiler/x86-64/macros.lisp b/src/compiler/x86-64/macros.lisp
index 8a98d957d..ea75504aa 100644
--- a/src/compiler/x86-64/macros.lisp
+++ b/src/compiler/x86-64/macros.lisp
@@ -459,13 +459,6 @@
(:info barrier)
(:temporary (:sc unsigned-reg) val-temp)))
(:generator 4
- #+permgen
- ,@(when (string= name 'instance-index-set)
- `((when (and (eq (tn-ref-type obj-ref) (specifier-type 'layout))
- ;; since ANY-REG is non-pointer, OBJECT doesn't need remembering
- (not (sc-is value any-reg)))
- (inst push object)
- (invoke-asm-routine 'call 'gc-remember-layout vop))))
,@(when (eq translate 'sb-bignum:%bignum-set)
'((bignum-index-check object index 0 vop)))
(let ((ea (if (sc-is index immediate)
diff --git a/src/compiler/x86-64/system.lisp b/src/compiler/x86-64/system.lisp
index 6754dcf55..97c3fa3f8 100644
--- a/src/compiler/x86-64/system.lisp
+++ b/src/compiler/x86-64/system.lisp
@@ -551,3 +551,11 @@ number of CPU cycles elapsed as secondary value. EXPERIMENTAL."
(inst mov :byte new 1)
(zeroize old)
(inst cmpxchg :lock :byte (mutex-slot m state) new)))
+
+#+(and permgen sb-xc-host)
+(define-vop (gc-remember-layout)
+ (:args (obj :scs (descriptor-reg)))
+ (:vop-var vop)
+ (:generator 1
+ (inst push obj)
+ (invoke-asm-routine 'call 'gc-remember-layout vop)))
-----------------------------------------------------------------------
hooks/post-receive
--
SBCL