mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-02 23:50:47 +02:00
CPS will not see "not" primcalls
* module/language/tree-il/compile-cps.scm (convert): Remove "not" primcalls. * module/language/cps/effects-analysis.scm (values): * module/language/cps/types.scm: Remove special cases for the "not" primcall.
This commit is contained in:
parent
44954194c9
commit
ae67b159bb
3 changed files with 10 additions and 19 deletions
|
@ -256,8 +256,7 @@ is or might be a read or a write to the same location as A."
|
|||
|
||||
;; Miscellaneous.
|
||||
(define-primitive-effects
|
||||
((values . _))
|
||||
((not arg)))
|
||||
((values . _)))
|
||||
|
||||
;; Generic effect-free predicates.
|
||||
(define-primitive-effects
|
||||
|
|
|
@ -447,23 +447,6 @@ minimum, and maximum."
|
|||
;;; we can infer the types of incoming values.
|
||||
|
||||
|
||||
|
||||
|
||||
;;;
|
||||
;;; Miscellaneous.
|
||||
;;;
|
||||
|
||||
(define-simple-type-checker (not &all-types))
|
||||
(define-type-inferrer (not val result)
|
||||
(cond
|
||||
((and (eqv? (&type val) &boolean)
|
||||
(eqv? (&min val) (&max val)))
|
||||
(let ((val (if (zero? (&min val)) 1 0)))
|
||||
(define! result &boolean val val)))
|
||||
(else
|
||||
(define! result &boolean 0 1))))
|
||||
|
||||
|
||||
|
||||
|
||||
;;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue