Merge branch 'master' of git://factorcode.org/git/factor
commit
9656ce2e65
|
@ -119,7 +119,7 @@ t compile-dependencies? set-global
|
||||||
H{ } clone compiled set
|
H{ } clone compiled set
|
||||||
[ queue-compile ] each
|
[ queue-compile ] each
|
||||||
compile-queue get compile-loop
|
compile-queue get compile-loop
|
||||||
compiled get >alist >array
|
compiled get >alist
|
||||||
] with-scope ;
|
] with-scope ;
|
||||||
|
|
||||||
: enable-compiler ( -- )
|
: enable-compiler ( -- )
|
||||||
|
|
|
@ -128,15 +128,25 @@ M: hashtable set-at ( value key hash -- )
|
||||||
: associate ( value key -- hash )
|
: associate ( value key -- hash )
|
||||||
2 <hashtable> [ set-at ] keep ;
|
2 <hashtable> [ set-at ] keep ;
|
||||||
|
|
||||||
|
<PRIVATE
|
||||||
|
|
||||||
|
: push-unsafe ( elt seq -- )
|
||||||
|
[ length ] keep
|
||||||
|
[ underlying>> set-array-nth ]
|
||||||
|
[ >r 1+ r> (>>length) ]
|
||||||
|
2bi ; inline
|
||||||
|
|
||||||
|
PRIVATE>
|
||||||
|
|
||||||
M: hashtable >alist
|
M: hashtable >alist
|
||||||
array>> [ length 2/ ] keep V{ } clone [
|
[ array>> [ length 2/ ] keep ] [ assoc-size <vector> ] bi [
|
||||||
[
|
[
|
||||||
>r
|
>r
|
||||||
>r 1 fixnum-shift-fast r>
|
>r 1 fixnum-shift-fast r>
|
||||||
[ array-nth ] [ >r 1 fixnum+fast r> array-nth ] 2bi 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
|
] 2curry each
|
||||||
] keep ;
|
] keep { } like ;
|
||||||
|
|
||||||
M: hashtable clone
|
M: hashtable clone
|
||||||
(clone) [ clone ] change-array ;
|
(clone) [ clone ] change-array ;
|
||||||
|
|
Loading…
Reference in New Issue