Handbook
Glossary
struct-c-type
Vocabulary
classes
.
struct
Definition
USING:
alien.c-types
;
IN:
classes.struct
TUPLE:
struct-c-type
<
abstract-c-type
fields return-in-registers?
;
Methods
USING:
alien.c-types
classes.struct
;
M:
struct-c-type
base-type
;
USING:
alien.c-types
classes.struct
compiler.cfg.builder.alien.boxing
compiler.cfg.hats
compiler.cfg.intrinsics.allot
kernel
;
M:
struct-c-type
box
[
heap-size
^^allot-byte-array
dup
^^unbox-byte-array
]
curry
2dip
implode-struct
;
USING:
assocs
classes.struct
compiler.cfg.builder.alien.boxing
cpu.architecture
kernel
sequences
;
M:
struct-c-type
box-parameter
dup
value-struct?
[
[
[
drop
first
]
dip
explode-struct
keys
]
keep
]
unless
box
;
USING:
assocs
classes.struct
compiler.cfg.builder.alien.boxing
cpu.architecture
generic
kernel
namespaces
sequences
;
M:
struct-c-type
box-return
dup
return-struct-in-registers?
[
M\
struct-c-type
box-return
(call-next-method)
]
[
[
[
[
{
}
assert-sequence=
]
bi@
struct-return-area
get
]
dip
explode-struct-return
keys
]
keep
box
]
if
;
USING:
classes.struct
compiler.cfg.builder.alien.boxing
;
M:
struct-c-type
flatten-c-type
flatten-struct-type
;
USING:
classes.struct
compiler.cfg.builder.alien.boxing
;
M:
struct-c-type
flatten-parameter-type
frob-struct
flatten-c-type
;
USING:
classes.struct
compiler.cfg.builder.alien.boxing
cpu.architecture
generic
kernel
;
M:
struct-c-type
load-return
dup
return-struct-in-registers?
[
M\
struct-c-type
load-return
(call-next-method)
]
[
drop
{
}
]
if
;
USING:
alien.c-types
classes.struct
;
M:
struct-c-type
lookup-c-type
;
USING:
classes.struct
compiler.cfg.builder.alien.boxing
compiler.cfg.hats
kernel
;
M:
struct-c-type
unbox
[
^^unbox-any-c-ptr
]
dip
explode-struct
;
USING:
alien.c-types
arrays
assocs
classes.struct
compiler.cfg.builder.alien.boxing
compiler.cfg.hats
cpu.architecture
kernel
layouts
;
M:
struct-c-type
unbox-parameter
dup
value-struct?
[
unbox
]
[
[
nip
heap-size
cell
f
^^local-allot
dup
]
[
[
^^unbox-any-c-ptr
]
dip
explode-struct
keys
]
2bi
implode-struct
1array
{
{
int-rep
f
f
}
}
]
if
;
USING:
assocs
classes.struct
compiler.cfg.builder.alien.boxing
cpu.architecture
generic
kernel
namespaces
;
M:
struct-c-type
unbox-return
dup
return-struct-in-registers?
[
M\
struct-c-type
unbox-return
(call-next-method)
]
[
[
struct-return-area
get
]
2dip
unbox
keys
implode-struct
{
}
{
}
]
if
;