Handbook
Glossary
emit-<byte-array> ( block #call -- block' )
Generating instructions for inline memory allocation
Prev:
emit-<array> ( block node -- block' )
Next:
emit-<tuple-boa> ( block #call -- block' )
Vocabulary
compiler
.
cfg
.
intrinsics
.
allot
Inputs
block
current
basic-block
#call
a
node
Outputs
block'
a
basic-block
Word description
Emits optimized cfg instructions for allocating a
byte-array
.
Definition
USING:
accessors
compiler.cfg.builder.blocks
compiler.tree.propagation.info
kernel
sequences
;
IN:
compiler.cfg.intrinsics.allot
::
emit-<byte-array>
( block #call -- block' )
#call
node-input-infos
first
literal>>
dup
expand-<byte-array>?
[
:>
len len
emit-allot-byte-array
:>
reg len reg
zero-byte-array
block
]
[
drop
block #call
emit-primitive
]
if
;