From 2dafe964fdbd83e96c798e6aa40d3344a82ed317 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Thu, 2 Aug 2012 15:14:21 -0700 Subject: [PATCH] namespaces: counter should be inlined for globals optimization to work. --- core/namespaces/namespaces.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/namespaces/namespaces.factor b/core/namespaces/namespaces.factor index ddfe464f8d..80be60c30b 100644 --- a/core/namespaces/namespaces.factor +++ b/core/namespaces/namespaces.factor @@ -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 swap with-variables ; inline : with-variable ( value key quot -- ) [ associate ] dip with-variables ; inline