Docs: for compiler, vm and combinators
parent
4f91e9efbb
commit
9c901b9c0e
|
@ -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." }
|
||||
|
|
|
@ -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." } ;
|
|
@ -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" } "."
|
||||
|
|
Loading…
Reference in New Issue