should fix in 0.82:
+- constant branch folding
+- getenv, setenv, fast-slot stuff
- 3 >n fep
- amd64 %box-struct
- get factor running on mac intel
+ ui/help:
+- polish OS X menu bar code
- help search
- reimplement clicking input
- reimplement tab completion
- the invalid recursion form case needs to be fixed, for inlines too
- code gc
- compiled gc check slows things down
-- fix branch folding
+ misc:
2dup length <= [
cut-phantom
] [
- [ phantom-locs ] keep [ length swap tail-slice ] keep
- append
+ [ phantom-locs ] keep [ length swap head-slice* ] keep
+ [ append 0 ] keep set-length
] if ;
: phantom-shuffle-inputs ( shuffle -- locs locs )
free-vregs get length <= ;
: phantom-shuffle ( shuffle -- )
- ! compute-free-vregs sufficient-shuffle-vregs? [
+ compute-free-vregs sufficient-shuffle-vregs? [
end-basic-block compute-free-vregs
- ! ] unless
+ ] unless
[ phantom-shuffle-inputs ] keep
[ shuffle* ] keep adjust-shuffle
(template-outputs) ;
: lazy-load ( value loc -- value )
over ds-loc? pick cs-loc? or [
dupd = [
- drop f
+ >r alloc-reg <vreg> dup r> %peek , ! drop f
] [
>r alloc-reg <vreg> dup r> %peek ,
] if
>r phantom-d get template-match? r> and ;
: split-template ( template phantom -- slow fast )
- over length over length <= [
- drop { } swap
- ] [
- length swap cut*
- ] if ;
+ over length over length <=
+ [ drop { } swap ] [ length swap cut* ] if ;
: split-templates ( template template -- slow slow fast fast )
>r phantom-d get split-template r>
[ 0 ] [ 3 [ tag ] compile-1 ] unit-test
[ 0 3 ] [ 3 [ [ tag ] keep ] compile-1 ] unit-test
+[ 2 3 ] [ 3 [ 2 swap ] compile-1 ] unit-test
+
+[ 2 3 4 ] [ 3 [ 2 swap 4 ] compile-1 ] unit-test
+
[ { 1 2 3 } { 1 4 3 } 8 8 ]
[ { 1 2 3 } { 1 4 3 } [ over type over type ] compile-1 ]
unit-test