[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 04/05: Fix 'ash' primcall match clause in baseline compi
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] 04/05: Fix 'ash' primcall match clause in baseline compiler. |
Date: |
Mon, 20 Sep 2021 17:33:04 -0400 (EDT) |
civodul pushed a commit to branch main
in repository guile.
commit 330c6ea83f492672578b62d0683acbb532d1a5d9
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Sep 20 23:24:24 2021 +0200
Fix 'ash' primcall match clause in baseline compiler.
Previously the pattern would only match when the two 'src' values were
the same, which is not the case for example when running on the
interpreter.
* module/language/tree-il/compile-bytecode.scm (canonicalize): In 'ash
primcall pattern, rename second 'src' to 'src*'.
---
module/language/tree-il/compile-bytecode.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/module/language/tree-il/compile-bytecode.scm
b/module/language/tree-il/compile-bytecode.scm
index c495d2a..551ae68 100644
--- a/module/language/tree-il/compile-bytecode.scm
+++ b/module/language/tree-il/compile-bytecode.scm
@@ -459,10 +459,10 @@
v)))
;; Transform "ash" to lsh / rsh.
- (($ <primcall> src 'ash (x ($ <const> src (? exact-integer? y))))
+ (($ <primcall> src 'ash (x ($ <const> src* (? exact-integer? y))))
(if (negative? y)
- (make-primcall src 'lsh (list x (make-const src (- y))))
- (make-primcall src 'rsh (list x (make-const src y)))))
+ (make-primcall src 'lsh (list x (make-const src* (- y))))
+ (make-primcall src 'rsh (list x (make-const src* y)))))
;; (throw key subr msg (list x) (list x))
(($ <primcall> src 'throw
- [Guile-commits] branch main updated (96e3686 -> 74abae0), Ludovic Courtès, 2021/09/20
- [Guile-commits] 04/05: Fix 'ash' primcall match clause in baseline compiler.,
Ludovic Courtès <=
- [Guile-commits] 05/05: Baseline compiler no longer swaps rsh/lsh when transforming ash calls., Ludovic Courtès, 2021/09/20
- [Guile-commits] 02/05: srfi-1: 'find-tail' passes 'check-arg' the right procedure name., Ludovic Courtès, 2021/09/20
- [Guile-commits] 01/05: (system repl command) autoloads the compiler, disassembler, and profiler., Ludovic Courtès, 2021/09/20
- [Guile-commits] 03/05: doc: Fix wrong @uref argument order., Ludovic Courtès, 2021/09/20