1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-30 06:50:31 +02:00

Assembler writes vector source properties

* module/system/vm/assembler.scm (intern-constant, link-data): Write the
vector representation of source instead of the alist.  Saves a lot of
heap size, object file size, and init time when serializing syntax
objects with source.
This commit is contained in:
Andy Wingo 2021-02-25 16:06:09 +01:00
parent 07f63cf4f3
commit 7e01042337

View file

@ -1292,7 +1292,7 @@ table, its existing label is used directly."
(patch! 1 (syntax-expression obj))
(patch! 2 (syntax-wrap obj))
(patch! 3 (syntax-module obj))
(patch! 4 (syntax-source obj)))
(patch! 4 (syntax-sourcev obj)))
((stringbuf? obj))
((static-procedure? obj)
;; Special case, as we can't load the procedure's code using
@ -1986,7 +1986,7 @@ should be .data or .rodata), and return the resulting linker object.
(write-constant-reference buf (+ pos (* 3 word-size))
(syntax-module obj))
(write-constant-reference buf (+ pos (* 4 word-size))
(syntax-source obj)))
(syntax-sourcev obj)))
((number? obj)
(write-placeholder asm buf pos))