Handbook
Glossary
primitive-quot ( word vm-func -- quot )
Vocabulary
bootstrap
.
image
.
primitives
Inputs
word
a
word
vm-func
a
$maybe
Outputs
quot
a
quotation
Word description
Creates the defining quotation for the primitive. If 'vm-func' is a string, then it is prefixed with 'primitive_' and a quotation calling that C++ function is generated.
Definition
USING:
alien.strings
io.encodings.ascii
kernel
kernel.private
quotations
sequences
;
IN:
bootstrap.image.primitives
:
primitive-quot
( word vm-func -- quot )
[
nip
"primitive_"
prepend
ascii
string>alien
[
do-primitive
]
curry
]
[
1quotation
]
if*
;