namespaces: counter should be inlined for globals optimization to work.
parent
3a7a7ac86b
commit
2dafe964fd
|
@ -60,7 +60,7 @@ PRIVATE>
|
||||||
: inc ( variable -- ) 1 swap +@ ; inline
|
: inc ( variable -- ) 1 swap +@ ; inline
|
||||||
: dec ( variable -- ) -1 swap +@ ; inline
|
: dec ( variable -- ) -1 swap +@ ; inline
|
||||||
: with-variables ( ns quot -- ) swap >n call ndrop ; inline
|
: with-variables ( ns quot -- ) swap >n call ndrop ; inline
|
||||||
: counter ( variable -- n ) [ 0 or 1 + dup ] change-global ;
|
: counter ( variable -- n ) [ 0 or 1 + dup ] change-global ; inline
|
||||||
: make-assoc ( quot exemplar -- hash ) 20 swap new-assoc [ swap with-variables ] keep ; inline
|
: make-assoc ( quot exemplar -- hash ) 20 swap new-assoc [ swap with-variables ] keep ; inline
|
||||||
: with-scope ( quot -- ) 5 <hashtable> swap with-variables ; inline
|
: with-scope ( quot -- ) 5 <hashtable> swap with-variables ; inline
|
||||||
: with-variable ( value key quot -- ) [ associate ] dip with-variables ; inline
|
: with-variable ( value key quot -- ) [ associate ] dip with-variables ; inline
|
||||||
|
|
Loading…
Reference in New Issue