Eliminate more tuck usages

db4
Slava Pestov 2009-02-02 16:11:16 -06:00
parent 40ca08ce35
commit aa331e451b
3 changed files with 5 additions and 5 deletions

View File

@ -32,7 +32,7 @@ DEFER: plist>
[ plist> ] NSFastEnumeration-map ;
: (plist-NSDictionary>) ( NSDictionary -- hashtable )
dup [ tuck -> valueForKey: [ plist> ] bi@ 2array ] with
dup [ [ nip ] [ -> valueForKey: ] 2bi [ plist> ] bi@ 2array ] with
NSFastEnumeration-map >hashtable ;
: (read-plist) ( NSData -- id )

View File

@ -97,7 +97,7 @@ TUPLE: signal n ;
dup WIFEXITED [ WEXITSTATUS ] [ WTERMSIG signal boa ] if ;
M: unix wait-for-processes ( -- ? )
-1 0 <int> tuck WNOHANG waitpid
0 <int> -1 over WNOHANG waitpid
dup 0 <= [
2drop t
] [

View File

@ -151,8 +151,8 @@ TUPLE: compose-state i str char after last-class ;
DEFER: compose-iter
: try-noncombining ( char state -- state )
tuck char>> swap combine-chars
: try-noncombining ( state char -- state )
[ drop ] [ [ char>> ] dip combine-chars ] 2bi
[ >>char to f >>last-class compose-iter ] when* ; inline
: compose-iter ( state -- state )
@ -161,7 +161,7 @@ DEFER: compose-iter
{ f [ drop ] }
{ 0 [
over last-class>>
[ drop ] [ swap try-noncombining ] if ] }
[ drop ] [ try-noncombining ] if ] }
[ try-compose to compose-iter ]
} case
] when* ; inline recursive