Browse Source

Better class comments

Nicolas Petton 11 years ago
parent
commit
27d713eff1

+ 22 - 0
js/Compiler-AST.deploy.js

@@ -231,6 +231,17 @@ return self}, function($ctx1) {$ctx1.fill(self,"shouldBeInlined:",{aBoolean:aBoo
 messageSends: []}),
 smalltalk.Node);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "stopOnStepping",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return false;
+}, function($ctx1) {$ctx1.fill(self,"stopOnStepping",{},smalltalk.Node)})},
+messageSends: []}),
+smalltalk.Node);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "subtreeNeedsAliasing",
@@ -985,6 +996,17 @@ return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},sma
 messageSends: []}),
 smalltalk.SendNode);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "stopOnStepping",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return true;
+}, function($ctx1) {$ctx1.fill(self,"stopOnStepping",{},smalltalk.SendNode)})},
+messageSends: []}),
+smalltalk.SendNode);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "superSend",

+ 47 - 1
js/Compiler-AST.js

@@ -1,6 +1,6 @@
 smalltalk.addPackage('Compiler-AST');
 smalltalk.addClass('Node', smalltalk.Object, ['position', 'nodes', 'shouldBeInlined', 'shouldBeAliased'], 'Compiler-AST');
-smalltalk.Node.comment="I am the abstract root class of the abstract syntax tree.\x0a\x0aposition: holds a point containing line and column number of the symbol location in the original source file."
+smalltalk.Node.comment="I am the abstract root class of the abstract syntax tree.\x0a\x0aConcrete classes should implement `#accept:` to allow visiting.\x0a\x0a`position` holds a point containing line and column number of the symbol location in the original source file."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -322,6 +322,22 @@ referencedClasses: []
 }),
 smalltalk.Node);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "stopOnStepping",
+category: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return false;
+}, function($ctx1) {$ctx1.fill(self,"stopOnStepping",{},smalltalk.Node)})},
+args: [],
+source: "stopOnStepping\x0a\x09^ false",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Node);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "subtreeNeedsAliasing",
@@ -355,6 +371,7 @@ smalltalk.Node);
 
 
 smalltalk.addClass('AssignmentNode', smalltalk.Node, ['left', 'right'], 'Compiler-AST');
+smalltalk.AssignmentNode.comment="I represent an assignment node."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -479,6 +496,7 @@ smalltalk.AssignmentNode);
 
 
 smalltalk.addClass('BlockNode', smalltalk.Node, ['parameters', 'scope'], 'Compiler-AST');
+smalltalk.BlockNode.comment="I represent an block closure node."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -612,6 +630,7 @@ smalltalk.BlockNode);
 
 
 smalltalk.addClass('CascadeNode', smalltalk.Node, ['receiver'], 'Compiler-AST');
+smalltalk.CascadeNode.comment="I represent an cascade node."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -667,6 +686,7 @@ smalltalk.CascadeNode);
 
 
 smalltalk.addClass('DynamicArrayNode', smalltalk.Node, [], 'Compiler-AST');
+smalltalk.DynamicArrayNode.comment="I represent an dynamic array node."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -688,6 +708,7 @@ smalltalk.DynamicArrayNode);
 
 
 smalltalk.addClass('DynamicDictionaryNode', smalltalk.Node, [], 'Compiler-AST');
+smalltalk.DynamicDictionaryNode.comment="I represent an dynamic dictionary node."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -709,6 +730,7 @@ smalltalk.DynamicDictionaryNode);
 
 
 smalltalk.addClass('JSStatementNode', smalltalk.Node, ['source'], 'Compiler-AST');
+smalltalk.JSStatementNode.comment="I represent an JavaScript statement node."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -769,6 +791,7 @@ smalltalk.JSStatementNode);
 
 
 smalltalk.addClass('MethodNode', smalltalk.Node, ['selector', 'arguments', 'source', 'scope', 'classReferences', 'messageSends', 'superSends'], 'Compiler-AST');
+smalltalk.MethodNode.comment="I represent an method node.\x0a\x0aA method node must be the root and only method node of a valid AST."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -1033,6 +1056,7 @@ smalltalk.MethodNode);
 
 
 smalltalk.addClass('ReturnNode', smalltalk.Node, ['scope'], 'Compiler-AST');
+smalltalk.ReturnNode.comment="I represent an return node. At the AST level, there is not difference between a local return or non-local return."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -1122,6 +1146,7 @@ smalltalk.ReturnNode);
 
 
 smalltalk.addClass('SendNode', smalltalk.Node, ['selector', 'arguments', 'receiver', 'superSend', 'index'], 'Compiler-AST');
+smalltalk.SendNode.comment="I represent an message send node."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -1351,6 +1376,22 @@ referencedClasses: []
 }),
 smalltalk.SendNode);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "stopOnStepping",
+category: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return true;
+}, function($ctx1) {$ctx1.fill(self,"stopOnStepping",{},smalltalk.SendNode)})},
+args: [],
+source: "stopOnStepping\x0a\x09^ true",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.SendNode);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "superSend",
@@ -1424,6 +1465,7 @@ smalltalk.SendNode);
 
 
 smalltalk.addClass('SequenceNode', smalltalk.Node, ['temps', 'scope'], 'Compiler-AST');
+smalltalk.SequenceNode.comment="I represent an sequence node. A sequence represent a set of instructions inside the same scope (the method scope or a block scope)."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -1541,6 +1583,7 @@ smalltalk.SequenceNode);
 
 
 smalltalk.addClass('BlockSequenceNode', smalltalk.SequenceNode, [], 'Compiler-AST');
