mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
Add optimizer and backend support for gc-pointer-ref
* module/language/cps/compile-bytecode.scm (compile-function): * module/language/cps/cse.scm (compute-equivalent-subexpressions): * module/language/cps/effects-analysis.scm: * module/language/cps/reify-primitives.scm (reify-primitives): * module/language/cps/slot-allocation.scm (compute-var-representations): * module/language/cps/specialize-primcalls.scm (specialize-primcalls): * module/language/cps/types.scm (gc-pointer-ref/immediate): (gc-pointer-set!/immediate): * module/system/vm/assembler.scm: Add support for pointer-ref.
This commit is contained in:
parent
9222e4df4b
commit
d355b42a3e
8 changed files with 34 additions and 0 deletions
|
@ -170,6 +170,8 @@
|
|||
(from-sp (slot idx))))
|
||||
(($ $primcall 'word-ref/immediate (annotation . idx) (obj))
|
||||
(emit-word-ref/immediate asm (from-sp dst) (from-sp (slot obj)) idx))
|
||||
(($ $primcall 'gc-pointer-ref/immediate (annotation . idx) (obj))
|
||||
(emit-gc-pointer-ref/immediate asm (from-sp dst) (from-sp (slot obj)) idx))
|
||||
(($ $primcall 'struct-ref/immediate idx (struct))
|
||||
(emit-struct-ref/immediate asm (from-sp dst) (from-sp (slot struct))
|
||||
idx))
|
||||
|
@ -313,6 +315,9 @@
|
|||
(($ $primcall 'word-set!/immediate (annotation . idx) (obj val))
|
||||
(emit-word-set!/immediate asm (from-sp (slot obj)) idx
|
||||
(from-sp (slot val))))
|
||||
(($ $primcall 'gc-pointer-set!/immediate (annotation . idx) (obj val))
|
||||
(emit-gc-pointer-set!/immediate asm (from-sp (slot obj)) idx
|
||||
(from-sp (slot val))))
|
||||
(($ $primcall 'free-set! idx (closure value))
|
||||
(emit-free-set! asm (from-sp (slot closure)) (from-sp (slot value))
|
||||
idx))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue