diff --git a/basis/compiler/compiler.factor b/basis/compiler/compiler.factor index b01a835b4a..dc25520dc4 100644 --- a/basis/compiler/compiler.factor +++ b/basis/compiler/compiler.factor @@ -119,7 +119,7 @@ t compile-dependencies? set-global H{ } clone compiled set [ queue-compile ] each compile-queue get compile-loop - compiled get >alist + compiled get >alist >array ] with-scope ; : enable-compiler ( -- ) diff --git a/core/grouping/authors.txt b/basis/grouping/authors.txt similarity index 100% rename from core/grouping/authors.txt rename to basis/grouping/authors.txt diff --git a/core/grouping/grouping-docs.factor b/basis/grouping/grouping-docs.factor similarity index 100% rename from core/grouping/grouping-docs.factor rename to basis/grouping/grouping-docs.factor diff --git a/core/grouping/grouping-tests.factor b/basis/grouping/grouping-tests.factor similarity index 100% rename from core/grouping/grouping-tests.factor rename to basis/grouping/grouping-tests.factor diff --git a/core/grouping/grouping.factor b/basis/grouping/grouping.factor similarity index 100% rename from core/grouping/grouping.factor rename to basis/grouping/grouping.factor diff --git a/core/grouping/summary.txt b/basis/grouping/summary.txt similarity index 100% rename from core/grouping/summary.txt rename to basis/grouping/summary.txt diff --git a/core/grouping/tags.txt b/basis/grouping/tags.txt similarity index 100% rename from core/grouping/tags.txt rename to basis/grouping/tags.txt diff --git a/core/hashtables/hashtables.factor b/core/hashtables/hashtables.factor index 32fda7d2fb..0357502a8a 100644 --- a/core/hashtables/hashtables.factor +++ b/core/hashtables/hashtables.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2005, 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors arrays kernel kernel.private slots.private math -assocs math.private sequences sequences.private vectors grouping ; +assocs math.private sequences sequences.private vectors ; IN: hashtables TUPLE: hashtable @@ -129,14 +129,21 @@ M: hashtable set-at ( value key hash -- ) 2 [ set-at ] keep ; M: hashtable >alist - array>> 2 [ first tombstone? not ] filter ; + array>> [ length 2/ ] keep V{ } clone [ + [ + >r + >r 1 fixnum-shift-fast r> + [ array-nth ] [ >r 1 fixnum+fast r> array-nth ] 2bi r> + pick tombstone? [ 3drop ] [ [ 2array ] dip push ] if + ] 2curry each + ] keep ; M: hashtable clone (clone) [ clone ] change-array ; M: hashtable equal? over hashtable? [ - 2dup [ assoc-size ] bi@ number= + 2dup [ assoc-size ] bi@ eq? [ assoc= ] [ 2drop f ] if ] [ 2drop f ] if ;