Handbook
Glossary
(infer-value) ( value-info -- effect )
Vocabulary
compiler
.
tree
.
propagation
.
call-effect
Inputs
value-info
an
object
Outputs
effect
an
object
Definition
USING:
accessors
combinators
combinators.short-circuit
effects
kernel
quotations
sequences
;
IN:
compiler.tree.propagation.call-effect
:
(infer-value)
( value-info -- effect )
dup
literal?>>
[
literal>>
[
callable?
[
uninferable
]
unless
]
[
already-inlined-quot?
[
uninferable
]
when
]
[
safe-infer
dup
+unknown+
=
[
uninferable
]
when
]
tri
]
[
dup
{
[
slots>>
empty?
not
]
[
class>>
]
}
1&&
{
{
\
curried
[
slots>>
third
(infer-value)
remove-effect-input
]
}
{
\
composed
[
slots>>
last2
[
(infer-value)
]
bi@
compose-effects
]
}
[
uninferable
]
}
case
]
if
;