master: Use a global list to hold disassembler instructions
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 03acc09c68b294905c4b14b6d38973d559f97f03 (commit)
from b89611cdd6142773ab814df391091c086c11a685 (commit)
- Log -----------------------------------------------------------------
commit 03acc09c68b294905c4b14b6d38973d559f97f03
Author: Douglas Katzman <[email protected]>
Date: Tue Apr 14 11:01:44 2026 -0400
Use a global list to hold disassembler instructions
---
src/compiler/target-disassem.lisp | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/compiler/target-disassem.lisp b/src/compiler/target-disassem.lisp
index cedda6816..d3c98fc94 100644
--- a/src/compiler/target-disassem.lisp
+++ b/src/compiler/target-disassem.lisp
@@ -1193,25 +1193,22 @@
(compute-prefilter args cache)
control))))))
+(define-load-time-global *instructions* nil)
(defun !compile-inst-printers ()
(let ((package sb-assem::*backend-instruction-set-package*)
(cache (list (list :printer) (list :prefilter) (list :labeller))))
(do-symbols (symbol package)
(awhen (get symbol 'instruction-flavors)
- (setf (get symbol 'instructions)
- (collect-inst-variants symbol package it cache))))
+ (push (collect-inst-variants symbol package it cache) *instructions*)))
(unless (sb-impl::!c-runtime-noinform-p)
(format t "~&Disassembler: ~{~D printers, ~D prefilters, ~D labelers~}~%"
(mapcar (lambda (x) (length (cdr x))) cache)))))
;;; Get the instruction-space, creating it if necessary.
-(defun get-inst-space (&key (package sb-assem::*backend-instruction-set-package*)
- force)
+(defun get-inst-space (&key force)
(let ((ispace *disassem-inst-space*))
(when (or force (null ispace))
- (let ((insts nil))
- (do-symbols (symbol package)
- (setq insts (nconc (copy-list (get symbol 'instructions)) insts)))
+ (let ((insts (reduce (lambda (a b) (append b a)) *instructions*)))
(setf ispace (sb-vm:without-arena "disassem" (build-inst-space insts))))
(setf *disassem-inst-space* ispace))
ispace))
-----------------------------------------------------------------------
hooks/post-receive
--
SBCL