hashtables: remove 2hashtable (not really used).

db4
John Benediktsson 2016-03-03 14:36:48 -08:00
parent 9d563dc2fe
commit b75def3bfb
4 changed files with 12 additions and 12 deletions

View File

@ -65,9 +65,10 @@ IN: continuations.tests
SYMBOL: always-counter
SYMBOL: error-counter
0 always-counter
0 error-counter 2hashtable
[
H{
{ always-counter 0 }
{ error-counter 0 }
} [
[ ] [ always-counter inc ] [ error-counter inc ] cleanup

View File

@ -1,6 +1,6 @@
! Copyright (C) 2007, 2010 Doug Coleman, Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors continuations hashtables init kernel namespaces
USING: accessors assocs continuations init kernel namespaces
sequences sets ;
IN: destructors
@ -82,9 +82,9 @@ PRIVATE>
dup error-destructors get push ; inline
: with-destructors ( quot -- )
V{ } clone always-destructors
V{ } clone error-destructors
2hashtable [
H{ } clone
V{ } clone always-destructors pick set-at
V{ } clone error-destructors pick set-at [
[ do-always-destructors ]
[ do-error-destructors ]
cleanup

View File

@ -150,9 +150,6 @@ M: hashtable set-at
[ 2dup hash@ set-nth-pair ] keep
hashtable boa ; inline
: 2hashtable ( value0 key0 value1 key1 -- hash )
H{ } clone [ set-at ] keep [ set-at ] keep ; inline
<PRIVATE
: collect-pairs ( hash quot: ( key value -- elt ) -- seq )

View File

@ -57,8 +57,10 @@ IN: io.pathnames.tests
{ } [ 2 [ "touch-twice-test" temp-file touch-file ] times ] unit-test
! aum's bug
"." current-directory
".." "resource-path" 2hashtable [
H{
{ current-directory "." }
{ "resource-path" ".." }
} [
[ "../core/bootstrap/stage2.factor" ]
[ "resource:core/bootstrap/stage2.factor" absolute-path ]
unit-test