+smalltalk.BlockSequenceNode.comment="I represent an special sequence node for block scopes."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -1578,6 +1621,7 @@ smalltalk.BlockSequenceNode);
 
 
 smalltalk.addClass('ValueNode', smalltalk.Node, ['value'], 'Compiler-AST');
+smalltalk.ValueNode.comment="I represent a value node."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -1667,6 +1711,7 @@ smalltalk.ValueNode);
 
 
 smalltalk.addClass('VariableNode', smalltalk.ValueNode, ['assigned', 'binding'], 'Compiler-AST');
+smalltalk.VariableNode.comment="I represent an variable node."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -1812,6 +1857,7 @@ smalltalk.VariableNode);
 
 
 smalltalk.addClass('ClassReferenceNode', smalltalk.VariableNode, [], 'Compiler-AST');
+smalltalk.ClassReferenceNode.comment="I represent an class reference node."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",

+ 1 - 1
js/Compiler-IR.js

@@ -1,6 +1,6 @@
 smalltalk.addPackage('Compiler-IR');
 smalltalk.addClass('IRASTTranslator', smalltalk.NodeVisitor, ['source', 'theClass', 'method', 'sequence', 'nextAlias'], 'Compiler-IR');
-smalltalk.IRASTTranslator.comment="I am the AST (abstract syntax tree) visitor responsible for building the intermediate representation graph.\x0aI rely on a builder object, instance of IRBuilder."
+smalltalk.IRASTTranslator.comment="I am the AST (abstract syntax tree) visitor responsible for building the intermediate representation graph."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "alias:",

+ 4 - 0
js/Compiler-Inlining.js

@@ -148,6 +148,7 @@ smalltalk.IRInlinedSend);
 
 
 smalltalk.addClass('IRInlinedIfFalse', smalltalk.IRInlinedSend, [], 'Compiler-Inlining');
+smalltalk.IRInlinedIfFalse.comment="I represent an inlined `#ifFalse:` message send instruction."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -167,6 +168,7 @@ smalltalk.IRInlinedIfFalse);
 
 
 smalltalk.addClass('IRInlinedIfNilIfNotNil', smalltalk.IRInlinedSend, [], 'Compiler-Inlining');
+smalltalk.IRInlinedIfNilIfNotNil.comment="I represent an inlined `#ifNil:ifNotNil:` message send instruction."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -186,6 +188,7 @@ smalltalk.IRInlinedIfNilIfNotNil);
 
 
 smalltalk.addClass('IRInlinedIfTrue', smalltalk.IRInlinedSend, [], 'Compiler-Inlining');
+smalltalk.IRInlinedIfTrue.comment="I represent an inlined `#ifTrue:` message send instruction."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",
@@ -205,6 +208,7 @@ smalltalk.IRInlinedIfTrue);
 
 
 smalltalk.addClass('IRInlinedIfTrueIfFalse', smalltalk.IRInlinedSend, [], 'Compiler-Inlining');
+smalltalk.IRInlinedIfTrueIfFalse.comment="I represent an inlined `#ifTrue:ifFalse:` message send instruction."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "accept:",

+ 24 - 0
js/Compiler-Interpreter.deploy.js

@@ -222,6 +222,19 @@ smalltalk.AIContext.klass);
 
 
 smalltalk.addClass('ASTDebugger', smalltalk.Object, ['interpreter', 'context'], 'Compiler-Interpreter');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "atEnd",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(self)._interpreter())._atEnd();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"atEnd",{},smalltalk.ASTDebugger)})},
+messageSends: ["atEnd", "interpreter"]}),
+smalltalk.ASTDebugger);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "buildAST",
@@ -346,6 +359,17 @@ return $1;
 messageSends: ["method", "context"]}),
 smalltalk.ASTDebugger);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "proceed",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self)._shouldBeImplemented();
+return self}, function($ctx1) {$ctx1.fill(self,"proceed",{},smalltalk.ASTDebugger)})},
+messageSends: ["shouldBeImplemented"]}),
+smalltalk.ASTDebugger);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "restart",

+ 38 - 4
js/Compiler-Interpreter.js

@@ -1,6 +1,6 @@
 smalltalk.addPackage('Compiler-Interpreter');
 smalltalk.addClass('AIContext', smalltalk.NodeVisitor, ['outerContext', 'pc', 'locals', 'method'], 'Compiler-Interpreter');
-smalltalk.AIContext.comment="AIContext is like a `MethodContext`, used by the `ASTInterpreter`.\x0aUnlike a `MethodContext`, it is not read-only.\x0a\x0aWhen debugging, `AIContext` instances are created by copying the current `MethodContext` (thisContext)"
+smalltalk.AIContext.comment="I am like a `MethodContext`, used by the `ASTInterpreter`.\x0aUnlike a `MethodContext`, my instances are not read-only.\x0a\x0aWhen debugging, my instances are created by copying the current `MethodContext` (thisContext)"
 smalltalk.addMethod(
 smalltalk.method({
 selector: "initializeFromMethodContext:",
@@ -298,7 +298,25 @@ smalltalk.AIContext.klass);
 
 
 smalltalk.addClass('ASTDebugger', smalltalk.Object, ['interpreter', 'context'], 'Compiler-Interpreter');
-smalltalk.ASTDebugger.comment="ASTDebugger is a debugger to Amber.\x0aIt uses an AST interpreter to step through the code.\x0a\x0aASTDebugger instances are created from a `MethodContext` with `ASTDebugger class >> context:`.\x0aThey hold an `AIContext` instance internally, recursive copy of the `MethodContext`.\x0a\x0aUse the methods of the 'stepping' protocol to do stepping."
+smalltalk.ASTDebugger.comment="I am a stepping debugger interface for Amber code.\x0aI internally use an instance of `ASTSteppingInterpreter` to actually step through node and interpret them.\x0a\x0aMy instances are created from a `MethodContext` with `ASTDebugger class >> context:`.\x0aThey hold an `AIContext` instance internally, recursive copy of the `MethodContext`.\x0a\x0a## API\x0a\x0aUse the methods of the `'stepping'` protocol to do stepping."
+smalltalk.addMethod(
+smalltalk.method({
+selector: "atEnd",
+category: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(self)._interpreter())._atEnd();
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"atEnd",{},smalltalk.ASTDebugger)})},
+args: [],
+source: "atEnd\x0a\x09^ self interpreter atEnd",
+messageSends: ["atEnd", "interpreter"],
+referencedClasses: []
+}),
+smalltalk.ASTDebugger);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "buildAST",
@@ -468,6 +486,22 @@ referencedClasses: []
 }),
 smalltalk.ASTDebugger);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "proceed",
