1 USING: assocs help.markup help.syntax quotations strings words ;
2 IN: bootstrap.image.primitives
5 { $description "A constant " { $link assoc } " containing all primitives. Keys are vocab names and values are sequences of tuples declaring words. The format of the tuples are { name effect vm-func inputs outputs extra-props }:"
7 { "name: Name of the primitive." }
8 { "effect: The primitives stack effect." }
9 { "vm-func: If it is a " { $link string } " then the primitive will call a function implemented in C++ code. If 'vm-func' is " { $link f } " then it is a sub-primitive and implemented in one of the files in 'basis/bootstrap/assembler/'." }
10 { "inputs: The primitives \"input-classes\", if any." }
11 { "outputs: The primitives \"output-classes\", if any." }
12 { "extra-word: An " { $link word } " that is run with the created word as argument to add extra properties to it. Usually, it would be " { $link make-foldable } " or " { $link make-flushable } " to make the word foldable or flushable respectively." }
15 "See " { $link "word-props" } " for documentation of what all word properties do." ;
18 { $values { "word" word } { "vm-func" $maybe { string } } { "quot" quotation } }
19 { $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." } ;
21 ARTICLE: "bootstrap.image.primitives" "Bootstrap primitives"
22 "This vocab contains utilities for declaring primitives to be added to the bootstrap image. It is used by the file " { $snippet "resource:basis/bootstrap/primitives.factor" }
24 { $link all-primitives } " is an assoc where all primitives are declared. See that constant for a description of the format." ;
26 ABOUT: "bootstrap.image.primitives"