diff --git a/basis/compiler/tree/cleanup/cleanup-tests.factor b/basis/compiler/tree/cleanup/cleanup-tests.factor index b77a27800f..13847e55a2 100644 --- a/basis/compiler/tree/cleanup/cleanup-tests.factor +++ b/basis/compiler/tree/cleanup/cleanup-tests.factor @@ -500,3 +500,8 @@ cell-bits 32 = [ [ { array-capacity } declare 1 fixnum+ ] cleaned-up-tree [ { [ #call? ] [ node-input-infos second literal>> 1 = ] } 1&& ] contains? ] unit-test + +[ ] [ + [ { null } declare [ 1 ] [ 2 ] if ] + build-tree normalize propagate cleanup check-nodes +] unit-test diff --git a/basis/compiler/tree/cleanup/cleanup.factor b/basis/compiler/tree/cleanup/cleanup.factor index 4ca058b2e3..becac01cd5 100644 --- a/basis/compiler/tree/cleanup/cleanup.factor +++ b/basis/compiler/tree/cleanup/cleanup.factor @@ -102,7 +102,7 @@ M: #declare cleanup* drop f ; #! If only one branch is live we don't need to branch at #! all; just drop the condition value. dup live-children sift dup length { - { 0 [ 2drop f ] } + { 0 [ drop in-d>> #drop ] } { 1 [ first swap in-d>> #drop prefix ] } [ 2drop ] } case ;