master: Remove dump-segment, fold it into dump-code-object
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 737f78096654351c67897079b61b75c2749fc31e (commit)
from 78ef4a508188c9732ece8a2ad74d984e2e1aa43e (commit)
- Log -----------------------------------------------------------------
commit 737f78096654351c67897079b61b75c2749fc31e
Author: Douglas Katzman <[email protected]>
Date: Sun Apr 5 00:48:58 2026 -0400
Remove dump-segment, fold it into dump-code-object
---
src/compiler/dump.lisp | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/src/compiler/dump.lisp b/src/compiler/dump.lisp
index e0f0d2bdd..4d9b535f4 100644
--- a/src/compiler/dump.lisp
+++ b/src/compiler/dump.lisp
@@ -1061,18 +1061,6 @@
;;;; component (function) dumping
-(defun dump-segment (segment code-length fasl-output)
- (declare (type sb-assem:segment segment)
- (type fasl-output fasl-output))
- (let* ((stream (fasl-output-stream fasl-output))
- (n-written (write-segment-contents segment stream)))
- ;; In CMU CL there was no enforced connection between the CODE-LENGTH
- ;; argument and the number of bytes actually written. I added this
- ;; assertion while trying to debug portable genesis. -- WHN 19990902
- (unless (= code-length n-written)
- (bug "code-length=~W, n-written=~W" code-length n-written)))
- (values))
-
(eval-when (:compile-toplevel)
(assert (<= (length +fixup-kinds+) 16))) ; fixup-kind fits in 4 bits
@@ -1256,7 +1244,10 @@
(dump-integer-as-n-bytes (length (ir2-component-entries 2comp))
4 ; output 4 bytes
fasl-output)
- (dump-segment (asm-segment assembly) (length (asm-bytes assembly)) fasl-output)
+ (let ((n-written (write-segment-contents (asm-segment assembly)
+ (fasl-output-stream fasl-output)))
+ (length (length (asm-bytes assembly))))
+ (aver (= n-written length)))
(let ((handle (dump-pop fasl-output)))
(dolist (patch (patches))
-----------------------------------------------------------------------
hooks/post-receive
--
SBCL