]> gitweb.factorcode.org Git - factor.git/commitdiff
Docs: docs for compiler-related vocabs
authorBjörn Lindqvist <bjourne@gmail.com>
Thu, 8 May 2014 16:50:49 +0000 (18:50 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 11 May 2014 00:13:49 +0000 (17:13 -0700)
basis/compiler/cfg/instructions/instructions-doc.factor
basis/compiler/cfg/instructions/instructions.factor
basis/cpu/architecture/architecture-docs.factor
basis/cpu/architecture/architecture.factor
core/compiler/units/units-docs.factor

index 37b47462e3880801a2e7fbbefbee61fe55b96991..d4c4d8e3394028736ab1da3a2dc6df2864a13d66 100644 (file)
@@ -29,7 +29,7 @@ HELP: ##alien-invoke
 
 HELP: ##set-slot
 { $class-description
-  "An instruction for non-primitive non-immediate variant of " { $link set-slot } ". It has the following slots:"
+  "An instruction for the non-primitive, non-immediate variant of " { $link set-slot } ". It has the following slots:"
   { $table
     { { $slot "src" } { "Object to put in the slot." } }
     { { $slot "obj" } { "Object to set the slot on." } }
@@ -63,3 +63,12 @@ HELP: ##peek
   "Copies a value from a stack location to a machine register."
 }
 { $see-also ##replace } ;
+
+HELP: ##safepoint
+{ $class-description "Instruction that inserts a safe point in the generated code." } ;
+
+HELP: ##return
+{ $class-description "Instruction that returns from a procedure call." } ;
+
+HELP: ##no-tco
+{ $class-description "A dummy instruction that simply inhibits TCO." } ;
index f73d10c960afa58c9ac608337454eecded01e6ae..df6dcf9af3347ba6dfbf77eb14f2d89b2e00f6f9 100644 (file)
@@ -85,7 +85,6 @@ INSN: ##return ;
 
 INSN: ##safepoint ;
 
-! Dummy instruction that simply inhibits TCO
 INSN: ##no-tco ;
 
 ! Jump tables
index bf92698646cc22eb9003b3f2a8fba8db83de348d..b0f08504b098c834cf2f713bdb950918f00ef5e9 100644 (file)
@@ -1,4 +1,4 @@
-USING: assocs cpu.x86.assembler help.markup help.syntax math system ;
+USING: assocs cpu.x86.assembler help.markup help.syntax math system words ;
 IN: cpu.architecture
 
 HELP: immediate-arithmetic?
@@ -17,10 +17,22 @@ HELP: vm-stack-space
 HELP: complex-addressing?
 { $description "Specifies if " { $link %slot } ", " { $link %set-slot } " and " { $link %write-barrier } " accept the 'scale' and 'tag' parameters, and if %load-memory and %store-memory work." } ;
 
+HELP: param-regs
+{ $values { "abi" "a calling convention symbol" } { "regs" assoc } }
+{ $description "Retrieves the order in which machine registers are used for parameters for the given calling convention." } ;
+
 HELP: %load-immediate
 { $values { "reg" "a register symbol" } { "val" "a value" } }
 { $description "Emits code for loading an immediate value into a register. On " { $link x86 } ", if val is 0, then an " { $link XOR } " instruction is emitted instead of " { $link MOV } "." } ;
 
-HELP: param-regs
-{ $values { "abi" "a calling convention symbol" } { "regs" assoc } }
-{ $description "Retrieves the order in which machine registers are used for parameters for the given calling convention." } ;
+HELP: %call
+{ $values { "word" word } }
+{ $description "Emits code for calling a word in Factor." } ;
+
+HELP: fused-unboxing?
+{ $values { "?" "a boolean" } }
+{ $description "Whether this architecture support " { $link %load-float } ", " { $link %load-double } ", and " { $link %load-vector } "." } ;
+
+HELP: return-regs
+{ $values { "regs" assoc } }
+{ $description "What registers that will be used for function return values of which class." } ;
index dea379e86e8b32b28eff00a296a1856a5ef678ed..af55954540395473a301f81bdef322ecd89cab33 100644 (file)
@@ -519,8 +519,6 @@ HOOK: %reload cpu ( dst rep src -- )
 
 HOOK: %loop-entry cpu ( -- )
 
-! Does this architecture support %load-float, %load-double,
-! and %load-vector?
 HOOK: fused-unboxing? cpu ( -- ? )
 
 HOOK: immediate-arithmetic? cpu ( n -- ? )
@@ -548,7 +546,6 @@ M: object immediate-comparand? ( n -- ? )
 
 ! FFI stuff
 
-! Return values of this class go here
 HOOK: return-regs cpu ( -- regs )
 
 ! Registers used for parameter passing
index 8845dae7c22010e29372a99ae76ed7654fc9c4d8..93e8a468ee59c5320f1b4d1d0ac142f8d2406462 100644 (file)
@@ -82,7 +82,7 @@ HELP: modify-code-heap
 { $values { "alist" "an association list with words as keys" } { "update-existing?" "a boolean" } { "reset-pics?" "a boolean" } }
 { $description "Lowest-level primitive for defining words. Associates words with code blocks in the code heap."
 $nl
-"The alist maps words to the following:"
+"The alist maps words to one of the following:"
 { $list
     { "a quotation - in this case, the quotation is compiled with the non-optimizing compiler and the word will call the quotation when executed." }
     { "a 5-element array " { $snippet "{ parameters literals relocation labels code }" } " - in this case, a code heap block is allocated with the given data and the word will call the code block when executed. This is used by the optimizing compiler." }