1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-30 00:40:20 +02:00

sqrt and abs are interesting primitives

* module/language/cps/effects-analysis.scm:
* module/language/tree-il/primitives.scm (*interesting-primitive-names*):
  (*effect-free-primitives*): Add sqrt and abs.
This commit is contained in:
Andy Wingo 2014-02-13 11:04:55 +01:00
parent dd692618b8
commit 9b3c4cedd4
2 changed files with 5 additions and 2 deletions

View file

@ -417,7 +417,9 @@
((logand . _) (cause &type-check)) ((logand . _) (cause &type-check))
((logior . _) (cause &type-check)) ((logior . _) (cause &type-check))
((logior . _) (cause &type-check)) ((logior . _) (cause &type-check))
((lognot . _) (cause &type-check))) ((lognot . _) (cause &type-check))
((sqrt _) (cause &type-check))
((abs _) (cause &type-check)))
;; Characters. ;; Characters.
(define-primitive-effects (define-primitive-effects

View file

@ -48,6 +48,7 @@
= < > <= >= zero? positive? negative? = < > <= >= zero? positive? negative?
+ * - / 1- 1+ quotient remainder modulo + * - / 1- 1+ quotient remainder modulo
ash logand logior logxor lognot ash logand logior logxor lognot
sqrt abs
not not
pair? null? list? symbol? vector? string? struct? number? char? nil? pair? null? list? symbol? vector? string? struct? number? char? nil?
@ -163,7 +164,7 @@
eq? eqv? equal? eq? eqv? equal?
= < > <= >= zero? positive? negative? = < > <= >= zero? positive? negative?
ash logand logior logxor lognot ash logand logior logxor lognot
+ * - / 1- 1+ quotient remainder modulo + * - / 1- 1+ sqrt abs quotient remainder modulo
not not
pair? null? nil? list? pair? null? nil? list?
symbol? variable? vector? struct? string? number? char? symbol? variable? vector? struct? string? number? char?