cvs
Slava Pestov 2005-11-28 07:23:36 +00:00
parent fa38f93e49
commit 3b0110db42
4 changed files with 9 additions and 14 deletions

View File

@ -10,7 +10,6 @@
- remove word transfer hack in bootstrap - remove word transfer hack in bootstrap
- the invalid recursion form case needs to be fixed, for inlines too - the invalid recursion form case needs to be fixed, for inlines too
- what about tasks and timers between image restarts - what about tasks and timers between image restarts
- double hash - double hash
+ ui: + ui:

View File

@ -41,7 +41,7 @@ TUPLE: tombstone ;
>r >r [ key@ ] 2keep pick -1 > r> r> if ; inline >r >r [ key@ ] 2keep pick -1 > r> r> if ; inline
: <hash-array> ( n -- array ) : <hash-array> ( n -- array )
4 * ((empty)) <repeated> >array ; 1+ 4 * ((empty)) <repeated> >array ;
: reset-hash ( n hash -- ) : reset-hash ( n hash -- )
swap <hash-array> over set-underlying swap <hash-array> over set-underlying
@ -159,7 +159,7 @@ IN: hashtables
drop ; drop ;
: ?grow-hash ( hash -- ) : ?grow-hash ( hash -- )
dup hash-count 2 + 2 * over underlying length > dup hash-count 3 * over underlying length >
[ dup grow-hash ] when drop ; [ dup grow-hash ] when drop ;
: set-hash ( value key hash -- ) : set-hash ( value key hash -- )

View File

@ -199,13 +199,13 @@ M: real pprint* ( obj -- ) number>string f text ;
: ch>ascii-escape ( ch -- esc ) : ch>ascii-escape ( ch -- esc )
H{ H{
[[ CHAR: \e "\\e" ]] { CHAR: \e "\\e" }
[[ CHAR: \n "\\n" ]] { CHAR: \n "\\n" }
[[ CHAR: \r "\\r" ]] { CHAR: \r "\\r" }
[[ CHAR: \t "\\t" ]] { CHAR: \t "\\t" }
[[ CHAR: \0 "\\0" ]] { CHAR: \0 "\\0" }
[[ CHAR: \\ "\\\\" ]] { CHAR: \\ "\\\\" }
[[ CHAR: \" "\\\"" ]] { CHAR: \" "\\\"" }
} hash ; } hash ;
: ch>unicode-escape ( ch -- esc ) : ch>unicode-escape ( ch -- esc )

View File

@ -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
[ [ 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 1 ] ] [
[ 5 4 3 2 1 ] "x" set [ 5 4 3 2 1 ] "x" set
2 "x" [ remove ] change 2 "x" [ remove ] change