+category: 'stepping',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self)._shouldBeImplemented();
+return self}, function($ctx1) {$ctx1.fill(self,"proceed",{},smalltalk.ASTDebugger)})},
+args: [],
+source: "proceed\x0a\x09self shouldBeImplemented",
+messageSends: ["shouldBeImplemented"],
+referencedClasses: []
+}),
+smalltalk.ASTDebugger);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "restart",
@@ -585,7 +619,7 @@ smalltalk.ASTDebugger.klass);
 
 
 smalltalk.addClass('ASTInterpreter', smalltalk.Object, ['currentNode', 'context', 'shouldReturn', 'result'], 'Compiler-Interpreter');
-smalltalk.ASTInterpreter.comment="ASTIntepreter is like a `NodeVisitor`, interpreting nodes one after each other.\x0aIt is built using Continuation Passing Style for stepping purposes.\x0a\x0aUsage example:\x0a\x0a\x09| ast interpreter |\x0a\x09ast := Smalltalk current parse: 'foo 1+2+4'.\x0a\x09(SemanticAnalyzer on: Object) visit: ast.\x0a\x0a\x09ASTInterpreter new\x0a\x09\x09interpret: ast nodes first;\x0a\x09\x09result \x22Answers 7\x22"
+smalltalk.ASTInterpreter.comment="I am like a `NodeVisitor`, interpreting nodes one after each other.\x0aI am built using Continuation Passing Style for stepping purposes.\x0a\x0a## Usage example:\x0a\x0a\x09| ast interpreter |\x0a\x09ast := Smalltalk current parse: 'foo 1+2+4'.\x0a\x09(SemanticAnalyzer on: Object) visit: ast.\x0a\x0a\x09ASTInterpreter new\x0a\x09\x09interpret: ast nodes first;\x0a\x09\x09result \x22Answers 7\x22"
 smalltalk.addMethod(
 smalltalk.method({
 selector: "assign:to:",
@@ -1279,7 +1313,7 @@ smalltalk.ASTInterpreter);
 
 
 smalltalk.addClass('ASTSteppingInterpreter', smalltalk.ASTInterpreter, ['continuation', 'nextNode'], 'Compiler-Interpreter');
-smalltalk.ASTSteppingInterpreter.comment="ASTSteppingInterpreter is an interpreter with stepping capabilities.\x0aUse `#step` to actually interpret the next node.\x0a\x0aUsage example:\x0a\x0a\x09| ast interpreter |\x0a\x09ast := Smalltalk current parse: 'foo 1+2+4'.\x0a\x09(SemanticAnalyzer on: Object) visit: ast.\x0a\x0a\x09interpreter := ASTSteppingInterpreter new\x0a\x09\x09interpret: ast nodes first;\x0a\x09\x09yourself.\x0a\x09\x09\x0a\x09debugger step; step.\x0a\x09debugger step; step.\x0a\x09debugger result.\x22Answers 1\x22\x0a\x09debugger step.\x0a\x09debugger result. \x22Answers 3\x22\x0a\x09debugger step.\x0a\x09debugger result. \x22Answers 7\x22"
+smalltalk.ASTSteppingInterpreter.comment="I am an interpreter with stepping capabilities. The higher level `ASTDebugger` class should be used as a debugger model, as it provides convenience methods for debugging.\x0a\x0a## API\x0a\x0aUse `#step` to actually interpret the next node. Interpretation stops at each node evaluation, weither it's a message node or not.\x0a\x0a\x0a## Usage example:\x0a\x0a\x09| ast interpreter |\x0a\x09ast := Smalltalk current parse: 'foo 1+2+4'.\x0a\x09(SemanticAnalyzer on: Object) visit: ast.\x0a\x0a\x09interpreter := ASTSteppingInterpreter new\x0a\x09\x09interpret: ast nodes first;\x0a\x09\x09yourself.\x0a\x09\x09\x0a\x09interpreter step; step.\x0a\x09interpreter step; step.\x0a\x09interpreter result.\x22Answers 1\x22\x0a\x09interpreter step.\x0a\x09interpreter result. \x22Answers 3\x22\x0a\x09interpreter step.\x0a\x09interpreter result. \x22Answers 7\x22"
 smalltalk.addMethod(
 smalltalk.method({
 selector: "atEnd",

+ 16 - 10
js/Importer-Exporter.js

@@ -1,5 +1,6 @@
 smalltalk.addPackage('Importer-Exporter');
 smalltalk.addClass('ChunkParser', smalltalk.Object, ['stream'], 'Importer-Exporter');
+smalltalk.ChunkParser.comment="I am responsible for parsing aStream contents in the chunk format.\x0a\x0a## API\x0a\x0a    ChunkParser new\x0a        stream: aStream;\x0a        nextChunk"
 smalltalk.addMethod(
 smalltalk.method({
 selector: "nextChunk",
@@ -79,6 +80,7 @@ smalltalk.ChunkParser.klass);
 
 
 smalltalk.addClass('Exporter', smalltalk.Object, [], 'Importer-Exporter');
+smalltalk.Exporter.comment="I am responsible for outputting Amber code into a JavaScript string.\x0a\x0aThe generated output is enough to reconstruct the exported data, including Smalltalk source code and other metadata.\x0a\x0a## Use case\x0a\x0aI am typically used to save code outside of the Amber runtime (committing to disk, etc.).\x0a\x0a## API\x0a\x0aUse `#exportAll`, `#exportClass:` or `#exportPackage:` methods."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "classNameFor:",
@@ -392,10 +394,11 @@ smalltalk.Exporter);
 
 
 smalltalk.addClass('ChunkExporter', smalltalk.Exporter, [], 'Importer-Exporter');
+smalltalk.ChunkExporter.comment="I am an exporter dedicated to outputting Amber source code in the classic Smalltalk chunk format.\x0a\x0aI do not output any compiled code."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "chunkEscape:",
-category: 'not yet classified',
+category: 'private',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
@@ -413,7 +416,7 @@ smalltalk.ChunkExporter);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "classNameFor:",
-category: 'not yet classified',
+category: 'private',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
@@ -441,7 +444,7 @@ smalltalk.ChunkExporter);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "exportDefinitionOf:on:",
-category: 'not yet classified',
+category: 'private',
 fn: function (aClass,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
@@ -486,7 +489,7 @@ smalltalk.ChunkExporter);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "exportMetaDefinitionOf:on:",
-category: 'not yet classified',
+category: 'private',
 fn: function (aClass,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
@@ -521,7 +524,7 @@ smalltalk.ChunkExporter);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "exportMethod:of:on:",
-category: 'not yet classified',
+category: 'private',
 fn: function (aMethod,aClass,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
@@ -543,7 +546,7 @@ smalltalk.ChunkExporter);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "exportMethods:category:of:on:",
-category: 'not yet classified',
+category: 'private',
 fn: function (methods,category,aClass,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
@@ -573,7 +576,7 @@ smalltalk.ChunkExporter);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "exportMethodsOf:on:",
-category: 'not yet classified',
+category: 'private',
 fn: function (aClass,aStream){
 var self=this;
 var map;
@@ -609,7 +612,7 @@ smalltalk.ChunkExporter);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "exportPackageDefinitionOf:on:",
-category: 'not yet classified',
+category: 'private',
 fn: function (package_,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
@@ -628,7 +631,7 @@ smalltalk.ChunkExporter);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "exportPackageExtensionsOf:on:",
-category: 'not yet classified',
+category: 'private',
 fn: function (package_,aStream){
 var self=this;
 var name,map;
@@ -674,6 +677,7 @@ smalltalk.ChunkExporter);
 
 
 smalltalk.addClass('StrippedExporter', smalltalk.Exporter, [], 'Importer-Exporter');
+smalltalk.StrippedExporter.comment="I export Amber code into a JavaScript string, but without any optional associated data like the Amber source code."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "exportDefinitionOf:on:",
@@ -742,6 +746,7 @@ smalltalk.StrippedExporter);
 
 
 smalltalk.addClass('Importer', smalltalk.Object, [], 'Importer-Exporter');
+smalltalk.Importer.comment="I can import Amber code from a string in the chunk format.\x0a\x0a## API\x0a\x0a    Importer new import: aString"
 smalltalk.addMethod(
 smalltalk.method({
 selector: "import:",
@@ -788,6 +793,7 @@ smalltalk.Importer);
 
 
 smalltalk.addClass('PackageHandler', smalltalk.Object, [], 'Importer-Exporter');
+smalltalk.PackageHandler.comment="I am responsible for handling package loading and committing.\x0a\x0aI should not be used directly. Instead, use the corresponding `Package` methods."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "ajaxPutAt:data:",
@@ -904,7 +910,7 @@ smalltalk.PackageHandler);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "loadPackages:prefix:",
-category: 'not yet classified',
+category: 'loading',
 fn: function (aCollection,aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 

+ 10 - 0
js/Kernel-Announcements.js

@@ -536,9 +536,11 @@ smalltalk.MethodAnnouncement);
 
 
 smalltalk.addClass('MethodAdded', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
+smalltalk.MethodAdded.comment="I am emitted when a `CompiledMethod` is added to a class."
 
 
 smalltalk.addClass('MethodModified', smalltalk.MethodAnnouncement, ['oldMethod'], 'Kernel-Announcements');
+smalltalk.MethodModified.comment="I am emitted when a `CompiledMethod` is modified (a new method is installed). I hold a reference to the old method being replaced."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "oldMethod",
@@ -576,6 +578,7 @@ smalltalk.MethodModified);
 
 
 smalltalk.addClass('MethodMoved', smalltalk.MethodAnnouncement, ['oldProtocol'], 'Kernel-Announcements');
+smalltalk.MethodMoved.comment="I am emitted when a `CompiledMethod` is moved to another protocol. I hold a refernce to the old protocol of the method."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "oldProtocol",
@@ -613,9 +616,11 @@ smalltalk.MethodMoved);
 
 
 smalltalk.addClass('MethodRemoved', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
+smalltalk.MethodRemoved.comment="I am emitted when a `CompiledMethod` is removed from a class."
 
 
 smalltalk.addClass('PackageAnnouncement', smalltalk.SystemAnnouncement, ['package'], 'Kernel-Announcements');
+smalltalk.PackageAnnouncement.comment="I am the abstract superclass of package-related announcements."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "package",
@@ -653,12 +658,15 @@ smalltalk.PackageAnnouncement);
 
 
 smalltalk.addClass('PackageAdded', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
+smalltalk.PackageAdded.comment="I am emitted when a `Package` is added to the system."
 
 
 smalltalk.addClass('PackageRemoved', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
+smalltalk.PackageRemoved.comment="I am emitted when a `Package` is removed from the system."
 
 
 smalltalk.addClass('ProtocolAnnouncement', smalltalk.SystemAnnouncement, ['theClass', 'protocol'], 'Kernel-Announcements');
+smalltalk.ProtocolAnnouncement.comment="I am the abstract superclass of protocol-related announcements."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "protocol",
@@ -730,8 +738,10 @@ smalltalk.ProtocolAnnouncement);
 
 
 smalltalk.addClass('ProtocolAdded', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');
+smalltalk.ProtocolAdded.comment="I am emitted when a protocol is added to a class."
 
 
 smalltalk.addClass('ProtocolRemoved', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');
+smalltalk.ProtocolRemoved.comment="I am emitted when a protocol is removed from a class."
 
 

+ 1 - 1
js/Kernel-Transcript.deploy.js

@@ -55,7 +55,7 @@ messageSends: ["register:", "new"]}),
 smalltalk.ConsoleTranscript.klass);
 
 
-smalltalk.addClass('Transcript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
+smalltalk.addClass('Transcript', smalltalk.Object, [], 'Kernel-Transcript');
 
 smalltalk.Transcript.klass.iVarNames = ['current'];
 smalltalk.addMethod(

+ 3 - 1
js/Kernel-Transcript.js

@@ -1,5 +1,6 @@
 smalltalk.addPackage('Kernel-Transcript');
 smalltalk.addClass('ConsoleTranscript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
+smalltalk.ConsoleTranscript.comment="I am a specific transcript emitting to the JavaScript console.\x0a\x0aIf no other transcript is registered, I am the default."
 smalltalk.addMethod(
 smalltalk.method({
 selector: "clear",
@@ -80,7 +81,8 @@ referencedClasses: ["Transcript"]
 smalltalk.ConsoleTranscript.klass);
 
 
-smalltalk.addClass('Transcript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
+smalltalk.addClass('Transcript', smalltalk.Object, [], 'Kernel-Transcript');
+smalltalk.Transcript.comment="I am a facade for Transcript actions.\x0a\x0aI delegate actions to the currently registered transcript.\x0a\x0a## API\x0a\x0a    Transcript \x0a        show: 'hello world';\x0a        cr;\x0a        show: anObject."
 
 smalltalk.Transcript.klass.iVarNames = ['current'];
 smalltalk.addMethod(

+ 41 - 1
st/Compiler-AST.st

@@ -5,7 +5,9 @@ Object subclass: #Node
 !Node commentStamp!
 I am the abstract root class of the abstract syntax tree.
 
-position: holds a point containing line and column number of the symbol location in the original source file.!
+Concrete classes should implement `#accept:` to allow visiting.
+
+`position` holds a point containing line and column number of the symbol location in the original source file.!
 
 !Node methodsFor: 'accessing'!
 
@@ -81,6 +83,10 @@ isValueNode
 	^false
 !
 
+stopOnStepping
+	^ false
+!
+
 subtreeNeedsAliasing
 	^(self shouldBeAliased or: [ self shouldBeInlined ]) or: [
 		(self nodes detect: [ :each | each subtreeNeedsAliasing ] ifNone: [ false ]) ~= false ]
@@ -95,6 +101,8 @@ accept: aVisitor
 Node subclass: #AssignmentNode
 	instanceVariableNames: 'left right'
 	package: 'Compiler-AST'!
+!AssignmentNode commentStamp!
+I represent an assignment node.!
 
 !AssignmentNode methodsFor: 'accessing'!
 
@@ -133,6 +141,8 @@ accept: aVisitor
 Node subclass: #BlockNode
 	instanceVariableNames: 'parameters scope'
 	package: 'Compiler-AST'!
+!BlockNode commentStamp!
+I represent an block closure node.!
 
 !BlockNode methodsFor: 'accessing'!
 
@@ -171,6 +181,8 @@ accept: aVisitor
 Node subclass: #CascadeNode
 	instanceVariableNames: 'receiver'
 	package: 'Compiler-AST'!
+!CascadeNode commentStamp!
+I represent an cascade node.!
 
 !CascadeNode methodsFor: 'accessing'!
 
@@ -191,6 +203,8 @@ accept: aVisitor
 Node subclass: #DynamicArrayNode
 	instanceVariableNames: ''
 	package: 'Compiler-AST'!
+!DynamicArrayNode commentStamp!
+I represent an dynamic array node.!
 
 !DynamicArrayNode methodsFor: 'visiting'!
 
@@ -201,6 +215,8 @@ accept: aVisitor
 Node subclass: #DynamicDictionaryNode
 	instanceVariableNames: ''
 	package: 'Compiler-AST'!
+!DynamicDictionaryNode commentStamp!
+I represent an dynamic dictionary node.!
 
 !DynamicDictionaryNode methodsFor: 'visiting'!
 
@@ -211,6 +227,8 @@ accept: aVisitor
 Node subclass: #JSStatementNode
 	instanceVariableNames: 'source'
 	package: 'Compiler-AST'!
+!JSStatementNode commentStamp!
+I represent an JavaScript statement node.!
 
 !JSStatementNode methodsFor: 'accessing'!
 
@@ -231,6 +249,10 @@ accept: aVisitor
 Node subclass: #MethodNode
 	instanceVariableNames: 'selector arguments source scope classReferences messageSends superSends'
 	package: 'Compiler-AST'!
+!MethodNode commentStamp!
+I represent an method node.
+
+A method node must be the root and only method node of a valid AST.!
 
 !MethodNode methodsFor: 'accessing'!
 
@@ -299,6 +321,8 @@ accept: aVisitor
 Node subclass: #ReturnNode
 	instanceVariableNames: 'scope'
 	package: 'Compiler-AST'!
+!ReturnNode commentStamp!
+I represent an return node. At the AST level, there is not difference between a local return or non-local return.!
 
 !ReturnNode methodsFor: 'accessing'!
 
@@ -329,6 +353,8 @@ accept: aVisitor
 Node subclass: #SendNode
 	instanceVariableNames: 'selector arguments receiver superSend index'
 	package: 'Compiler-AST'!
+!SendNode commentStamp!
+I represent an message send node.!
 
 !SendNode methodsFor: 'accessing'!
 
@@ -404,6 +430,10 @@ valueForReceiver: anObject
 
 isSendNode
 	^ true
+!
+
+stopOnStepping
+	^ true
 ! !
 
 !SendNode methodsFor: 'visiting'!
@@ -415,6 +445,8 @@ accept: aVisitor
 Node subclass: #SequenceNode
 	instanceVariableNames: 'temps scope'
 	package: 'Compiler-AST'!
+!SequenceNode commentStamp!
+I represent an sequence node. A sequence represent a set of instructions inside the same scope (the method scope or a block scope).!
 
 !SequenceNode methodsFor: 'accessing'!
 
@@ -452,6 +484,8 @@ accept: aVisitor
 SequenceNode subclass: #BlockSequenceNode
 	instanceVariableNames: ''
 	package: 'Compiler-AST'!
+!BlockSequenceNode commentStamp!
+I represent an special sequence node for block scopes.!
 
 !BlockSequenceNode methodsFor: 'testing'!
 
@@ -468,6 +502,8 @@ accept: aVisitor
 Node subclass: #ValueNode
 	instanceVariableNames: 'value'
 	package: 'Compiler-AST'!
+!ValueNode commentStamp!
+I represent a value node.!
 
 !ValueNode methodsFor: 'accessing'!
 
@@ -498,6 +534,8 @@ accept: aVisitor
 ValueNode subclass: #VariableNode
 	instanceVariableNames: 'assigned binding'
 	package: 'Compiler-AST'!
+!VariableNode commentStamp!
+I represent an variable node.!
 
 !VariableNode methodsFor: 'accessing'!
 
@@ -541,6 +579,8 @@ accept: aVisitor
 VariableNode subclass: #ClassReferenceNode
 	instanceVariableNames: ''
 	package: 'Compiler-AST'!
+!ClassReferenceNode commentStamp!
+I represent an class reference node.!
 
 !ClassReferenceNode methodsFor: 'visiting'!
 

+ 1 - 2
st/Compiler-IR.st

@@ -3,8 +3,7 @@ NodeVisitor subclass: #IRASTTranslator
 	instanceVariableNames: 'source theClass method sequence nextAlias'
 	package: 'Compiler-IR'!
 !IRASTTranslator commentStamp!
-I am the AST (abstract syntax tree) visitor responsible for building the intermediate representation graph.
-I rely on a builder object, instance of IRBuilder.!
+I am the AST (abstract syntax tree) visitor responsible for building the intermediate representation graph.!
 
 !IRASTTranslator methodsFor: 'accessing'!
 

+ 8 - 0
st/Compiler-Inlining.st

@@ -74,6 +74,8 @@ accept: aVisitor
 IRInlinedSend subclass: #IRInlinedIfFalse
 	instanceVariableNames: ''
 	package: 'Compiler-Inlining'!
+!IRInlinedIfFalse commentStamp!
+I represent an inlined `#ifFalse:` message send instruction.!
 
 !IRInlinedIfFalse methodsFor: 'visiting'!
 
@@ -84,6 +86,8 @@ accept: aVisitor
 IRInlinedSend subclass: #IRInlinedIfNilIfNotNil
 	instanceVariableNames: ''
 	package: 'Compiler-Inlining'!
+!IRInlinedIfNilIfNotNil commentStamp!
+I represent an inlined `#ifNil:ifNotNil:` message send instruction.!
 
 !IRInlinedIfNilIfNotNil methodsFor: 'visiting'!
 
@@ -94,6 +98,8 @@ accept: aVisitor
 IRInlinedSend subclass: #IRInlinedIfTrue
 	instanceVariableNames: ''
 	package: 'Compiler-Inlining'!
+!IRInlinedIfTrue commentStamp!
+I represent an inlined `#ifTrue:` message send instruction.!
 
 !IRInlinedIfTrue methodsFor: 'visiting'!
 
@@ -104,6 +110,8 @@ accept: aVisitor
 IRInlinedSend subclass: #IRInlinedIfTrueIfFalse
 	instanceVariableNames: ''
 	package: 'Compiler-Inlining'!
+!IRInlinedIfTrueIfFalse commentStamp!
+I represent an inlined `#ifTrue:ifFalse:` message send instruction.!
 
 !IRInlinedIfTrueIfFalse methodsFor: 'visiting'!
 

+ 36 - 20
st/Compiler-Interpreter.st

@@ -3,10 +3,10 @@ NodeVisitor subclass: #AIContext
 	instanceVariableNames: 'outerContext pc locals method'
 	package: 'Compiler-Interpreter'!
 !AIContext commentStamp!
-AIContext is like a `MethodContext`, used by the `ASTInterpreter`.
-Unlike a `MethodContext`, it is not read-only.
+I am like a `MethodContext`, used by the `ASTInterpreter`.
+Unlike a `MethodContext`, my instances are not read-only.
 
-When debugging, `AIContext` instances are created by copying the current `MethodContext` (thisContext)!
+When debugging, my instances are created by copying the current `MethodContext` (thisContext)!
 
 !AIContext methodsFor: 'accessing'!
 
@@ -90,13 +90,15 @@ Object subclass: #ASTDebugger
 	instanceVariableNames: 'interpreter context'
 	package: 'Compiler-Interpreter'!
 !ASTDebugger commentStamp!
-ASTDebugger is a debugger to Amber.
-It uses an AST interpreter to step through the code.
+I am a stepping debugger interface for Amber code.
+I internally use an instance of `ASTSteppingInterpreter` to actually step through node and interpret them.
 
-ASTDebugger instances are created from a `MethodContext` with `ASTDebugger class >> context:`.
+My instances are created from a `MethodContext` with `ASTDebugger class >> context:`.
 They hold an `AIContext` instance internally, recursive copy of the `MethodContext`.
 
-Use the methods of the 'stepping' protocol to do stepping.!
+## API
+
+Use the methods of the `'stepping'` protocol to do stepping.!
 
 !ASTDebugger methodsFor: 'accessing'!
 
@@ -155,6 +157,10 @@ initializeWithContext: aMethodContext
 
 !ASTDebugger methodsFor: 'stepping'!
 
+proceed
+	self shouldBeImplemented
+!
+
 restart
 	self shouldBeImplemented
 !
@@ -184,6 +190,12 @@ stepOver
 	self step
 ! !
 
+!ASTDebugger methodsFor: 'testing'!
+
+atEnd
+	^ self interpreter atEnd
+! !
+
 !ASTDebugger class methodsFor: 'instance creation'!
 
 context: aMethodContext
@@ -196,10 +208,10 @@ Object subclass: #ASTInterpreter
 	instanceVariableNames: 'currentNode context shouldReturn result'
 	package: 'Compiler-Interpreter'!
 !ASTInterpreter commentStamp!
-ASTIntepreter is like a `NodeVisitor`, interpreting nodes one after each other.
-It is built using Continuation Passing Style for stepping purposes.
+I am like a `NodeVisitor`, interpreting nodes one after each other.
+I am built using Continuation Passing Style for stepping purposes.
 
-Usage example:
+## Usage example:
 
 	| ast interpreter |
 	ast := Smalltalk current parse: 'foo 1+2+4'.
@@ -459,10 +471,14 @@ ASTInterpreter subclass: #ASTSteppingInterpreter
 	instanceVariableNames: 'continuation nextNode'
 	package: 'Compiler-Interpreter'!
 !ASTSteppingInterpreter commentStamp!
-ASTSteppingInterpreter is an interpreter with stepping capabilities.
-Use `#step` to actually interpret the next node.
+I am an interpreter with stepping capabilities. The higher level `ASTDebugger` class should be used as a debugger model, as it provides convenience methods for debugging.
+
+## API
+
+Use `#step` to actually interpret the next node. Interpretation stops at each node evaluation, weither it's a message node or not.
+
 
-Usage example:
+## Usage example:
 
 	| ast interpreter |
 	ast := Smalltalk current parse: 'foo 1+2+4'.
@@ -472,13 +488,13 @@ Usage example:
 		interpret: ast nodes first;
 		yourself.
 		
-	debugger step; step.
-	debugger step; step.
-	debugger result."Answers 1"
-	debugger step.
-	debugger result. "Answers 3"
-	debugger step.
-	debugger result. "Answers 7"!
+	interpreter step; step.
+	interpreter step; step.
+	interpreter result."Answers 1"
+	interpreter step.
+	interpreter result. "Answers 3"
+	interpreter step.
+	interpreter result. "Answers 7"!
 
 !ASTSteppingInterpreter methodsFor: 'accessing'!
 

+ 38 - 2
st/Importer-Exporter.st

@@ -2,6 +2,14 @@ Smalltalk current createPackage: 'Importer-Exporter'!
 Object subclass: #ChunkParser
 	instanceVariableNames: 'stream'
 	package: 'Importer-Exporter'!
+!ChunkParser commentStamp!
+I am responsible for parsing aStream contents in the chunk format.
+
+## API
+
+    ChunkParser new
+        stream: aStream;
+        nextChunk!
 
 !ChunkParser methodsFor: 'accessing'!
 
@@ -43,6 +51,18 @@ on: aStream
 Object subclass: #Exporter
 	instanceVariableNames: ''
 	package: 'Importer-Exporter'!
+!Exporter commentStamp!
+I am responsible for outputting Amber code into a JavaScript string.
+
+The generated output is enough to reconstruct the exported data, including Smalltalk source code and other metadata.
+
+## Use case
+
+I am typically used to save code outside of the Amber runtime (committing to disk, etc.).
+
+## API
+
+Use `#exportAll`, `#exportClass:` or `#exportPackage:` methods.!
 
 !Exporter methodsFor: 'fileOut'!
 
@@ -174,8 +194,12 @@ exportPackageExtensionsOf: package on: aStream
 Exporter subclass: #ChunkExporter
 	instanceVariableNames: ''
 	package: 'Importer-Exporter'!
+!ChunkExporter commentStamp!
+I am an exporter dedicated to outputting Amber source code in the classic Smalltalk chunk format.
+
+I do not output any compiled code.!
 
-!ChunkExporter methodsFor: 'not yet classified'!
+!ChunkExporter methodsFor: 'private'!
 
 chunkEscape: aString
 	"Replace all occurrences of !! with !!!! and trim at both ends."
@@ -288,6 +312,8 @@ exportPackageExtensionsOf: package on: aStream
 Exporter subclass: #StrippedExporter
 	instanceVariableNames: ''
 	package: 'Importer-Exporter'!
+!StrippedExporter commentStamp!
+I export Amber code into a JavaScript string, but without any optional associated data like the Amber source code.!
 
 !StrippedExporter methodsFor: 'private'!
 
@@ -323,6 +349,12 @@ exportMethod: aMethod of: aClass on: aStream
 Object subclass: #Importer
 	instanceVariableNames: ''
 	package: 'Importer-Exporter'!
+!Importer commentStamp!
+I can import Amber code from a string in the chunk format.
+
+## API
+
+    Importer new import: aString!
 
 !Importer methodsFor: 'fileIn'!
 
@@ -345,6 +377,10 @@ import: aStream
 Object subclass: #PackageHandler
 	instanceVariableNames: ''
 	package: 'Importer-Exporter'!
+!PackageHandler commentStamp!
+I am responsible for handling package loading and committing.
+
+I should not be used directly. Instead, use the corresponding `Package` methods.!
 
 !PackageHandler methodsFor: 'committing'!
 
@@ -401,7 +437,7 @@ setupPackageNamed: packageName prefix: aString
 		commitPathSt: '/', aString, '/st'
 ! !
 
-!PackageHandler class methodsFor: 'not yet classified'!
+!PackageHandler class methodsFor: 'loading'!
 
 loadPackages: aCollection prefix: aString
 	^ self new loadPackages: aCollection prefix: aString

+ 20 - 0
st/Kernel-Announcements.st

@@ -260,10 +260,14 @@ method: aCompiledMethod
 MethodAnnouncement subclass: #MethodAdded
 	instanceVariableNames: ''
 	package: 'Kernel-Announcements'!
+!MethodAdded commentStamp!
+I am emitted when a `CompiledMethod` is added to a class.!
 
 MethodAnnouncement subclass: #MethodModified
 	instanceVariableNames: 'oldMethod'
 	package: 'Kernel-Announcements'!
+!MethodModified commentStamp!
+I am emitted when a `CompiledMethod` is modified (a new method is installed). I hold a reference to the old method being replaced.!
 
 !MethodModified methodsFor: 'accessing'!
 
@@ -278,6 +282,8 @@ oldMethod: aMethod
 MethodAnnouncement subclass: #MethodMoved
 	instanceVariableNames: 'oldProtocol'
 	package: 'Kernel-Announcements'!
+!MethodMoved commentStamp!
+I am emitted when a `CompiledMethod` is moved to another protocol. I hold a refernce to the old protocol of the method.!
 
 !MethodMoved methodsFor: 'accessing'!
 
@@ -292,10 +298,14 @@ oldProtocol: aString
 MethodAnnouncement subclass: #MethodRemoved
 	instanceVariableNames: ''
 	package: 'Kernel-Announcements'!
+!MethodRemoved commentStamp!
+I am emitted when a `CompiledMethod` is removed from a class.!
 
 SystemAnnouncement subclass: #PackageAnnouncement
 	instanceVariableNames: 'package'
 	package: 'Kernel-Announcements'!
+!PackageAnnouncement commentStamp!
+I am the abstract superclass of package-related announcements.!
 
 !PackageAnnouncement methodsFor: 'accessing'!
 
@@ -310,14 +320,20 @@ package: aPackage
 PackageAnnouncement subclass: #PackageAdded
 	instanceVariableNames: ''
 	package: 'Kernel-Announcements'!
+!PackageAdded commentStamp!
+I am emitted when a `Package` is added to the system.!
 
 PackageAnnouncement subclass: #PackageRemoved
 	instanceVariableNames: ''
 	package: 'Kernel-Announcements'!
+!PackageRemoved commentStamp!
+I am emitted when a `Package` is removed from the system.!
 
 SystemAnnouncement subclass: #ProtocolAnnouncement
 	instanceVariableNames: 'theClass protocol'
 	package: 'Kernel-Announcements'!
+!ProtocolAnnouncement commentStamp!
+I am the abstract superclass of protocol-related announcements.!
 
 !ProtocolAnnouncement methodsFor: 'accessing'!
 
@@ -340,8 +356,12 @@ theClass: aClass
 ProtocolAnnouncement subclass: #ProtocolAdded
 	instanceVariableNames: ''
 	package: 'Kernel-Announcements'!
+!ProtocolAdded commentStamp!
+I am emitted when a protocol is added to a class.!
 
 ProtocolAnnouncement subclass: #ProtocolRemoved
 	instanceVariableNames: ''
 	package: 'Kernel-Announcements'!
+!ProtocolRemoved commentStamp!
+I am emitted when a protocol is removed from a class.!
 

+ 16 - 1
st/Kernel-Transcript.st

@@ -2,6 +2,10 @@ Smalltalk current createPackage: 'Kernel-Transcript'!
 Object subclass: #ConsoleTranscript
 	instanceVariableNames: 'textarea'
 	package: 'Kernel-Transcript'!
+!ConsoleTranscript commentStamp!
+I am a specific transcript emitting to the JavaScript console.
+
+If no other transcript is registered, I am the default.!
 
 !ConsoleTranscript methodsFor: 'actions'!
 
@@ -29,8 +33,19 @@ initialize
 ! !
 
 Object subclass: #Transcript
-	instanceVariableNames: 'textarea'
+	instanceVariableNames: ''
 	package: 'Kernel-Transcript'!
+!Transcript commentStamp!
+I am a facade for Transcript actions.
+
+I delegate actions to the currently registered transcript.
+
+## API
+
+    Transcript 
+        show: 'hello world';
+        cr;
+        show: anObject.!
 
 Transcript class instanceVariableNames: 'current'!