From b75def3bfb72a70c5f39377995f99cfca3373bc8 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Thu, 3 Mar 2016 14:36:48 -0800 Subject: [PATCH] hashtables: remove 2hashtable (not really used). --- core/continuations/continuations-tests.factor | 7 ++++--- core/destructors/destructors.factor | 8 ++++---- core/hashtables/hashtables.factor | 3 --- core/io/pathnames/pathnames-tests.factor | 6 ++++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/core/continuations/continuations-tests.factor b/core/continuations/continuations-tests.factor index cc836b45d1..ce3f36ac3f 100644 --- a/core/continuations/continuations-tests.factor +++ b/core/continuations/continuations-tests.factor @@ -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 diff --git a/core/destructors/destructors.factor b/core/destructors/destructors.factor index 2cb758344e..2196d4f1fb 100755 --- a/core/destructors/destructors.factor +++ b/core/destructors/destructors.factor @@ -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 diff --git a/core/hashtables/hashtables.factor b/core/hashtables/hashtables.factor index 2c76350194..0f6ad5919c 100644 --- a/core/hashtables/hashtables.factor +++ b/core/hashtables/hashtables.factor @@ -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 -