1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-23 03:54:12 +02:00

Assignment conversion uses unchecked memory accessors

* module/language/cps/effects-analysis.scm (annotation->memory-kind):
  Add box type annotation.
* module/language/cps/reify-primitives.scm (primitive-ref): Reify
  scm-ref/immediate instead of box-ref.
* module/language/cps/specialize-primcalls.scm (specialize-primcalls):
  Remove needless and unbound -> literal.
* module/language/cps/types.scm (annotation->type): Add box type.
* module/language/tree-il/compile-cps.scm (convert): Reify
  scm-ref/immediate / scm-set!/immediate instead of box-ref / box-set!.
This commit is contained in:
Andy Wingo 2017-12-06 11:26:03 +01:00
parent dd8bf6a98c
commit eed4e09723
5 changed files with 32 additions and 20 deletions

View file

@ -91,7 +91,8 @@
(lambda (cps box)
(with-cps cps
(build-term
($continue k src ($primcall 'box-ref #f (box))))))))
($continue k src
($primcall 'scm-ref/immediate '(box . 1) (box))))))))
(define (builtin-ref cps idx k src)
(with-cps cps
@ -257,7 +258,7 @@
(letv n*)
(letk kop ($kargs ('n) (n*)
($continue k src
($primcall 'allocate-words ann (n)))))
($primcall 'allocate-words ann (n*)))))
(setk label ($kargs names vars
($continue kop src
($primcall 'load-u64 n ())))))))))