update some more MACRO: effects.
parent
aa4ed0b4f4
commit
c25fb5f55e
|
@ -3,7 +3,7 @@ IN: compiler.tests.redefine13
|
||||||
|
|
||||||
: breakage-word ( a b -- c ) + ;
|
: breakage-word ( a b -- c ) + ;
|
||||||
|
|
||||||
<< MACRO: breakage-macro ( a -- ) '[ _ breakage-word ] ; >>
|
<< MACRO: breakage-macro ( a -- quot ) '[ _ breakage-word ] ; >>
|
||||||
|
|
||||||
GENERIC: breakage-caller ( a -- c )
|
GENERIC: breakage-caller ( a -- c )
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ M: float-4-rep copy-register* drop MOVAPS ;
|
||||||
M: double-2-rep copy-register* drop MOVAPS ;
|
M: double-2-rep copy-register* drop MOVAPS ;
|
||||||
M: vector-rep copy-register* drop MOVDQA ;
|
M: vector-rep copy-register* drop MOVDQA ;
|
||||||
|
|
||||||
MACRO: available-reps ( alist -- )
|
MACRO: available-reps ( alist -- quot )
|
||||||
! Each SSE version adds new representations and supports
|
! Each SSE version adds new representations and supports
|
||||||
! all old ones
|
! all old ones
|
||||||
unzip { } [ append ] accumulate rest swap suffix
|
unzip { } [ append ] accumulate rest swap suffix
|
||||||
|
|
|
@ -107,7 +107,7 @@ MACRO: printf ( format-string -- quot )
|
||||||
@ output-stream get [ stream-write ] curry _ napply
|
@ output-stream get [ stream-write ] curry _ napply
|
||||||
] ;
|
] ;
|
||||||
|
|
||||||
MACRO: sprintf ( format-string -- result )
|
MACRO: sprintf ( format-string -- quot )
|
||||||
printf-quot '[
|
printf-quot '[
|
||||||
@ _ "" nappend-as
|
@ _ "" nappend-as
|
||||||
] ;
|
] ;
|
||||||
|
|
|
@ -15,7 +15,7 @@ xinput-game-input-backend game-input-backend set-global
|
||||||
255 /f ; inline
|
255 /f ; inline
|
||||||
: >vibration ( float -- short )
|
: >vibration ( float -- short )
|
||||||
65535 * >fixnum 0 65535 clamp ; inline
|
65535 * >fixnum 0 65535 clamp ; inline
|
||||||
MACRO: map-index-compose ( seq quot -- seq )
|
MACRO: map-index-compose ( seq quot -- quot' )
|
||||||
'[ '[ _ execute _ ] _ compose ] map-index 1quotation ;
|
'[ '[ _ execute _ ] _ compose ] map-index 1quotation ;
|
||||||
|
|
||||||
: fill-buttons ( button-bitmap -- button-array )
|
: fill-buttons ( button-bitmap -- button-array )
|
||||||
|
|
|
@ -281,7 +281,7 @@ DEFER: __
|
||||||
: [matches?] ( quot -- undoes?-quot )
|
: [matches?] ( quot -- undoes?-quot )
|
||||||
[undo] dup infer [ true-out ] [ false-recover ] bi curry ;
|
[undo] dup infer [ true-out ] [ false-recover ] bi curry ;
|
||||||
|
|
||||||
MACRO: matches? ( quot -- ? ) [matches?] ;
|
MACRO: matches? ( quot -- quot' ) [matches?] ;
|
||||||
|
|
||||||
ERROR: no-match ;
|
ERROR: no-match ;
|
||||||
M: no-match summary drop "Fall through in switch" ;
|
M: no-match summary drop "Fall through in switch" ;
|
||||||
|
|
|
@ -8,7 +8,7 @@ IN: windows.com.syntax
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
MACRO: com-invoke ( n return parameters -- )
|
MACRO: com-invoke ( n return parameters -- quot )
|
||||||
[ 2nip length ] 3keep
|
[ 2nip length ] 3keep
|
||||||
'[
|
'[
|
||||||
_ npick void* deref _ cell * alien-cell _ _
|
_ npick void* deref _ cell * alien-cell _ _
|
||||||
|
|
|
@ -169,7 +169,7 @@ M: tag like
|
||||||
rot dup [ V{ } like ] when <tag>
|
rot dup [ V{ } like ] when <tag>
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
MACRO: clone-slots ( class -- tuple )
|
MACRO: clone-slots ( class -- quot )
|
||||||
[
|
[
|
||||||
"slots" word-prop
|
"slots" word-prop
|
||||||
[ name>> reader-word '[ _ execute clone ] ] map
|
[ name>> reader-word '[ _ execute clone ] ] map
|
||||||
|
|
|
@ -37,7 +37,7 @@ CONSTANT: data
|
||||||
{ "heth" f }
|
{ "heth" f }
|
||||||
}
|
}
|
||||||
|
|
||||||
MACRO: case-probas ( data -- case-probas )
|
MACRO: case-probas ( data -- quot )
|
||||||
[ first2 [ swap 1quotation 2array ] [ 1quotation ] if* ] map 1quotation ;
|
[ first2 [ swap 1quotation 2array ] [ 1quotation ] if* ] map 1quotation ;
|
||||||
|
|
||||||
: expected ( name data -- float )
|
: expected ( name data -- float )
|
||||||
|
|
Loading…
Reference in New Issue