Handbook
Glossary
store-struct-component ( value src offset rep type -- )
Vocabulary
compiler
.
cfg
.
builder
.
alien
.
boxing
Inputs
value
an
object
src
an
object
offset
an
object
rep
an
object
type
an
object
Outputs
None
Definition
IN:
compiler.cfg.builder.alien.boxing
GENERIC:
store-struct-component
( value src offset rep type -- )
Methods
USING:
compiler.cfg.builder.alien.boxing
compiler.cfg.instructions
kernel
;
M:
object
store-struct-component
##store-memory-imm,
;
USING:
accessors
alien.c-types
compiler.cfg.builder.alien.boxing
compiler.cfg.hats
compiler.cfg.instructions
cpu.architecture
math
sequences
;
M::
partial-struct-cell
store-struct-component
( value src offset rep part -- )
part
size>>
<iota>
[|
index |
value index 8
*
^^shr-imm
src offset index
+
int-rep
uchar
##store-memory-imm,
]
each
;
USING:
accessors
alien.c-types
classes.struct
compiler.cfg.builder.alien.boxing
compiler.cfg.hats
compiler.cfg.instructions
cpu.architecture
kernel
math
math.order
sequences
;
M::
struct-bit-slot-spec
store-struct-component
( value src offset rep field -- )
field
offset>>
8
mod
:>
start field
bits>>
:>
bits start bits
+
8
align
8
/i
<iota>
[|
index |
start index 8
*
-
0
max
:>
low start bits
+
index 8
*
-
8
min
:>
high 1 high low
-
shift
1
-
low
shift
:>
mask src offset index
+
int-rep
uchar
^^load-memory-imm
mask
bitnot
^^and-imm
:>
old index 8
*
start
-
:>
shift value shift 0
<
[
shift
neg
^^shl-imm
]
[
shift
^^shr-imm
]
if
mask
^^and-imm
old
swap
^^or
src offset index
+
int-rep
uchar
##store-memory-imm,
]
each
;