From 7e01042337e9637482790d60b1f467a740960655 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 25 Feb 2021 16:06:09 +0100 Subject: [PATCH] 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. --- module/system/vm/assembler.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/system/vm/assembler.scm b/module/system/vm/assembler.scm index e5d81525a..8139263a8 100644 --- a/module/system/vm/assembler.scm +++ b/module/system/vm/assembler.scm @@ -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))