[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] branch master updated: Add ‘expt’ to the list of effect-
From: |
Daniel Llorens |
Subject: |
[Guile-commits] branch master updated: Add ‘expt’ to the list of effect-free primitives. |
Date: |
Tue, 18 May 2021 07:45:01 -0400 |
This is an automated email from the git hooks/post-receive script.
lloda pushed a commit to branch master
in repository guile.
The following commit(s) were added to refs/heads/master by this push:
new 221203b Add ‘expt’ to the list of effect-free primitives.
221203b is described below
commit 221203b0df6420b0b8e7678fab7d056325364731
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Sun May 16 20:32:34 2021 +0200
Add ‘expt’ to the list of effect-free primitives.
I find myself writing code like (- (expt 2 32) 1)
lately. Let's allow constant-folding that.
* module/language/tree-il/primitives.scm
(*interesting-primitive-names*, *effect-free-primitives*):
Add 'expt'.
---
module/language/tree-il/primitives.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/module/language/tree-il/primitives.scm
b/module/language/tree-il/primitives.scm
index 1cc7907..7f3746b 100644
--- a/module/language/tree-il/primitives.scm
+++ b/module/language/tree-il/primitives.scm
@@ -48,6 +48,7 @@
memq memv
= < > <= >= zero? positive? negative?
+ * - / 1- 1+ quotient remainder modulo exact->inexact
+ expt
ash logand logior logxor lognot logtest logbit?
sqrt abs floor ceiling sin cos tan asin acos atan
not
@@ -171,7 +172,7 @@
`(values
eq? eqv? equal?
= < > <= >= zero? positive? negative?
- ash logand logior logxor lognot logtest logbit?
+ expt ash logand logior logxor lognot logtest logbit?
+ * - / 1- 1+ sqrt abs quotient remainder modulo exact->inexact
floor ceiling sin cos tan asin acos atan
not
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] branch master updated: Add ‘expt’ to the list of effect-free primitives.,
Daniel Llorens <=