]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/tree/escape-analysis/nodes/nodes.factor
Switch to https urls
[factor.git] / basis / compiler / tree / escape-analysis / nodes / nodes.factor
1 ! Copyright (C) 2008, 2009 Slava Pestov.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: compiler.tree.def-use
4 compiler.tree.escape-analysis.allocations fry kernel math
5 namespaces sequences ;
6 IN: compiler.tree.escape-analysis.nodes
7
8 GENERIC: escape-analysis* ( node -- )
9
10 SYMBOL: next-node
11
12 : each-with-next ( ... seq quot: ( ... elt -- ... ) -- ... )
13     dupd '[ 1 + _ ?nth next-node set @ ] each-index ; inline
14
15 : (escape-analysis) ( nodes -- )
16     [
17         [ node-defs-values introduce-values ]
18         [ escape-analysis* ]
19         bi
20     ] each-with-next ;