fixes
parent
fa38f93e49
commit
3b0110db42
|
@ -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:
|
||||
|
|
|
@ -41,7 +41,7 @@ TUPLE: tombstone ;
|
|||
>r >r [ key@ ] 2keep pick -1 > r> r> if ; inline
|
||||
|
||||
: <hash-array> ( n -- array )
|
||||
4 * ((empty)) <repeated> >array ;
|
||||
1+ 4 * ((empty)) <repeated> >array ;
|
||||
|
||||
: reset-hash ( n hash -- )
|
||||
swap <hash-array> 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 -- )
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue