]> gitweb.factorcode.org Git - factor.git/commitdiff
compiler.*: doc improvements
authorBjörn Lindqvist <bjourne@gmail.com>
Wed, 20 Aug 2014 19:14:28 +0000 (21:14 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Fri, 17 Oct 2014 21:17:49 +0000 (23:17 +0200)
basis/compiler/compiler-docs.factor
core/compiler/units/units-docs.factor

index 8e5fb021a0b3393049dc690fa1177e0b7c0ddfa2..b325c7b7b25a8149005554f474ff03fc8617484d 100644 (file)
@@ -54,6 +54,8 @@ $nl
 
 ABOUT: "compiler"
 
+HELP: compiled { $var-description "An " { $link assoc } " used during the compilation process which maps from words to their generated code." } ;
+
 HELP: frontend
 { $values { "word" word } { "tree" sequence } }
 { $description "First step of the compilation process. It outputs a high-level tree in SSA form." } ;
index 35af4a28f107d70b9abb1596311973df97cc173b..18cdca553b108315234d5a50629be6e121513d03 100644 (file)
@@ -91,6 +91,15 @@ $nl
 $nl
 "If classes, methods or generic words were redefined, then inline cache call sites need to be updated as well. Passing " { $link t } " as the " { $snippet "reset-pics?" } " parameter enables this code path."
 }
+{ $examples
+  "Manually creating a word using the non-optimizing compiler:"
+  { $example
+    "USING: compiler.units io ;"
+    "IN: test SYMBOL: foo"
+    "{ { foo [ \"hello!\" write nl ] } } t t modify-code-heap foo"
+    "hello!"
+  }
+}
 { $notes "This word is called at the end of " { $link with-compilation-unit } "." } ;
 
 HELP: compile