mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-23 13:00:34 +02:00
Effects analysis: define causes-all-effects?
* module/language/cps/effects-analysis.scm (causes-all-effects?): New export.
This commit is contained in:
parent
f5fcd7f203
commit
19ceadab51
1 changed files with 4 additions and 1 deletions
|
@ -70,7 +70,8 @@
|
|||
effect-free?
|
||||
constant?
|
||||
depends-on-effects?
|
||||
causes-effects?))
|
||||
causes-effects?
|
||||
causes-all-effects?))
|
||||
|
||||
(define-syntax define-effects
|
||||
(lambda (x)
|
||||
|
@ -233,6 +234,8 @@
|
|||
(not (zero? (logand (&depends-on x) effects))))
|
||||
(define-inlinable (causes-effects? x effects)
|
||||
(not (zero? (logand (&causes x) (cause effects)))))
|
||||
(define-inlinable (causes-all-effects? x effects)
|
||||
(= (logand (&causes x) (cause effects)) (cause effects)))
|
||||
|
||||
(define-inlinable (effects-commute? a b)
|
||||
(and (not (causes-effects? a (&depends-on b)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue