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

builtin-ref takes immediate parameter

* module/language/cps/compile-bytecode.scm (compile-function):
* module/language/cps/reify-primitives.scm (builtin-ref):
* module/language/cps/slot-allocation.scm (compute-needs-slot):
  Builtin-ref uses immediate parameter.
This commit is contained in:
Andy Wingo 2017-11-01 15:27:38 +01:00
parent d7ecf35d70
commit 56d639bfe5
3 changed files with 4 additions and 7 deletions

View file

@ -201,8 +201,8 @@
(($ $primcall 'ulsh/immediate #f (x y))
(emit-ulsh/immediate asm (from-sp dst) (from-sp (slot x))
(constant y)))
(($ $primcall 'builtin-ref #f (name))
(emit-builtin-ref asm (from-sp dst) (constant name)))
(($ $primcall 'builtin-ref idx ())
(emit-builtin-ref asm (from-sp dst) idx))
(($ $primcall 'scm->f64 #f (src))
(emit-scm->f64 asm (from-sp dst) (from-sp (slot src))))
(($ $primcall 'load-f64 val ())

View file

@ -95,9 +95,8 @@
(define (builtin-ref cps idx k src)
(with-cps cps
($ (with-cps-constants ((idx idx))
(build-term
($continue k src ($primcall 'builtin-ref #f (idx))))))))
(build-term
($continue k src ($primcall 'builtin-ref idx ())))))
(define (reify-clause cps ktail)
(with-cps cps

View file

@ -340,8 +340,6 @@ the definitions that are live before and after LABEL, as intsets."
'ursh/immediate 'ulsh/immediate) #f
(x y))
(defs+ x))
(($ $primcall 'builtin-ref #f (idx))
defs)
(_
(defs+* (get-uses label))))))
(($ $kreceive arity k)