Handbook
Glossary
flatten-small-struct ( c-type -- seq )
Vocabulary
cpu
.
x86
.
64
.
unix
Inputs
c-type
an
object
Outputs
seq
an
object
Definition
USING:
alien.c-types
arrays
compiler.cfg.builder.alien.boxing
cpu.architecture
kernel
math
namespaces
sequences
;
IN:
cpu.x86.64.unix
::
flatten-small-struct
( c-type -- seq )
c-type
struct-types&offset
split-struct
[
[
lookup-c-type
c-type-rep
reg-class-of
]
map
int-regs
swap
member?
int-rep
double-rep
?
f
f
3array
]
map
:>
reps
int-reg-reps
get
float-reg-reps
get
and
[
reps
reg-reps
:>
( int-mems float-mems )
int-reg-reps
get
int-mems
+
6
>
float-reg-reps
get
float-mems
+
8
>
or
[
reps
[
first
t
f
3array
]
map
]
[
reps
]
if
]
[
reps
]
if
;