diff --git a/basis/compiler/cfg/branch-splitting/branch-splitting-docs.factor b/basis/compiler/cfg/branch-splitting/branch-splitting-docs.factor new file mode 100644 index 0000000000..fe777f15d5 --- /dev/null +++ b/basis/compiler/cfg/branch-splitting/branch-splitting-docs.factor @@ -0,0 +1,6 @@ +USING: compiler.cfg compiler.cfg.utilities help.markup help.syntax ; +IN: compiler.cfg.branch-splitting + +HELP: clone-basic-block +{ $values { "bb" basic-block } { "bb'" basic-block } } +{ $description "The new block temporarily gets the same RPO number as the old one, until the next time RPO is computed. This is just to make " { $link back-edge? } " work." } ; diff --git a/basis/compiler/cfg/branch-splitting/branch-splitting.factor b/basis/compiler/cfg/branch-splitting/branch-splitting.factor index bcb0a74ed2..40826a921c 100644 --- a/basis/compiler/cfg/branch-splitting/branch-splitting.factor +++ b/basis/compiler/cfg/branch-splitting/branch-splitting.factor @@ -11,9 +11,6 @@ IN: compiler.cfg.branch-splitting [ clone dup rename-insn-temps ] map ; : clone-basic-block ( bb -- bb' ) - ! The new block temporarily gets the same RPO number as the - ! old one, until the next time RPO is computed. This is just - ! to make 'back-edge?' work. swap { diff --git a/basis/compiler/cfg/dataflow-analysis/dataflow-analysis-docs.factor b/basis/compiler/cfg/dataflow-analysis/dataflow-analysis-docs.factor index 4f7081b4da..74fa8fd8ae 100644 --- a/basis/compiler/cfg/dataflow-analysis/dataflow-analysis-docs.factor +++ b/basis/compiler/cfg/dataflow-analysis/dataflow-analysis-docs.factor @@ -25,7 +25,8 @@ HELP: join-sets { "dfa" class } { "set" "merged state" } } -{ $description "Generic word which merges multiple states into one. A block in the cfg might have multiple predecessors and then this word is used to compute the merged input state to use to analyze the block." } ; +{ $description "Generic word which merges multiple states into one. A block in the cfg might have multiple predecessors and then this word is used to compute the merged input state to use to analyze the block." } +{ $see-also transfer-set } ; > byte-array? ] } 1&& ; -! When a literal zeroes/ones vector is unboxed, we replace the ##load-reference -! with a ##zero-vector or ##fill-vector instruction since this is more efficient. : convert-to-zero-vector? ( insn -- ? ) { [ dst>> rep-of vector-rep? ] diff --git a/basis/compiler/cfg/stacks/map/map-docs.factor b/basis/compiler/cfg/stacks/map/map-docs.factor new file mode 100644 index 0000000000..bb0a172014 --- /dev/null +++ b/basis/compiler/cfg/stacks/map/map-docs.factor @@ -0,0 +1,6 @@ +USING: assocs compiler.cfg help.markup help.syntax ; +IN: compiler.cfg.stacks.map + +HELP: trace-stack-state +{ $values { "cfg" cfg } { "assoc" assoc } } +{ $description "Outputs an assoc with the instruction numbers as keys and as values two tuples of the data and retain stacks shapes before that instruction. All instructions in the cfg gets numbered as a side-effect." } ; diff --git a/basis/compiler/cfg/stacks/map/map.factor b/basis/compiler/cfg/stacks/map/map.factor index 10f62d4dc1..fb458431e8 100644 --- a/basis/compiler/cfg/stacks/map/map.factor +++ b/basis/compiler/cfg/stacks/map/map.factor @@ -41,8 +41,10 @@ M: ##replace-imm visit-insn mark-location ; M: ##replace visit-insn mark-location ; M: ##call visit-insn ( state insn -- state' ) - ! After a word call, we can't trust any overinitialized locations - ! to contain valid pointers anymore. + ! A call instruction may increase the stack height. Then issue a + ! minor-gc with some of the stack locations scrubbed which would + ! overwrite the overinitialized locations we're tracking. That is + ! why they need to be cleared here. drop [ first2 [ 0 >= ] filter 2array ] map ; ERROR: vacant-peek insn ; diff --git a/basis/compiler/constants/constants-docs.factor b/basis/compiler/constants/constants-docs.factor new file mode 100644 index 0000000000..567dcfb612 --- /dev/null +++ b/basis/compiler/constants/constants-docs.factor @@ -0,0 +1,15 @@ +USING: compiler.codegen.relocation help.markup help.syntax ; +IN: compiler.constants + +HELP: rt-cards-offset +{ $description "Relocation offset type for the cards table." } +{ $see-also rel-cards-offset } ; + +HELP: rt-decks-offset +{ $description "Relocation offset type for the decks table." } +{ $see-also rel-decks-offset } ; + + +ARTICLE: "compiler.constants" "VM memory layout constants" "Common constants" ; + +ABOUT: "compiler.constants"