diff options
Diffstat (limited to 'module/system/vm')
-rw-r--r-- | module/system/vm/assembler.scm | 50 |
1 files changed, 18 insertions, 32 deletions
diff --git a/module/system/vm/assembler.scm b/module/system/vm/assembler.scm index a1d748df7..d92399b26 100644 --- a/module/system/vm/assembler.scm +++ b/module/system/vm/assembler.scm @@ -118,7 +118,6 @@ emit-vector? emit-mutable-vector? emit-immutable-vector? - emit-weak-vector? emit-string? emit-heap-number? emit-hash-table? @@ -133,8 +132,6 @@ emit-vm-continuation? emit-bytevector? emit-thread? - emit-weak-set? - emit-weak-table? emit-array? emit-bitvector? emit-ephemeron? @@ -583,7 +580,7 @@ N-byte unit." ;; A list of (pos . source) pairs, indicating source information. POS ;; is relative to the beginning of the text section, and SOURCE is in - ;; the same format that source-properties returns. + ;; the same format that syntax-source returns. ;; (sources asm-sources set-asm-sources!) @@ -1302,7 +1299,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-sourcev obj))) + (patch! 4 (syntax-source obj))) ((stringbuf? obj)) ((static-procedure? obj) ;; Special case, as we can't load the procedure's code using @@ -1863,7 +1860,6 @@ should be .data or .rodata), and return the resulting linker object. (define stringbuf-wide-flag #x400) (define tc7-syntax #x3d) - (define syntax-has-source-flag #x100) (define tc7-program #x45) @@ -2012,11 +2008,10 @@ should be .data or .rodata), and return the resulting linker object. (write-placeholder asm buf pos)) ((syntax? obj) - (let ((tag (logior tc7-syntax syntax-has-source-flag))) - (case word-size - ((4) (bytevector-u32-set! buf pos tag endianness)) - ((8) (bytevector-u64-set! buf pos tag endianness)) - (else (error "bad word size")))) + (case word-size + ((4) (bytevector-u32-set! buf pos tc7-syntax endianness)) + ((8) (bytevector-u64-set! buf pos tc7-syntax endianness)) + (else (error "bad word size"))) (write-constant-reference buf (+ pos (* 1 word-size)) (syntax-expression obj)) (write-constant-reference buf (+ pos (* 2 word-size)) @@ -2024,7 +2019,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-sourcev obj))) + (syntax-source obj))) ((number? obj) (write-placeholder asm buf pos)) @@ -2901,26 +2896,17 @@ procedure with label @var{rw-init}. @var{rw-init} may be false. If (let lp ((sources (asm-sources asm)) (out '())) (match sources - (((pc . location) . sources) - (let-values (((file line col) - ;; Usually CPS records contain a "source - ;; vector" coming from tree-il, but some might - ;; contain a source property alist. - (match location - (#(file line col) (values file line col)) - (lst (values (assq-ref lst 'filename) - (assq-ref lst 'line) - (assq-ref lst 'column)))))) - (lp sources - ;; Guile line and column numbers are 0-indexed, but - ;; they are 1-indexed for DWARF. - (if (and line col) - (cons (list pc - (if (string? file) (intern-file file) 0) - (1+ line) - (1+ col)) - out) - out)))) + (((pc . #(file line col)) . sources) + (lp sources + ;; Guile line and column numbers are 0-indexed, but + ;; they are 1-indexed for DWARF. + (if (and line col) + (cons (list pc + (if (string? file) (intern-file file) 0) + (1+ line) + (1+ col)) + out) + out))) (() ;; Compilation unit header for .debug_line. We write in ;; DWARF 2 format because more tools understand it than DWARF |