diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 2ed3e37e09..fe66ce9fe6 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -10,7 +10,6 @@ - remove word transfer hack in bootstrap - the invalid recursion form case needs to be fixed, for inlines too - what about tasks and timers between image restarts - - double hash + ui: diff --git a/library/collections/hashtables.factor b/library/collections/hashtables.factor index d3e94b75f3..d506738885 100644 --- a/library/collections/hashtables.factor +++ b/library/collections/hashtables.factor @@ -41,7 +41,7 @@ TUPLE: tombstone ; >r >r [ key@ ] 2keep pick -1 > r> r> if ; inline : ( n -- array ) - 4 * ((empty)) >array ; + 1+ 4 * ((empty)) >array ; : reset-hash ( n hash -- ) swap over set-underlying @@ -159,7 +159,7 @@ IN: hashtables drop ; : ?grow-hash ( hash -- ) - dup hash-count 2 + 2 * over underlying length > + dup hash-count 3 * over underlying length > [ dup grow-hash ] when drop ; : set-hash ( value key hash -- ) diff --git a/library/syntax/prettyprint.factor b/library/syntax/prettyprint.factor index 194e9b39d7..3d758d5a3d 100644 --- a/library/syntax/prettyprint.factor +++ b/library/syntax/prettyprint.factor @@ -199,13 +199,13 @@ M: real pprint* ( obj -- ) number>string f text ; : ch>ascii-escape ( ch -- esc ) H{ - [[ CHAR: \e "\\e" ]] - [[ CHAR: \n "\\n" ]] - [[ CHAR: \r "\\r" ]] - [[ CHAR: \t "\\t" ]] - [[ CHAR: \0 "\\0" ]] - [[ CHAR: \\ "\\\\" ]] - [[ CHAR: \" "\\\"" ]] + { CHAR: \e "\\e" } + { CHAR: \n "\\n" } + { CHAR: \r "\\r" } + { CHAR: \t "\\t" } + { CHAR: \0 "\\0" } + { CHAR: \\ "\\\\" } + { CHAR: \" "\\\"" } } hash ; : ch>unicode-escape ( ch -- esc ) diff --git a/library/test/lists/namespaces.factor b/library/test/lists/namespaces.factor index a0406d3f19..53b419e741 100644 --- a/library/test/lists/namespaces.factor +++ b/library/test/lists/namespaces.factor @@ -10,10 +10,6 @@ USE: sequences [ [[ 1 2 ]] ] [ 1 2 "x" set "x" cons@ "x" get ] unit-test [ [ 1 2 ] ] [ 1 [ 2 ] "x" set "x" cons@ "x" get ] unit-test -[ [ [[ 2 3 ]] [[ 1 2 ]] ] ] [ - "x" off 2 1 "x" [ acons ] change 3 2 "x" [ acons ] change "x" get -] unit-test - [ [ 5 4 3 1 ] ] [ [ 5 4 3 2 1 ] "x" set 2 "x" [ remove ] change