Merge branch 'master' of git://factorcode.org/git/factor
commit
e8f961f42d
|
@ -84,6 +84,13 @@ FUNCTION: tiny ffi_test_17 int x ;
|
|||
|
||||
[ 3 ] [ "ffi_test_1" f dlsym indirect-test-1 ] unit-test
|
||||
|
||||
: indirect-test-1' ( ptr -- )
|
||||
"int" { } "cdecl" alien-indirect drop ;
|
||||
|
||||
{ 1 0 } [ indirect-test-1' ] must-infer-as
|
||||
|
||||
[ ] [ "ffi_test_1" f dlsym indirect-test-1' ] unit-test
|
||||
|
||||
[ -1 indirect-test-1 ] must-fail
|
||||
|
||||
: indirect-test-2 ( x y ptr -- result )
|
||||
|
|
|
@ -81,11 +81,19 @@ M: #alien-indirect compute-live-values* nip look-at-inputs ;
|
|||
drop-values
|
||||
] ;
|
||||
|
||||
: drop-dead-outputs ( node -- nodes )
|
||||
: drop-dead-outputs ( node -- #shuffle )
|
||||
dup out-d>> drop-dead-values tuck in-d>> >>out-d drop ;
|
||||
|
||||
: some-outputs-dead? ( #call -- ? )
|
||||
out-d>> [ live-value? not ] contains? ;
|
||||
|
||||
: maybe-drop-dead-outputs ( node -- nodes )
|
||||
dup some-outputs-dead? [
|
||||
dup drop-dead-outputs 2array
|
||||
] when ;
|
||||
|
||||
M: #introduce remove-dead-code* ( #introduce -- nodes )
|
||||
dup drop-dead-outputs 2array ;
|
||||
maybe-drop-dead-outputs ;
|
||||
|
||||
M: #>r remove-dead-code*
|
||||
[ filter-live ] change-out-r
|
||||
|
@ -110,17 +118,9 @@ M: #push remove-dead-code*
|
|||
[ in-d>> #drop remove-dead-code* ]
|
||||
bi ;
|
||||
|
||||
: some-outputs-dead? ( #call -- ? )
|
||||
out-d>> [ live-value? not ] contains? ;
|
||||
|
||||
M: #call remove-dead-code*
|
||||
dup dead-flushable-call? [
|
||||
remove-flushable-call
|
||||
] [
|
||||
dup some-outputs-dead? [
|
||||
dup drop-dead-outputs 2array
|
||||
] when
|
||||
] if ;
|
||||
dup dead-flushable-call?
|
||||
[ remove-flushable-call ] [ maybe-drop-dead-outputs ] if ;
|
||||
|
||||
M: #shuffle remove-dead-code*
|
||||
[ filter-live ] change-in-d
|
||||
|
@ -136,3 +136,9 @@ M: #copy remove-dead-code*
|
|||
M: #terminate remove-dead-code*
|
||||
[ filter-live ] change-in-d
|
||||
[ filter-live ] change-in-r ;
|
||||
|
||||
M: #alien-invoke remove-dead-code*
|
||||
maybe-drop-dead-outputs ;
|
||||
|
||||
M: #alien-indirect remove-dead-code*
|
||||
maybe-drop-dead-outputs ;
|
||||
|
|
|
@ -136,7 +136,6 @@ IN: tools.deploy.shaker
|
|||
"specializer"
|
||||
"step-into"
|
||||
"step-into?"
|
||||
"superclass"
|
||||
"transform-n"
|
||||
"transform-quot"
|
||||
"tuple-dispatch-generic"
|
||||
|
|
|
@ -67,9 +67,12 @@ M: button-paint draw-interior
|
|||
M: button-paint draw-boundary
|
||||
button-paint draw-boundary ;
|
||||
|
||||
: align-left ( button -- button )
|
||||
{ 0 1/2 } >>align ; inline
|
||||
|
||||
: roll-button-theme ( button -- button )
|
||||
f black <solid> dup f <button-paint> >>boundary
|
||||
{ 0 1/2 } >>align ; inline
|
||||
align-left ; inline
|
||||
|
||||
: <roll-button> ( label quot -- button )
|
||||
<button> roll-button-theme ;
|
||||
|
@ -141,7 +144,8 @@ TUPLE: checkbox < button ;
|
|||
<checkmark> label-on-right checkbox-theme
|
||||
[ model>> toggle-model ]
|
||||
checkbox new-button
|
||||
swap >>model ;
|
||||
swap >>model
|
||||
align-left ;
|
||||
|
||||
M: checkbox model-changed
|
||||
swap model-value over (>>selected?) relayout-1 ;
|
||||
|
@ -179,7 +183,8 @@ TUPLE: radio-control < button value ;
|
|||
[ [ value>> ] keep set-control-value ]
|
||||
radio-control new-button
|
||||
swap >>model
|
||||
swap >>value ; inline
|
||||
swap >>value
|
||||
align-left ; inline
|
||||
|
||||
M: radio-control model-changed
|
||||
swap model-value
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
USING: tools.deploy.config ;
|
||||
H{
|
||||
{ deploy-reflection 1 }
|
||||
{ deploy-random? t }
|
||||
{ deploy-word-defs? f }
|
||||
{ deploy-word-props? f }
|
||||
{ deploy-name "Spheres" }
|
||||
{ deploy-compiler? t }
|
||||
{ deploy-math? t }
|
||||
{ deploy-io 1 }
|
||||
{ deploy-threads? t }
|
||||
{ "stop-after-last-window?" t }
|
||||
{ deploy-ui? t }
|
||||
{ deploy-c-types? f }
|
||||
}
|
Loading…
Reference in New Issue