compiler.tree.propagation.slots: looks like you can do without the
constructor-output-class worddb4
parent
09ad5bd617
commit
3e485652fe
|
@ -15,10 +15,6 @@ IN: compiler.tree.propagation.slots.tests
|
||||||
\ <array> sequence-constructor?
|
\ <array> sequence-constructor?
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
{ array byte-array string } [
|
|
||||||
\ <array> \ <byte-array> \ <string> [ constructor-output-class ] tri@
|
|
||||||
] unit-test
|
|
||||||
|
|
||||||
{
|
{
|
||||||
T{ value-info-state
|
T{ value-info-state
|
||||||
{ class array }
|
{ class array }
|
||||||
|
|
|
@ -3,23 +3,15 @@
|
||||||
USING: accessors arrays assocs byte-arrays classes
|
USING: accessors arrays assocs byte-arrays classes
|
||||||
classes.algebra classes.tuple classes.tuple.private combinators
|
classes.algebra classes.tuple classes.tuple.private combinators
|
||||||
combinators.short-circuit compiler.tree.propagation.info kernel
|
combinators.short-circuit compiler.tree.propagation.info kernel
|
||||||
math sequences slots.private strings ;
|
math sequences slots.private strings words ;
|
||||||
IN: compiler.tree.propagation.slots
|
IN: compiler.tree.propagation.slots
|
||||||
|
|
||||||
: sequence-constructor? ( word -- ? )
|
: sequence-constructor? ( word -- ? )
|
||||||
{ <array> <byte-array> (byte-array) <string> } member-eq? ;
|
{ <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 )
|
: propagate-sequence-constructor ( #call word -- infos )
|
||||||
[ in-d>> first value-info ]
|
[ in-d>> first value-info ]
|
||||||
[ constructor-output-class ] bi*
|
[ "default-output-classes" word-prop first ] bi*
|
||||||
<sequence-info> 1array ;
|
<sequence-info> 1array ;
|
||||||
|
|
||||||
: fold-<tuple-boa> ( values class -- info )
|
: fold-<tuple-boa> ( values class -- info )
|
||||||
|
|
Loading…
Reference in New Issue