diff --git a/basis/compiler/compiler-docs.factor b/basis/compiler/compiler-docs.factor index c15f54229c..1a357ddda6 100644 --- a/basis/compiler/compiler-docs.factor +++ b/basis/compiler/compiler-docs.factor @@ -54,6 +54,10 @@ $nl ABOUT: "compiler" +HELP: frontend +{ $values { "word" word } { "tree" sequence } } +{ $description "First step of the compilation process. It outputs a high-level tree in SSA form." } ; + HELP: compile-word { $values { "word" word } } { $description "Compile a single word." } diff --git a/basis/vm/vm-docs.factor b/basis/vm/vm-docs.factor new file mode 100644 index 0000000000..908c59cd9a --- /dev/null +++ b/basis/vm/vm-docs.factor @@ -0,0 +1,22 @@ +USING: help.markup help.syntax math strings ; +IN: vm + +HELP: zone +{ $class-description "A struct that defines the memory layout for an allocation zone in the virtual machine. Factor code cannot directly access allocation zones, but the struct is used by the compiler to calculate memory addresses. Its slots are:" + { $table + { { $slot "here" } { "Memory address to the last allocated byte in the zone. Initially, this slot is equal to " { $snippet "start" } " but each allocation in the zone will increment this pointer." } } + { { $slot "start" } { "Memory address to the start of the zone." } } + { { $slot "end" } { "Memory address to the end of the zone." } } + } +} ; + +HELP: vm +{ $class-description "A struct that defines the memory layout of the running virtual machine. It is used by the optimizing compiler to calculate field offsets. Its slots are:" + { $table + { { $slot "nursery" } { "A " { $link zone } " in which all new objects are allocated." } } + } +} ; + +HELP: vm-field-offset +{ $values { "field" string } { "offset" number } } +{ $description "Gets the offset in bytes to the named virtual machine field." } ; diff --git a/core/combinators/combinators-docs.factor b/core/combinators/combinators-docs.factor index e80cc42ee6..b837c10b2b 100644 --- a/core/combinators/combinators-docs.factor +++ b/core/combinators/combinators-docs.factor @@ -376,6 +376,11 @@ HELP: recursive-hashcode { $values { "n" integer } { "obj" object } { "quot" { $quotation ( n obj -- code ) } } { "code" integer } } { $description "A combinator used to implement methods for the " { $link hashcode* } " generic word. If " { $snippet "n" } " is less than or equal to zero, outputs 0, otherwise calls the quotation." } ; +HELP: deep-spread>quot +{ $values { "seq" sequence } { "quot" quotation } } +{ $description "Creates a new quotation from a sequence of quotations that applies each quotation to a stack element in turn." } +{ $see-also spread } ; + HELP: cond>quot { $values { "assoc" "a sequence of pairs of quotations" } { "quot" quotation } } { $description "Creates a quotation that when called, has the same effect as applying " { $link cond } " to " { $snippet "assoc" } "."