hashtables: remove 2hashtable (not really used).
parent
9d563dc2fe
commit
b75def3bfb
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue