Handbook
Glossary
c-type
Vocabulary
alien
.
c-types
Definition
USING:
cpu.architecture
;
IN:
alien.c-types
TUPLE:
c-type
<
abstract-c-type
boxer unboxer
{
rep
initial:
int-rep
}
;
Methods
USING:
alien.c-types
;
M:
c-type
base-type
;
USING:
accessors
alien.c-types
combinators
compiler.cfg.builder.alien.boxing
compiler.cfg.hats
compiler.cfg.instructions
kernel
layouts
sequences
;
M:
c-type
box
[
[
first
]
bi@
]
[
boxer>>
]
bi*
{
{
"from_float"
[
drop
]
}
{
"from_double"
[
drop
]
}
{
"from_signed_1"
[
drop
char
^^convert-integer
]
}
{
"from_unsigned_1"
[
drop
uchar
^^convert-integer
]
}
{
"from_signed_2"
[
drop
short
^^convert-integer
]
}
{
"from_unsigned_2"
[
drop
ushort
^^convert-integer
]
}
{
"allot_alien"
[
drop
^^box-alien
]
}
[
cell
8
=
[
{
{
~quotation~ ~quotation~
}
{
~quotation~ ~quotation~
}
[
f
]
}
cond
]
[
f
]
if
[
2nip
^^convert-integer
]
[
swap
<gc-map>
^^box
]
if*
]
}
case
;
USING:
alien.c-types
kernel
;
M:
c-type
c-type-copier
drop
[
]
;
USING:
accessors
alien.c-types
;
M:
c-type
c-type-getter
getter>>
;
USING:
accessors
alien.c-types
;
M:
c-type
c-type-rep
rep>>
;
USING:
accessors
alien.c-types
;
M:
c-type
c-type-setter
setter>>
;
USING:
accessors
alien.c-types
arrays
compiler.cfg.builder.alien.boxing
;
M:
c-type
flatten-c-type
rep>>
f
f
3array
1array
record-reg-reps
;
USING:
accessors
alien.c-types
arrays
combinators
compiler.cfg.builder.alien.boxing
compiler.cfg.hats
kernel
layouts
sequences
;
M:
c-type
unbox
[
rep>>
]
[
unboxer>>
]
bi
[
{
{
"to_float"
[
drop
]
}
{
"to_double"
[
drop
]
}
{
"to_signed_1"
[
drop
]
}
{
"to_unsigned_1"
[
drop
]
}
{
"to_signed_2"
[
drop
]
}
{
"to_unsigned_2"
[
drop
]
}
{
"alien_offset"
[
drop
^^unbox-any-c-ptr
]
}
[
dup
{
"to_signed_4"
"to_unsigned_4"
}
member?
[
cell
8
=
not
]
[
t
]
if
[
swap
^^unbox
]
[
2drop
]
if
]
}
case
1array
]
[
drop
f
f
3array
1array
]
2bi
record-reg-reps
;
USING:
alien.c-types
compiler.cfg.builder.alien.boxing
;
M:
c-type
unbox-parameter
unbox
;