[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 08/11: Emit new eq? instruction
From: |
Andy Wingo |
Subject: |
[Guile-commits] 08/11: Emit new eq? instruction |
Date: |
Sun, 29 Oct 2017 05:09:40 -0400 (EDT) |
wingo pushed a commit to branch master
in repository guile.
commit 056914b55586250ea3b8c3dedc8b0f7a1acdb9a7
Author: Andy Wingo <address@hidden>
Date: Fri Oct 27 15:29:24 2017 +0200
Emit new eq? instruction
* module/language/cps/compile-bytecode.scm (compile-function): Emit
new-style eq? instruction.
---
module/language/cps/compile-bytecode.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/module/language/cps/compile-bytecode.scm
b/module/language/cps/compile-bytecode.scm
index 5dcd6e2..b7e162b 100644
--- a/module/language/cps/compile-bytecode.scm
+++ b/module/language/cps/compile-bytecode.scm
@@ -409,6 +409,9 @@
(define (unary op a)
(op asm (from-sp (slot a)))
(emit-branch-for-test))
+ (define (binary-test op a b)
+ (op asm (from-sp (slot a)) (from-sp (slot b)))
+ (emit-branch-for-test))
(define (binary op a b)
(cond
((eq? kt next-label)
@@ -438,7 +441,7 @@
;; Add more TC7 tests here. Keep in sync with
;; *branching-primcall-arities* in (language cps primitives) and
;; the set of macro-instructions in assembly.scm.
- (($ $primcall 'eq? (a b)) (binary emit-br-if-eq a b))
+ (($ $primcall 'eq? (a b)) (binary-test emit-eq? a b))
(($ $primcall 'eqv? (a b)) (binary emit-br-if-eqv a b))
(($ $primcall '< (a b)) (binary emit-br-if-< a b))
(($ $primcall '<= (a b)) (binary emit-br-if-<= a b))
- [Guile-commits] branch master updated (cd947a1 -> 9d1235a), Andy Wingo, 2017/10/29
- [Guile-commits] 02/11: Use tag visitors to generate assemblers, disassembly annotations, Andy Wingo, 2017/10/29
- [Guile-commits] 05/11: Emit char? instead of br-if-char, Andy Wingo, 2017/10/29
- [Guile-commits] 04/11: Emit new instructions for heap object type tests, Andy Wingo, 2017/10/29
- [Guile-commits] 08/11: Emit new eq? instruction,
Andy Wingo <=
- [Guile-commits] 10/11: Use new instructions for u64 comparisons., Andy Wingo, 2017/10/29
- [Guile-commits] 09/11: Use new instructions for less-than, etc, Andy Wingo, 2017/10/29
- [Guile-commits] 11/11: Use new instructions for f64 comparisons, Andy Wingo, 2017/10/29
- [Guile-commits] 03/11: Heap type predicates preceded by heap-object?, Andy Wingo, 2017/10/29
- [Guile-commits] 01/11: Refactor (system base types internal) to use more macros, Andy Wingo, 2017/10/29
- [Guile-commits] 06/11: Use new instructions for null?, nil?, Andy Wingo, 2017/10/29
- [Guile-commits] 07/11: Simplify $branch to always take a $primcall, Andy Wingo, 2017/10/29