1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 09:10:22 +02:00

Remove backend support for cached-module-box et al.

* module/language/cps/compile-bytecode.scm (compile-function): Remove
  unused assemblers for cached-module-box, cached-toplevel-box, and
  cache-current-module!.
* module/language/cps/effects-analysis.scm (&cache): New memory kind.
  (cache-current-module!): Set &cache memory, not &box.
  (resolve-module, lookup-module, cache-ref, cache-set!): Add effect
  annotations.
* module/system/vm/assembler.scm (emit-cache-current-module!)
  (emit-cached-toplevel-box, emit-cached-module-box): Remove
  assemblers.
* module/system/vm/disassembler.scm (code-annotation, fold-code-range):
  Remove special cases for toplevel-box and module-box.
* module/system/xref.scm (program-callee-rev-vars): Add a FIXME for the
  future.
This commit is contained in:
Andy Wingo 2018-05-14 13:21:16 +02:00
parent 667d808f58
commit 77e7bea4c2
5 changed files with 17 additions and 50 deletions

View file

@ -252,8 +252,6 @@
emit-current-module
emit-resolve
emit-define!
emit-toplevel-box
emit-module-box
emit-prompt
emit-current-thread
emit-fadd
@ -1495,29 +1493,12 @@ returned instead."
(- (asm-start asm) (arity-low-pc arity)))))
(set-arity-definitions! arity (cons def (arity-definitions arity)))))
(define-macro-assembler (cache-current-module! asm module scope)
(let ((mod-label (intern-cache-cell asm scope)))
(emit-static-set! asm module mod-label 0)))
(define-macro-assembler (cache-ref asm dst key)
(emit-static-ref asm dst (intern-cache-cell asm key)))
(define-macro-assembler (cache-set! asm key val)
(emit-static-set! asm val (intern-cache-cell asm key) 0))
(define-macro-assembler (cached-toplevel-box asm dst scope sym bound?)
(let ((sym-label (intern-non-immediate asm sym))
(mod-label (intern-cache-cell asm scope))
(cell-label (intern-cache-cell asm (cons scope sym))))
(emit-toplevel-box asm dst cell-label mod-label sym-label bound?)))
(define-macro-assembler (cached-module-box asm dst module-name sym public? bound?)
(let* ((sym-label (intern-non-immediate asm sym))
(key (cons public? module-name))
(mod-name-label (intern-constant asm key))
(cell-label (intern-cache-cell asm (acons public? module-name sym))))
(emit-module-box asm dst cell-label mod-name-label sym-label bound?)))
(define-macro-assembler (slot-map asm proc-slot slot-map)
(unless (zero? slot-map)
(set-asm-slot-maps! asm (cons