compiler.tree.propagation.simple: check output types length.

db4
John Benediktsson 2013-04-26 17:21:22 -07:00
parent 88ec7ef7de
commit 9e65ccaf9f
1 changed files with 10 additions and 2 deletions

View File

@ -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? ;