#call-recursive


Vocabulary
compiler.tree

Definition
IN: compiler.tree

TUPLE: #call-recursive < node label in-d out-d info ;


Methods
USING: accessors compiler.tree compiler.tree.def-use.simplified
kernel sequences ;

M: #call-recursive actually-defined-by*
[ out-d>> index ] [ label>> return>> in-d>> nth ] bi
(actually-defined-by) ;


USING: accessors compiler.tree compiler.tree.def-use.simplified
kernel sequences ;

M: #call-recursive actually-used-by*
[ in-d>> index ] [ label>> enter-out>> nth ] bi
(actually-used-by) ;


USING: accessors compiler.tree compiler.tree.propagation.nodes
kernel sequences ;

M: #call-recursive annotate-node
dup [ in-d>> ] [ out-d>> ] bi append (annotate-node) ;


USING: compiler.tree compiler.tree.checker kernel ;

M: #call-recursive check-stack-flow*
[ check-in-d ] [ check-out-d ] bi ;


USING: accessors compiler.tree compiler.tree.dead-code.liveness
compiler.tree.dead-code.simple kernel ;

M: #call-recursive compute-live-values*
[ out-d>> ] [ label>> return>> in-d>> ] bi look-at-mapping
;


USING: accessors compiler.tree compiler.tree.cleanup kernel
sequences ;

M: #call-recursive delete-node
dup label>> calls>> [ node>> eq? not ] with filter! drop ;


USING: accessors compiler.cfg.builder
compiler.cfg.builder.blocks compiler.tree kernel ;

M: #call-recursive emit-node
[ label>> id>> ] [ call-height ] bi emit-call ;


USING: accessors compiler.tree
compiler.tree.escape-analysis.allocations
compiler.tree.escape-analysis.nodes
compiler.tree.escape-analysis.recursive kernel ;

M: #call-recursive escape-analysis*
[ ] [ label>> return>> ] [ node-output-allocations ] tri
[ [ node-input-allocations ] dip check-fixed-point ]
[ drop swap [ in-d>> ] [ out-d>> ] bi* copy-values ] 3bi ;


USING: accessors compiler.tree compiler.tree.recursive
compiler.tree.recursive.private kernel namespaces sequences ;

M: #call-recursive node-call-graph
[ dup label>> call-site boa ] keep
[ drop calls get push ] [ label>> calls>> push ] 2bi ;


USING: accessors compiler.tree compiler.tree.debugger make ;

M: #call-recursive node>quot label>> id>> , ;


USING: combinators compiler.tree compiler.tree.normalization
kernel math ;

M: #call-recursive normalize*
dup unchanged-underneath {
{ [ dup 0 < ] [ call<return ] }
{ [ dup 0 = ] [ drop ] }
{ [ dup 0 > ] [ call>return ] }
} cond ;


USING: compiler.tree compiler.tree.propagation.info
compiler.tree.propagation.nodes
compiler.tree.propagation.recursive kernel ;

M: #call-recursive propagate-before
[
[ ] [ latest-input-infos ] [ recursive-phi-infos ] tri
check-fixed-point
] [
[
[ ] [ return-infos ] [ node-output-infos ] tri
[ check-fixed-point ] [ drop save-return-infos ]
3bi
] unless-loop
] bi ;


USING: arrays compiler.tree compiler.tree.dead-code.liveness
compiler.tree.dead-code.recursive kernel ;

M: #call-recursive remove-dead-code*
[ drop-call-recursive-inputs ] [ ]
[ drop-call-recursive-outputs ] tri 3array ;


USING: accessors compiler.tree compiler.tree.tuple-unboxing ;

M: #call-recursive unbox-tuples*
[ flatten-values ] change-in-d
[ flatten-values ] change-out-d ;