Factor Documentation
|
Home
|
Glossary
|
Search
factorcode.org
#recursive
High-level optimizer operating on lexical tree SSA IR
Prev:
#enter-recursive
Next:
#return-recursive
Vocabulary
compiler.tree
Class description
Instruction which encodes a loop. It has the following slots:
child
A sequence of nodes representing the body of the loop.
loop?
If
t
, the recursion is implemented using a jump, otherwise as a call back to the word.
See also
inline-recursive-word
Definition
IN:
compiler.tree
TUPLE:
#recursive
<
node
in-d word label loop? child
;
Methods
USING:
compiler.tree
compiler.tree.def-use.simplified
kernel
;
M:
#recursive
actually-used-by*
2drop
;
USING:
accessors
compiler.tree
compiler.tree.checker
kernel
;
M:
#recursive
check-stack-flow*
[
check-in-d
]
[
child>>
(check-stack-flow)
]
bi
;
USING:
accessors
compiler.tree
compiler.tree.cleanup
kernel
sequences
;
M:
#recursive
cleanup-tree*
[
cleanup-tree
]
change-child
dup
label>>
calls>>
empty?
[
flatten-recursive
]
when
;
USING:
accessors
compiler.tree
compiler.tree.normalization.introductions
kernel
;
M:
#recursive
count-introductions*
[
label>>
]
[
child>>
count-introductions
]
bi
>>introductions
drop
;
USING:
accessors
compiler.cfg.builder
compiler.tree
kernel
;
M:
#recursive
emit-node
dup
label>>
loop?>>
[
emit-loop
]
[
emit-recursive
]
if
;
USING:
accessors
compiler.tree
compiler.tree.combinators
compiler.tree.escape-analysis.allocations
compiler.tree.escape-analysis.nodes
compiler.tree.escape-analysis.recursive
kernel
sequences
;
M:
#recursive
escape-analysis*
[
label>>
return>>
in-d>>
introduce-values
]
[
[
child>>
[
first
out-d>>
introduce-values
]
[
first
analyze-recursive-phi
]
[
(escape-analysis)
]
tri
]
until-fixed-point
]
bi
;
USING:
accessors
compiler.tree
compiler.tree.recursive.private
kernel
namespaces
sequences
;
M:
#recursive
node-call-graph
[
label>>
V{
}
clone
>>calls
drop
]
[
[
label>>
]
[
child>>
build-call-graph
]
bi
call-graph-node
boa
children
get
push
]
bi
;
USING:
compiler.tree
compiler.tree.def-use
kernel
;
M:
#recursive
node-defs-values
drop
f
;
USING:
accessors
compiler.tree
compiler.tree.debugger
kernel
make
quotations
;
M:
#recursive
node>quot
[
label>>
id>>
literalize
,
]
[
child>>
nodes>quot
,
\
label
,
]
bi
;
USING:
accessors
compiler.tree
compiler.tree.normalization
kernel
sequences
stack-checker.backend
;
M:
#recursive
normalize*
[
[
child>>
first
]
[
in-d>>
]
bi
>>in-d
drop
]
[
dup
label>>
introductions>>
make-values
[
(normalize)
]
curry
change-child
]
bi
;
USING:
accessors
compiler.tree
compiler.tree.combinators
compiler.tree.propagation.constraints
compiler.tree.propagation.copy
compiler.tree.propagation.nodes
compiler.tree.propagation.recursive
kernel
namespaces
sequences
;
M:
#recursive
propagate-around
constraints
[
H{
}
clone
suffix
]
change
[
constraints
[
but-last
H{
}
clone
suffix
]
change
child>>
[
first
compute-copy-equiv
]
[
first
propagate-recursive-phi
]
[
(propagate)
]
tri
]
until-fixed-point
;
USING:
accessors
arrays
compiler.tree
compiler.tree.dead-code.liveness
compiler.tree.dead-code.recursive
compiler.tree.dead-code.simple
kernel
;
M:
#recursive
remove-dead-code*
[
drop-recursive-inputs
]
[
[
(remove-dead-code)
]
change-child
dup
label>>
[
filter-live
]
change-enter-out
drop
]
[
drop-recursive-outputs
]
tri
3array
;
USING:
accessors
compiler.tree
compiler.tree.escape-analysis.check
;
M:
#recursive
run-escape-analysis*
child>>
run-escape-analysis?
;
USING:
accessors
compiler.tree
compiler.tree.tuple-unboxing
kernel
;
M:
#recursive
unbox-tuples*
[
label>>
[
flatten-values
]
change-enter-out
drop
]
[
[
flatten-values
]
change-in-d
]
bi
;