mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 12:20:26 +02:00
assembler: Separate effectful part of 'link-docstrs'.
* module/system/vm/assembler.scm (link-docstrs): Define 'write-docstrings!' and use it.
This commit is contained in:
parent
13e2d5b66b
commit
d439a3f671
1 changed files with 13 additions and 10 deletions
|
@ -2684,6 +2684,7 @@ procedure with label @var{rw-init}. @var{rw-init} may be false. If
|
||||||
(docstrings (find-docstrings))
|
(docstrings (find-docstrings))
|
||||||
(strtab (make-string-table))
|
(strtab (make-string-table))
|
||||||
(bv (make-bytevector (* (length docstrings) docstr-size) 0)))
|
(bv (make-bytevector (* (length docstrings) docstr-size) 0)))
|
||||||
|
(define (write-docstrings! bv offset)
|
||||||
(fold (lambda (pair pos)
|
(fold (lambda (pair pos)
|
||||||
(match pair
|
(match pair
|
||||||
((pc . string)
|
((pc . string)
|
||||||
|
@ -2692,8 +2693,10 @@ procedure with label @var{rw-init}. @var{rw-init} may be false. If
|
||||||
(string-table-intern! strtab string)
|
(string-table-intern! strtab string)
|
||||||
endianness)
|
endianness)
|
||||||
(+ pos docstr-size))))
|
(+ pos docstr-size))))
|
||||||
0
|
offset
|
||||||
docstrings)
|
docstrings))
|
||||||
|
|
||||||
|
(write-docstrings! bv 0)
|
||||||
(let ((strtab (make-object asm '.guile.docstrs.strtab
|
(let ((strtab (make-object asm '.guile.docstrs.strtab
|
||||||
(link-string-table! strtab)
|
(link-string-table! strtab)
|
||||||
'() '()
|
'() '()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue