diff --git a/basis/compiler/compiler.factor b/basis/compiler/compiler.factor index dc25520dc4..b01a835b4a 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 >array + compiled get >alist ] with-scope ; : enable-compiler ( -- ) diff --git a/core/hashtables/hashtables.factor b/core/hashtables/hashtables.factor index 0357502a8a..0fde459a25 100644 --- a/core/hashtables/hashtables.factor +++ b/core/hashtables/hashtables.factor @@ -128,15 +128,25 @@ M: hashtable set-at ( value key hash -- ) : associate ( value key -- hash ) 2 [ set-at ] keep ; +> set-array-nth ] + [ >r 1+ r> (>>length) ] + 2bi ; inline + +PRIVATE> + M: hashtable >alist - array>> [ length 2/ ] keep V{ } clone [ + [ array>> [ length 2/ ] keep ] [ assoc-size ] bi [ [ >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 + pick tombstone? [ 3drop ] [ [ 2array ] dip push-unsafe ] if ] 2curry each - ] keep ; + ] keep { } like ; M: hashtable clone (clone) [ clone ] change-array ;