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
|
[ 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
|
[ -1 indirect-test-1 ] must-fail
|
||||||
|
|
||||||
: indirect-test-2 ( x y ptr -- result )
|
: indirect-test-2 ( x y ptr -- result )
|
||||||
|
|
|
@ -81,11 +81,19 @@ M: #alien-indirect compute-live-values* nip look-at-inputs ;
|
||||||
drop-values
|
drop-values
|
||||||
] ;
|
] ;
|
||||||
|
|
||||||
: drop-dead-outputs ( node -- nodes )
|
: drop-dead-outputs ( node -- #shuffle )
|
||||||
dup out-d>> drop-dead-values tuck in-d>> >>out-d drop ;
|
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 )
|
M: #introduce remove-dead-code* ( #introduce -- nodes )
|
||||||
dup drop-dead-outputs 2array ;
|
maybe-drop-dead-outputs ;
|
||||||
|
|
||||||
M: #>r remove-dead-code*
|
M: #>r remove-dead-code*
|
||||||
[ filter-live ] change-out-r
|
[ filter-live ] change-out-r
|
||||||
|
@ -110,17 +118,9 @@ M: #push remove-dead-code*
|
||||||
[ in-d>> #drop remove-dead-code* ]
|
[ in-d>> #drop remove-dead-code* ]
|
||||||
bi ;
|
bi ;
|
||||||
|
|
||||||
: some-outputs-dead? ( #call -- ? )
|
|
||||||
out-d>> [ live-value? not ] contains? ;
|
|
||||||
|
|
||||||
M: #call remove-dead-code*
|
M: #call remove-dead-code*
|
||||||
dup dead-flushable-call? [
|
dup dead-flushable-call?
|
||||||
remove-flushable-call
|
[ remove-flushable-call ] [ maybe-drop-dead-outputs ] if ;
|
||||||
] [
|
|
||||||
dup some-outputs-dead? [
|
|
||||||
dup drop-dead-outputs 2array
|
|
||||||
] when
|
|
||||||
] if ;
|
|
||||||
|
|
||||||
M: #shuffle remove-dead-code*
|
M: #shuffle remove-dead-code*
|
||||||
[ filter-live ] change-in-d
|
[ filter-live ] change-in-d
|
||||||
|
@ -136,3 +136,9 @@ M: #copy remove-dead-code*
|
||||||
M: #terminate remove-dead-code*
|
M: #terminate remove-dead-code*
|
||||||
[ filter-live ] change-in-d
|
[ filter-live ] change-in-d
|
||||||
[ filter-live ] change-in-r ;
|
[ 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"
|
"specializer"
|
||||||
"step-into"
|
"step-into"
|
||||||
"step-into?"
|
"step-into?"
|
||||||
"superclass"
|
|
||||||
"transform-n"
|
"transform-n"
|
||||||
"transform-quot"
|
"transform-quot"
|
||||||
"tuple-dispatch-generic"
|
"tuple-dispatch-generic"
|
||||||
|
|
|
@ -67,9 +67,12 @@ M: button-paint draw-interior
|
||||||
M: button-paint draw-boundary
|
M: button-paint draw-boundary
|
||||||
button-paint draw-boundary ;
|
button-paint draw-boundary ;
|
||||||
|
|
||||||
|
: align-left ( button -- button )
|
||||||
|
{ 0 1/2 } >>align ; inline
|
||||||
|
|
||||||
: roll-button-theme ( button -- button )
|
: roll-button-theme ( button -- button )
|
||||||
f black <solid> dup f <button-paint> >>boundary
|
f black <solid> dup f <button-paint> >>boundary
|
||||||
{ 0 1/2 } >>align ; inline
|
align-left ; inline
|
||||||
|
|
||||||
: <roll-button> ( label quot -- button )
|
: <roll-button> ( label quot -- button )
|
||||||
<button> roll-button-theme ;
|
<button> roll-button-theme ;
|
||||||
|
@ -141,7 +144,8 @@ TUPLE: checkbox < button ;
|
||||||
<checkmark> label-on-right checkbox-theme
|
<checkmark> label-on-right checkbox-theme
|
||||||
[ model>> toggle-model ]
|
[ model>> toggle-model ]
|
||||||
checkbox new-button
|
checkbox new-button
|
||||||
swap >>model ;
|
swap >>model
|
||||||
|
align-left ;
|
||||||
|
|
||||||
M: checkbox model-changed
|
M: checkbox model-changed
|
||||||
swap model-value over (>>selected?) relayout-1 ;
|
swap model-value over (>>selected?) relayout-1 ;
|
||||||
|
@ -179,7 +183,8 @@ TUPLE: radio-control < button value ;
|
||||||
[ [ value>> ] keep set-control-value ]
|
[ [ value>> ] keep set-control-value ]
|
||||||
radio-control new-button
|
radio-control new-button
|
||||||
swap >>model
|
swap >>model
|
||||||
swap >>value ; inline
|
swap >>value
|
||||||
|
align-left ; inline
|
||||||
|
|
||||||
M: radio-control model-changed
|
M: radio-control model-changed
|
||||||
swap model-value
|
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