[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 07/12: assembler: Separate effectful part of 'link-docst
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] 07/12: assembler: Separate effectful part of 'link-docstrs'. |
Date: |
Tue, 17 Jan 2023 11:49:53 -0500 (EST) |
civodul pushed a commit to branch main
in repository guile.
commit d439a3f671da8880c14044d0b7cd106b9ebbc391
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Jan 6 17:06:47 2023 +0100
assembler: Separate effectful part of 'link-docstrs'.
* module/system/vm/assembler.scm (link-docstrs): Define
'write-docstrings!' and use it.
---
module/system/vm/assembler.scm | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/module/system/vm/assembler.scm b/module/system/vm/assembler.scm
index 872cc31c6..e82eb953a 100644
--- a/module/system/vm/assembler.scm
+++ b/module/system/vm/assembler.scm
@@ -2684,16 +2684,19 @@ procedure with label @var{rw-init}. @var{rw-init} may
be false. If
(docstrings (find-docstrings))
(strtab (make-string-table))
(bv (make-bytevector (* (length docstrings) docstr-size) 0)))
- (fold (lambda (pair pos)
- (match pair
- ((pc . string)
- (bytevector-u32-set! bv pos pc endianness)
- (bytevector-u32-set! bv (+ pos 4)
- (string-table-intern! strtab string)
- endianness)
- (+ pos docstr-size))))
- 0
- docstrings)
+ (define (write-docstrings! bv offset)
+ (fold (lambda (pair pos)
+ (match pair
+ ((pc . string)
+ (bytevector-u32-set! bv pos pc endianness)
+ (bytevector-u32-set! bv (+ pos 4)
+ (string-table-intern! strtab string)
+ endianness)
+ (+ pos docstr-size))))
+ offset
+ docstrings))
+
+ (write-docstrings! bv 0)
(let ((strtab (make-object asm '.guile.docstrs.strtab
(link-string-table! strtab)
'() '()
- [Guile-commits] branch main updated (e903b7679 -> 9a004606e), Ludovic Courtès, 2023/01/17
- [Guile-commits] 07/12: assembler: Separate effectful part of 'link-docstrs'.,
Ludovic Courtès <=
- [Guile-commits] 10/12: linker: Linker object writer takes a single argument., Ludovic Courtès, 2023/01/17
- [Guile-commits] 04/12: assembler: Separate effectful part of 'link-dynamic-section'., Ludovic Courtès, 2023/01/17
- [Guile-commits] 05/12: assembler: Separate effectful part of 'link-procprops'., Ludovic Courtès, 2023/01/17
- [Guile-commits] 08/12: linker: Separate effectful part of 'add-elf-objects'., Ludovic Courtès, 2023/01/17
- [Guile-commits] 09/12: linker, assembler: Avoid intermediate bytevectors., Ludovic Courtès, 2023/01/17
- [Guile-commits] 06/12: assembler: Separate effectful part of 'link-frame-maps'., Ludovic Courtès, 2023/01/17
- [Guile-commits] 03/12: assembler: Separate effectful part of 'link-symtab'., Ludovic Courtès, 2023/01/17
- [Guile-commits] 01/12: Add test for 'string-ref' with a negative index at -O2., Ludovic Courtès, 2023/01/17
- [Guile-commits] 02/12: assembler: Separate 'process-relocs' from 'patch-relocs!'., Ludovic Courtès, 2023/01/17
- [Guile-commits] 12/12: Update NEWS., Ludovic Courtès, 2023/01/17