compiler.tree.propagation.slots: looks like you can do without the

constructor-output-class word
db4
Björn Lindqvist 2015-09-21 12:24:22 +02:00
parent 09ad5bd617
commit 3e485652fe
2 changed files with 2 additions and 14 deletions

View File

@ -15,10 +15,6 @@ IN: compiler.tree.propagation.slots.tests
\ <array> sequence-constructor?
] unit-test
{ array byte-array string } [
\ <array> \ <byte-array> \ <string> [ constructor-output-class ] tri@
] unit-test
{
T{ value-info-state
{ class array }

View File

@ -3,23 +3,15 @@
USING: accessors arrays assocs byte-arrays classes
classes.algebra classes.tuple classes.tuple.private combinators
combinators.short-circuit compiler.tree.propagation.info kernel
math sequences slots.private strings ;
math sequences slots.private strings words ;
IN: compiler.tree.propagation.slots
: sequence-constructor? ( word -- ? )
{ <array> <byte-array> (byte-array) <string> } member-eq? ;
: constructor-output-class ( word -- class )
{
{ <array> array }
{ <byte-array> byte-array }
{ (byte-array) byte-array }
{ <string> string }
} at ;
: propagate-sequence-constructor ( #call word -- infos )
[ in-d>> first value-info ]
[ constructor-output-class ] bi*
[ "default-output-classes" word-prop first ] bi*
<sequence-info> 1array ;
: fold-<tuple-boa> ( values class -- info )