Fix optimizer regression
parent
1c91a286e5
commit
b60edc199a
|
@ -287,3 +287,7 @@ TUPLE: silly-tuple a b ;
|
|||
[ 3 throw ] [ empty-compound ] compose [ 3 throw ] if ;
|
||||
|
||||
[ t ] [ \ node-successor-f-bug compiled? ] unit-test
|
||||
|
||||
: construct-empty-bug construct-empty ;
|
||||
|
||||
[ ] [ [ construct-empty ] dataflow optimize drop ] unit-test
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: arrays generic assocs hashtables inference kernel
|
||||
math namespaces sequences words parser math.intervals
|
||||
effects classes inference.dataflow inference.backend ;
|
||||
effects classes inference.dataflow inference.backend
|
||||
combinators ;
|
||||
IN: inference.class
|
||||
|
||||
! Class inference
|
||||
|
@ -181,8 +182,11 @@ M: pair constraint-satisfied?
|
|||
] if* ;
|
||||
|
||||
: default-output-classes ( word -- classes )
|
||||
"inferred-effect" word-prop effect-out
|
||||
dup [ class? ] all? [ drop f ] unless ;
|
||||
"inferred-effect" word-prop {
|
||||
{ [ dup not ] [ drop f ] }
|
||||
{ [ dup effect-out [ class? ] all? not ] [ drop f ] }
|
||||
{ [ t ] [ effect-out ] }
|
||||
} cond ;
|
||||
|
||||
: compute-output-classes ( node word -- classes intervals )
|
||||
dup node-param "output-classes" word-prop dup
|
||||
|
|
Loading…
Reference in New Issue