]> gitweb.factorcode.org Git - factor.git/commitdiff
namespaces: counter should be inlined for globals optimization to work.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 2 Aug 2012 22:14:21 +0000 (15:14 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 2 Aug 2012 22:14:21 +0000 (15:14 -0700)
core/namespaces/namespaces.factor

index ddfe464f8d3625ac08251f4fc4f373d50a76d812..80be60c30b0d8e00b3537fe73e385f982f641d5a 100644 (file)
@@ -60,7 +60,7 @@ PRIVATE>
 : inc ( variable -- ) 1 swap +@ ; inline
 : dec ( variable -- ) -1 swap +@ ; 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
 : with-scope ( quot -- ) 5 <hashtable> swap with-variables ; inline
 : with-variable ( value key quot -- ) [ associate ] dip with-variables ; inline