refactor stack-checker.row-polymorphism a little

db4
Joe Groff 2010-03-08 19:32:25 -08:00
parent 10ca2ba695
commit 21aa4632c8
1 changed files with 11 additions and 11 deletions

View File

@ -10,24 +10,24 @@ stack-checker.values
stack-checker.visitor ; stack-checker.visitor ;
IN: stack-checker.row-polymorphism IN: stack-checker.row-polymorphism
:: with-effect-here ( quot -- effect ) :: with-inner-d ( quot -- inner-d )
inner-d-index get :> old-inner-d-index inner-d-index get :> old-inner-d-index
meta-d length inner-d-index set
quot call
inner-d-index get :> new-inner-d-index
old-inner-d-index new-inner-d-index min inner-d-index set
new-inner-d-index ; inline
:: with-effect-here ( quot -- effect )
input-count get :> old-input-count input-count get :> old-input-count
meta-d length :> old-meta-d-length meta-d length :> old-meta-d-length
old-meta-d-length inner-d-index set quot with-inner-d :> inner-d
quot call
inner-d-index get :> new-inner-d-index
input-count get :> new-input-count input-count get :> new-input-count
old-meta-d-length inner-d -
old-meta-d-length new-inner-d-index -
new-input-count old-input-count - + :> in new-input-count old-input-count - + :> in
meta-d length inner-d - :> out
meta-d length new-inner-d-index - :> out
new-inner-d-index old-inner-d-index min inner-d-index set
in "x" <array> out "x" <array> terminated? get <terminated-effect> ; inline in "x" <array> out "x" <array> terminated? get <terminated-effect> ; inline
:: check-variable ( actual-count declared-count variable vars -- difference ) :: check-variable ( actual-count declared-count variable vars -- difference )