fix a prettyprinter bug and optimizer regression
parent
7a4aed9fc5
commit
fa38f93e49
|
@ -1,11 +1,5 @@
|
||||||
+ 0.80:
|
+ 0.80:
|
||||||
|
|
||||||
- flip-branches optimizer not working
|
|
||||||
- prettyprint:
|
|
||||||
|
|
||||||
{ V{ T{ literal T{ value f f G:110886 } f } T{ value
|
|
||||||
f f G:110887
|
|
||||||
} } }
|
|
||||||
- intrinsic char-slot set-char-slot for x86
|
- intrinsic char-slot set-char-slot for x86
|
||||||
- closing ui does not stop timers
|
- closing ui does not stop timers
|
||||||
- adding/removing timers automatically for animated gadgets
|
- adding/removing timers automatically for animated gadgets
|
||||||
|
@ -18,8 +12,6 @@
|
||||||
- what about tasks and timers between image restarts
|
- what about tasks and timers between image restarts
|
||||||
|
|
||||||
- double hash
|
- double hash
|
||||||
- empty key change
|
|
||||||
- if hash is full and we change existing key, it should not grow
|
|
||||||
|
|
||||||
+ ui:
|
+ ui:
|
||||||
|
|
||||||
|
|
|
@ -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 )
|
||||||
1+ 4 * ((empty)) <repeated> >array ;
|
4 * ((empty)) <repeated> >array ;
|
||||||
|
|
||||||
: reset-hash ( n hash -- )
|
: reset-hash ( n hash -- )
|
||||||
swap <hash-array> over set-underlying
|
swap <hash-array> over set-underlying
|
||||||
|
@ -154,15 +154,16 @@ IN: hashtables
|
||||||
: hash-size ( hash -- n ) dup hash-count swap hash-deleted - ;
|
: hash-size ( hash -- n ) dup hash-count swap hash-deleted - ;
|
||||||
|
|
||||||
: grow-hash ( hash -- )
|
: grow-hash ( hash -- )
|
||||||
[ underlying ] keep
|
[ dup underlying swap hash-size 1+ ] keep
|
||||||
[ >r length r> reset-hash ] 2keep
|
[ reset-hash ] keep swap [ swap pick (set-hash) ] each-pair
|
||||||
swap [ swap pick (set-hash) ] each-pair drop ;
|
drop ;
|
||||||
|
|
||||||
: ?grow-hash ( hash -- )
|
: ?grow-hash ( hash -- )
|
||||||
dup hash-count 1+ 4 * over underlying length >
|
dup hash-count 2 + 2 * over underlying length >
|
||||||
[ dup grow-hash ] when drop ;
|
[ dup grow-hash ] when drop ;
|
||||||
|
|
||||||
: set-hash ( value key hash -- ) dup ?grow-hash (set-hash) ;
|
: set-hash ( value key hash -- )
|
||||||
|
[ (set-hash) ] keep ?grow-hash ;
|
||||||
|
|
||||||
: hash-keys ( hash -- keys ) 0 swap hash>seq ;
|
: hash-keys ( hash -- keys ) 0 swap hash>seq ;
|
||||||
|
|
||||||
|
|
|
@ -65,8 +65,8 @@ M: #shuffle optimize-node* ( node -- node/t )
|
||||||
compose-shuffle-nodes
|
compose-shuffle-nodes
|
||||||
] [
|
] [
|
||||||
drop [
|
drop [
|
||||||
dup node-in-d over node-out-d =
|
dup node-in-d over node-out-d sequence=
|
||||||
[ dup node-in-r swap node-out-r = ] [ drop f ] if
|
>r dup node-in-r swap node-out-r sequence= r> and
|
||||||
] prune-if
|
] prune-if
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
|
|
|
@ -298,7 +298,7 @@ M: tuple pprint* ( tuple -- )
|
||||||
[
|
[
|
||||||
\ T{ pprint*
|
\ T{ pprint*
|
||||||
tuple>array dup first pprint*
|
tuple>array dup first pprint*
|
||||||
<block 1 swap tail-slice pprint-elements block>
|
<block 1 swap tail-slice pprint-elements
|
||||||
\ } pprint*
|
\ } pprint*
|
||||||
] check-recursion ;
|
] check-recursion ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue