factor/unfinished/compiler/tree/propagation/propagation.factor

27 lines
740 B
Factor
Raw Normal View History

2008-07-20 05:24:37 -04:00
! Copyright (C) 2004, 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors kernel sequences namespaces hashtables
compiler.tree
compiler.tree.def-use
2008-07-22 05:45:03 -04:00
compiler.tree.propagation.info
compiler.tree.propagation.nodes
2008-07-20 05:24:37 -04:00
compiler.tree.propagation.simple
compiler.tree.propagation.branches
2008-07-22 05:45:03 -04:00
compiler.tree.propagation.recursive
compiler.tree.propagation.constraints
compiler.tree.propagation.known-words ;
2008-07-20 05:24:37 -04:00
IN: compiler.tree.propagation
2008-07-22 05:45:03 -04:00
: propagate-with ( node infos -- )
2008-07-20 05:24:37 -04:00
[
H{ } clone constraints set
2008-07-22 05:45:03 -04:00
>hashtable value-infos set
2008-07-20 05:24:37 -04:00
(propagate)
] with-scope ;
: propagate ( node -- node )
2008-07-22 05:45:03 -04:00
dup f propagate-with ;
2008-07-20 05:24:37 -04:00
: propagate/node ( node existing -- )
2008-07-22 05:45:03 -04:00
info>> propagate-with ;