2014-05-03 19:57:47 -04:00
|
|
|
USING: help.markup help.syntax literals multiline ;
|
|
|
|
IN: compiler.tree.propagation
|
|
|
|
|
2014-05-10 19:45:07 -04:00
|
|
|
<<
|
2014-05-03 19:57:47 -04:00
|
|
|
STRING: propagate-ex
|
|
|
|
USING: compiler.tree.builder compiler.tree.propagation math prettyprint ;
|
|
|
|
[ 3 + ] build-tree propagate third .
|
|
|
|
T{ #call
|
|
|
|
{ word + }
|
|
|
|
{ in-d V{ 9450187 9450186 } }
|
|
|
|
{ out-d { 9450188 } }
|
|
|
|
{ info
|
|
|
|
H{
|
|
|
|
{
|
|
|
|
9450186
|
|
|
|
T{ value-info-state
|
|
|
|
{ class fixnum }
|
|
|
|
{ interval
|
|
|
|
T{ interval
|
|
|
|
{ from ~array~ }
|
|
|
|
{ to ~array~ }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{ literal 3 }
|
|
|
|
{ literal? t }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
9450187
|
|
|
|
T{ value-info-state
|
|
|
|
{ class object }
|
|
|
|
{ interval full-interval }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
9450188
|
|
|
|
T{ value-info-state
|
|
|
|
{ class number }
|
|
|
|
{ interval full-interval }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
;
|
2014-05-10 19:45:07 -04:00
|
|
|
>>
|
2014-05-03 19:57:47 -04:00
|
|
|
|
|
|
|
HELP: propagate
|
|
|
|
{ $values { "nodes" "a sequence of nodes" } }
|
|
|
|
{ $description "Performs the propagation pass of the AST optimization. All nodes info slots are initialized here." }
|
|
|
|
{ $examples { $unchecked-example $[ propagate-ex ] }
|
|
|
|
} ;
|
2015-06-14 01:40:17 -04:00
|
|
|
|
|
|
|
ARTICLE: "compiler.tree.propagation" "Class, interval, constant propagation"
|
|
|
|
"This pass must be run after " { $vocab-link "compiler.tree.normalization" } "." ;
|
|
|
|
|
|
|
|
ABOUT: "compiler.tree.propagation"
|