diff --git a/basis/compiler/tree/propagation/simple/simple.factor b/basis/compiler/tree/propagation/simple/simple.factor index c9148e2f18..b07e8d4bca 100644 --- a/basis/compiler/tree/propagation/simple/simple.factor +++ b/basis/compiler/tree/propagation/simple/simple.factor @@ -74,9 +74,17 @@ M: #declare propagate-before ] [ 2drop ] if ] if* ; +ERROR: invalid-outputs #call infos ; + +: check-outputs ( #call infos -- infos ) + over out-d>> over [ length ] bi@ = + [ nip ] [ invalid-outputs ] if ; + : call-outputs-quot ( #call word -- infos ) - [ in-d>> [ value-info ] map ] [ "outputs" word-prop ] bi* - with-datastack ; + dupd + [ in-d>> [ value-info ] map ] + [ "outputs" word-prop ] bi* + with-datastack check-outputs ; : literal-inputs? ( #call -- ? ) in-d>> [ value-info literal?>> ] all? ;