]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.cfg.*: a little more docs
authorBjörn Lindqvist <bjourne@gmail.com>
Mon, 16 Mar 2015 09:00:21 +0000 (09:00 +0000)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 29 Apr 2015 16:31:54 +0000 (09:31 -0700)
basis/compiler/cfg/block-joining/block-joining-docs.factor
basis/compiler/cfg/block-joining/block-joining.factor
basis/compiler/cfg/builder/builder.factor
basis/compiler/cfg/representations/peephole/peephole-docs.factor
basis/compiler/cfg/stacks/vacant/vacant-docs.factor
basis/compiler/codegen/relocation/relocation-docs.factor
basis/compiler/codegen/relocation/relocation.factor
basis/compiler/tree/propagation/call-effect/call-effect-docs.factor

index c16e6b46fa230add2bfef17c562b6b3a0645283f..54564ca7b260644ac0b7b88eaa82f6c7407c982b 100644 (file)
@@ -1,6 +1,11 @@
-USING: compiler.cfg help.markup help.syntax ;
+USING: compiler.cfg compiler.cfg.instructions help.markup help.syntax ;
 IN: compiler.cfg.block-joining
 
 HELP: join-block?
 { $values { "bb" basic-block } { "?" "a boolean" } }
 { $description "Whether the block can be joined with its predecessor or not." } ;
+
+ARTICLE: "compiler.cfg.block-joining" "Block Joining"
+"Joining blocks that are not calls and are connected by a single CFG edge. This pass does not update " { $link ##phi } " nodes and should therefore only run before stack analysis." ;
+
+ABOUT: "compiler.cfg.block-joining"
index 7ae7631042e72837b13867aa828d37db8744b958..d877765a74eac014b2e5820c0d214f29a548c485 100644 (file)
@@ -5,9 +5,6 @@ compiler.cfg compiler.cfg.predecessors compiler.cfg.rpo
 compiler.cfg.utilities kernel sequences ;
 IN: compiler.cfg.block-joining
 
-! Joining blocks that are not calls and are connected by a single CFG edge.
-! This pass does not update ##phi nodes and should therefore only run
-! before stack analysis.
 : join-block? ( bb -- ? )
     {
         [ kill-block?>> not ]
index 0837e9bbcf8844c4c1cef4ec56404e99c6ac9dd7..859366d09cd6bf43640f6304bb3c2b4eb29dc902 100644 (file)
@@ -95,7 +95,7 @@ M: #recursive emit-node
     dup label>> loop?>> [ emit-loop ] [ emit-recursive ] if ;
 
 ! #if
-: emit-branch ( obj -- final-bb )
+: emit-branch ( obj -- pair/f )
     [ emit-nodes ] with-branch ;
 
 : emit-if ( node -- )
index 982230de7499e7c6beea7580f99e1ff194abf298..89455a36fa8ee766643c5b87f09601facb234ea1 100644 (file)
@@ -2,7 +2,7 @@ USING: compiler.cfg.instructions help.markup help.syntax ;
 IN: compiler.cfg.representations.peephole
 
 HELP: convert-to-zero-vector?
-{ $values { "insn" insn } }
+{ $values { "insn" insn } { "?" "a boolean" } }
 { $description "When a literal zeroes/ones vector is unboxed, we replace the " { $link ##load-reference } " with a " { $link ##zero-vector } " or " { $link ##fill-vector } " instruction since this is more efficient." } ;
 
 
index 1f0fdee366cfe385dbd6c36aae4b4de3816d29bb..45e8a5f634c82947fb687cce4f4660112556e8ed 100644 (file)
@@ -18,7 +18,7 @@ HELP: fill-gc-maps
 { $description "Populates the scrub-d, check-d, scrub-r and check-r slots of all gc maps in the cfg." } ;
 
 HELP: state>gc-data
-{ $values { "state" } { "gc-data" } }
+{ $values { "state" sequence } { "gc-data" sequence } }
 { $description "Takes a stack state on the format given by " { $link trace-stack-state } " and emits an array containing two bit-patterns with locations on the data and retain stacks to scrub." } ;
 
 HELP: vacant>bits
index 145b1d50c3043501db8a1465333c811fed0a6e48..2cf1615d495044aeb9b59f4bbdb38ff67e7ecde8 100644 (file)
@@ -40,3 +40,8 @@ HELP: compiled-offset
     "t\nt"
   }
 } ;
+
+ARTICLE: "compiler.codegen.relocation" "Relocatable VM objects"
+"The " { $vocab-link "compiler.codegen.relocation" } " deals with assigning memory addresses to VM objects, such as the card table. Those objects have different addresses during each execution which is why they are \"relocatable\". The vocab is shared by the optimizing and non-optimizing compiler." ;
+
+ABOUT: "compiler.codegen.relocation"
index 2a4447fa5578cf9494ecfc58bb5c0c5e25e685ae..50b0726d4d010a9dfef2ced0ab0cc630c3b96c6a 100644 (file)
@@ -5,12 +5,6 @@ compiler.constants kernel make math math.bitwise memoize
 namespaces sequences ;
 IN: compiler.codegen.relocation
 
-! Common code shared by optimizing and non-optimizing compilers.
-! Should not have too many dependencies on the rest of the
-! optimizing compiler.
-
-! Code is compiled into the 'make' vector.
-
 SYMBOL: extra-offset  ! Only used by non-optimizing compiler
 
 : compiled-offset ( -- n )
@@ -35,7 +29,6 @@ SYMBOL: literal-table
 
 : add-literal ( obj -- ) literal-table get push ;
 
-! Relocation table
 SYMBOL: relocation-table
 
 : push-uint ( value vector -- )
index e727ed927dfe4af9065dd5e40a3c5b1e6a594715..f14ac854552f636292f8eb03d373a831a862cd2e 100644 (file)
@@ -23,7 +23,7 @@ HELP: call-effect-unsafe?
 { $description "Checks if the given effect is safe with regards to the cached one." } ;
 
 HELP: update-inline-cache
-{ $values { "word/quot" } { "ic" inline-cache } }
+{ $values { "word/quot" "word or quotation" } { "ic" inline-cache } }
 { $description "Sets the inline caches " { $slot "value" } " to the given word/quot and updates its " { $slot "counter" } " to the value of the " { $link effect-counter } "." } ;