compiler.tree.propagation: implementing missing case in branch constraints
parent
0b4de37b63
commit
7afea4c0ea
|
@ -130,6 +130,22 @@ M: #phi propagate-before ( #phi -- )
|
||||||
swap t-->
|
swap t-->
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
{ { t f } { t } }
|
||||||
|
[
|
||||||
|
first =t
|
||||||
|
condition-value get =t /\
|
||||||
|
swap f-->
|
||||||
|
]
|
||||||
|
}
|
||||||
|
{
|
||||||
|
{ { t } { t f } }
|
||||||
|
[
|
||||||
|
second =t
|
||||||
|
condition-value get =f /\
|
||||||
|
swap f-->
|
||||||
|
]
|
||||||
|
}
|
||||||
{
|
{
|
||||||
{ { t f } { } }
|
{ { t f } { } }
|
||||||
[
|
[
|
||||||
|
|
|
@ -224,6 +224,14 @@ IN: compiler.tree.propagation.tests
|
||||||
|
|
||||||
[ t ] [ [ over [ drop f ] when [ "A" throw ] unless ] final-classes first false-class? ] unit-test
|
[ t ] [ [ over [ drop f ] when [ "A" throw ] unless ] final-classes first false-class? ] unit-test
|
||||||
|
|
||||||
|
[ V{ fixnum } ] [
|
||||||
|
[
|
||||||
|
[ { fixnum } declare ] [ drop f ] if
|
||||||
|
dup [ dup 13 eq? [ t ] [ f ] if ] [ t ] if
|
||||||
|
[ "Oops" throw ] when
|
||||||
|
] final-classes
|
||||||
|
] unit-test
|
||||||
|
|
||||||
[ V{ fixnum } ] [
|
[ V{ fixnum } ] [
|
||||||
[
|
[
|
||||||
>fixnum
|
>fixnum
|
||||||
|
@ -925,3 +933,4 @@ M: tuple-with-read-only-slot clone
|
||||||
|
|
||||||
! Could be bignum not integer but who cares
|
! Could be bignum not integer but who cares
|
||||||
[ V{ integer } ] [ [ 10 >bignum bitand ] final-classes ] unit-test
|
[ V{ integer } ] [ [ 10 >bignum bitand ] final-classes ] unit-test
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue