[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 07/16: builtin-ref takes immediate parameter
From: |
Andy Wingo |
Subject: |
[Guile-commits] 07/16: builtin-ref takes immediate parameter |
Date: |
Sun, 5 Nov 2017 09:00:41 -0500 (EST) |
wingo pushed a commit to branch master
in repository guile.
commit 56d639bfe5193e6e0988fdf12f337e08bde0a924
Author: Andy Wingo <address@hidden>
Date: Wed Nov 1 15:27:38 2017 +0100
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.
---
module/language/cps/compile-bytecode.scm | 4 ++--
module/language/cps/reify-primitives.scm | 5 ++---
module/language/cps/slot-allocation.scm | 2 --
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/module/language/cps/compile-bytecode.scm
b/module/language/cps/compile-bytecode.scm
index a259a25..43c5ccb 100644
--- a/module/language/cps/compile-bytecode.scm
+++ b/module/language/cps/compile-bytecode.scm
@@ -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 ())
diff --git a/module/language/cps/reify-primitives.scm
b/module/language/cps/reify-primitives.scm
index 580f803..29a78aa 100644
--- a/module/language/cps/reify-primitives.scm
+++ b/module/language/cps/reify-primitives.scm
@@ -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
diff --git a/module/language/cps/slot-allocation.scm
b/module/language/cps/slot-allocation.scm
index b37b43e..279e843 100644
--- a/module/language/cps/slot-allocation.scm
+++ b/module/language/cps/slot-allocation.scm
@@ -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)
- [Guile-commits] branch master updated (2d8c75f -> f96a670), Andy Wingo, 2017/11/05
- [Guile-commits] 10/16: Tweak optimization order, Andy Wingo, 2017/11/05
- [Guile-commits] 12/16: Specialize primcalls more aggressively, Andy Wingo, 2017/11/05
- [Guile-commits] 13/16: Earlier conversion to /imm primcalls, Andy Wingo, 2017/11/05
- [Guile-commits] 02/16: cache-current-module, etc use immediate primcall parameters, Andy Wingo, 2017/11/05
- [Guile-commits] 05/16: Immediate variants of vector-ref, etc use immediate param, Andy Wingo, 2017/11/05
- [Guile-commits] 15/16: error, scm-error primcalls expand to `throw', Andy Wingo, 2017/11/05
- [Guile-commits] 07/16: builtin-ref takes immediate parameter,
Andy Wingo <=
- [Guile-commits] 09/16: reify-primitives reifies constants for out-of-range imm params, Andy Wingo, 2017/11/05
- [Guile-commits] 03/16: load-f64, etc take immediate parameters, Andy Wingo, 2017/11/05
- [Guile-commits] 04/16: free-ref, free-set take immediate parameters, Andy Wingo, 2017/11/05
- [Guile-commits] 11/16: (system base types) uses target's idea of max size_t, Andy Wingo, 2017/11/05
- [Guile-commits] 16/16: Add new "throw" VM ops, Andy Wingo, 2017/11/05
- [Guile-commits] 14/16: Add lsh, rsh instructions, Andy Wingo, 2017/11/05
- [Guile-commits] 06/16: Immediate parameter for struct-ref et al, Andy Wingo, 2017/11/05
- [Guile-commits] 08/16: Remaining /immediate instructions take primcall imm param, Andy Wingo, 2017/11/05
- [Guile-commits] 01/16: $primcall has a "param" member, Andy Wingo, 2017/11/05