diff options
author | Andy Wingo <wingo@pobox.com> | 2018-01-10 21:56:30 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2018-01-10 21:58:24 +0100 |
commit | d355b42a3e7d1e314f2bd83d12d9d45e748e19e7 (patch) | |
tree | b0e90dbee77cece66ca84af51ca34662e2d6b508 /module/language/cps/compile-bytecode.scm | |
parent | 9222e4df4b3673da662785f71d0f3c289ba8a8a5 (diff) | |
download | guile-d355b42a3e7d1e314f2bd83d12d9d45e748e19e7.tar.gz |
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.
Diffstat (limited to 'module/language/cps/compile-bytecode.scm')
-rw-r--r-- | module/language/cps/compile-bytecode.scm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/module/language/cps/compile-bytecode.scm b/module/language/cps/compile-bytecode.scm index ce4097361..dceab600e 100644 --- a/module/language/cps/compile-bytecode.scm +++ b/module/language/cps/compile-bytecode.scm @@ -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)) |