mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 22:31:12 +02:00
More inlinable effects-analysis procedures
* module/language/cps/effects-analysis.scm (exclude-effects) (effect-free?, constant?): Define to be inlinable. (allocate-struct/immediate): Add effects.
This commit is contained in:
parent
e15f3e3328
commit
cfb42b4c8a
1 changed files with 5 additions and 3 deletions
|
@ -205,11 +205,11 @@
|
|||
(define-inlinable (&causes a)
|
||||
(logand a (cause &all-effects)))
|
||||
|
||||
(define (exclude-effects effects exclude)
|
||||
(define-inlinable (exclude-effects effects exclude)
|
||||
(logand effects (lognot (cause exclude))))
|
||||
(define (effect-free? effects)
|
||||
(define-inlinable (effect-free? effects)
|
||||
(zero? (&causes effects)))
|
||||
(define (constant? effects)
|
||||
(define-inlinable (constant? effects)
|
||||
(zero? effects))
|
||||
|
||||
(define-inlinable (depends-on-effects? x effects)
|
||||
|
@ -312,6 +312,8 @@
|
|||
(define-primitive-effects* dfg
|
||||
((allocate-struct vtable nfields)
|
||||
(logior (cause &type-check) (cause &allocation)))
|
||||
((allocate-struct/immediate vtable nfields)
|
||||
(logior (cause &type-check) (cause &allocation)))
|
||||
((make-struct vtable ntail . args)
|
||||
(logior (cause &type-check) (cause &allocation)))
|
||||
((make-struct/no-tail vtable . args)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue