summaryrefslogtreecommitdiff
path: root/module/language
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-09-20 23:24:24 +0200
committerLudovic Courtès <ludo@gnu.org>2021-09-20 23:24:24 +0200
commit330c6ea83f492672578b62d0683acbb532d1a5d9 (patch)
treeef7849d39141bea6690395ad9d417024242dfe4b /module/language
parent136417990c136bd700867bfd9967f030713f8499 (diff)
downloadguile-330c6ea83f492672578b62d0683acbb532d1a5d9.tar.gz
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*'.
Diffstat (limited to 'module/language')
-rw-r--r--module/language/tree-il/compile-bytecode.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/language/tree-il/compile-bytecode.scm b/module/language/tree-il/compile-bytecode.scm
index c495d2ae6..551ae68e9 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