mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 22:31:12 +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:
parent
d7ecf35d70
commit
56d639bfe5
3 changed files with 4 additions and 7 deletions
|
@ -201,8 +201,8 @@
|
||||||
(($ $primcall 'ulsh/immediate #f (x y))
|
(($ $primcall 'ulsh/immediate #f (x y))
|
||||||
(emit-ulsh/immediate asm (from-sp dst) (from-sp (slot x))
|
(emit-ulsh/immediate asm (from-sp dst) (from-sp (slot x))
|
||||||
(constant y)))
|
(constant y)))
|
||||||
(($ $primcall 'builtin-ref #f (name))
|
(($ $primcall 'builtin-ref idx ())
|
||||||
(emit-builtin-ref asm (from-sp dst) (constant name)))
|
(emit-builtin-ref asm (from-sp dst) idx))
|
||||||
(($ $primcall 'scm->f64 #f (src))
|
(($ $primcall 'scm->f64 #f (src))
|
||||||
(emit-scm->f64 asm (from-sp dst) (from-sp (slot src))))
|
(emit-scm->f64 asm (from-sp dst) (from-sp (slot src))))
|
||||||
(($ $primcall 'load-f64 val ())
|
(($ $primcall 'load-f64 val ())
|
||||||
|
|
|
@ -95,9 +95,8 @@
|
||||||
|
|
||||||
(define (builtin-ref cps idx k src)
|
(define (builtin-ref cps idx k src)
|
||||||
(with-cps cps
|
(with-cps cps
|
||||||
($ (with-cps-constants ((idx idx))
|
(build-term
|
||||||
(build-term
|
($continue k src ($primcall 'builtin-ref idx ())))))
|
||||||
($continue k src ($primcall 'builtin-ref #f (idx))))))))
|
|
||||||
|
|
||||||
(define (reify-clause cps ktail)
|
(define (reify-clause cps ktail)
|
||||||
(with-cps cps
|
(with-cps cps
|
||||||
|
|
|
@ -340,8 +340,6 @@ the definitions that are live before and after LABEL, as intsets."
|
||||||
'ursh/immediate 'ulsh/immediate) #f
|
'ursh/immediate 'ulsh/immediate) #f
|
||||||
(x y))
|
(x y))
|
||||||
(defs+ x))
|
(defs+ x))
|
||||||
(($ $primcall 'builtin-ref #f (idx))
|
|
||||||
defs)
|
|
||||||
(_
|
(_
|
||||||
(defs+* (get-uses label))))))
|
(defs+* (get-uses label))))))
|
||||||
(($ $kreceive arity k)
|
(($ $kreceive arity k)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue