Handbook
Glossary
emit-<array> ( block node -- block' )
Generating instructions for inline memory allocation
Prev:
emit-(byte-array) ( block node -- block' )
Next:
emit-<byte-array> ( block #call -- block' )
Vocabulary
compiler
.
cfg
.
intrinsics
.
allot
Inputs
block
an
object
node
an
object
Outputs
block'
an
object
Definition
USING:
accessors
arrays
compiler.cfg.builder.blocks
compiler.cfg.stacks
compiler.tree.propagation.info
kernel
sequences
;
IN:
compiler.cfg.intrinsics.allot
::
emit-<array>
( block node -- block' )
node
node-input-infos
first
literal>>
:>
len len
expand-<array>?
[
ds-pop
:>
elt len
^^allot-array
:>
reg
ds-drop
len reg
array
store-length
len reg elt
array
store-initial-element
reg
ds-push
block
]
[
block node
emit-primitive
]
if
;