Procházet zdrojové kódy

Class comments for Behavior, Clas and Metaclass

Nicolas Petton před 12 roky
rodič
revize
1f8c25c39e
3 změnil soubory, kde provedl 147 přidání a 124 odebrání
  1. 110 110
      js/Kernel-Classes.deploy.js
  2. 6 3
      js/Kernel-Classes.js
  3. 31 11
      st/Kernel-Classes.st

+ 110 - 110
js/Kernel-Classes.deploy.js

@@ -1,9 +1,9 @@
 smalltalk.addPackage('Kernel-Classes', {});
 smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel-Classes');
 smalltalk.addMethod(
-'_new',
+unescape('_new'),
 smalltalk.method({
-selector: 'new',
+selector: unescape('new'),
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
@@ -12,9 +12,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_basicNew',
+unescape('_basicNew'),
 smalltalk.method({
-selector: 'basicNew',
+selector: unescape('basicNew'),
 fn: function (){
 var self=this;
 return new self.fn();
@@ -23,9 +23,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_name',
+unescape('_name'),
 smalltalk.method({
-selector: 'name',
+selector: unescape('name'),
 fn: function (){
 var self=this;
 return self.className || nil;
@@ -34,9 +34,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_superclass',
+unescape('_superclass'),
 smalltalk.method({
-selector: 'superclass',
+selector: unescape('superclass'),
 fn: function (){
 var self=this;
 return self.superclass || nil;
@@ -45,9 +45,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_subclasses',
+unescape('_subclasses'),
 smalltalk.method({
-selector: 'subclasses',
+selector: unescape('subclasses'),
 fn: function (){
 var self=this;
 return smalltalk.subclasses(self);
@@ -56,9 +56,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_allSubclasses',
+unescape('_allSubclasses'),
 smalltalk.method({
-selector: 'allSubclasses',
+selector: unescape('allSubclasses'),
 fn: function (){
 var self=this;
 var result=nil;
@@ -70,9 +70,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_withAllSubclasses',
+unescape('_withAllSubclasses'),
 smalltalk.method({
-selector: 'withAllSubclasses',
+selector: unescape('withAllSubclasses'),
 fn: function (){
 var self=this;
 return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
@@ -81,9 +81,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_prototype',
+unescape('_prototype'),
 smalltalk.method({
-selector: 'prototype',
+selector: unescape('prototype'),
 fn: function (){
 var self=this;
 return self.fn.prototype;
@@ -92,9 +92,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_methodDictionary',
+unescape('_methodDictionary'),
 smalltalk.method({
-selector: 'methodDictionary',
+selector: unescape('methodDictionary'),
 fn: function (){
 var self=this;
 var dict = smalltalk.HashedCollection._new();
@@ -110,9 +110,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_methodsFor_',
+unescape('_methodsFor_'),
 smalltalk.method({
-selector: 'methodsFor:',
+selector: unescape('methodsFor%3A'),
 fn: function (aString){
 var self=this;
 return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
@@ -121,9 +121,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_addCompiledMethod_',
+unescape('_addCompiledMethod_'),
 smalltalk.method({
-selector: 'addCompiledMethod:',
+selector: unescape('addCompiledMethod%3A'),
 fn: function (aMethod){
 var self=this;
 smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
@@ -132,9 +132,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_instanceVariableNames',
+unescape('_instanceVariableNames'),
 smalltalk.method({
-selector: 'instanceVariableNames',
+selector: unescape('instanceVariableNames'),
 fn: function (){
 var self=this;
 return self.iVarNames;
@@ -143,9 +143,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_comment',
+unescape('_comment'),
 smalltalk.method({
-selector: 'comment',
+selector: unescape('comment'),
 fn: function (){
 var self=this;
 return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
@@ -154,9 +154,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_comment_',
+unescape('_comment_'),
 smalltalk.method({
-selector: 'comment:',
+selector: unescape('comment%3A'),
 fn: function (aString){
 var self=this;
 smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
@@ -165,9 +165,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_commentStamp',
+unescape('_commentStamp'),
 smalltalk.method({
-selector: 'commentStamp',
+selector: unescape('commentStamp'),
 fn: function (){
 var self=this;
 return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
@@ -176,9 +176,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_removeCompiledMethod_',
+unescape('_removeCompiledMethod_'),
 smalltalk.method({
-selector: 'removeCompiledMethod:',
+selector: unescape('removeCompiledMethod%3A'),
 fn: function (aMethod){
 var self=this;
 delete self.fn.prototype[aMethod.selector._asSelector()];
@@ -189,9 +189,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_inheritsFrom_',
+unescape('_inheritsFrom_'),
 smalltalk.method({
-selector: 'inheritsFrom:',
+selector: unescape('inheritsFrom%3A'),
 fn: function (aClass){
 var self=this;
 return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
@@ -200,9 +200,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_protocols',
+unescape('_protocols'),
 smalltalk.method({
-selector: 'protocols',
+selector: unescape('protocols'),
 fn: function (){
 var self=this;
 var protocols=nil;
@@ -214,9 +214,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_protocolsDo_',
+unescape('_protocolsDo_'),
 smalltalk.method({
-selector: 'protocolsDo:',
+selector: unescape('protocolsDo%3A'),
 fn: function (aBlock){
 var self=this;
 var methodsByCategory=nil;
@@ -228,9 +228,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_allInstanceVariableNames',
+unescape('_allInstanceVariableNames'),
 smalltalk.method({
-selector: 'allInstanceVariableNames',
+selector: unescape('allInstanceVariableNames'),
 fn: function (){
 var self=this;
 var result=nil;
@@ -242,9 +242,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_methodAt_',
+unescape('_methodAt_'),
 smalltalk.method({
-selector: 'methodAt:',
+selector: unescape('methodAt%3A'),
 fn: function (aString){
 var self=this;
 return smalltalk.methods(self)[aString];
@@ -253,9 +253,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_methodsFor_stamp_',
+unescape('_methodsFor_stamp_'),
 smalltalk.method({
-selector: 'methodsFor:stamp:',
+selector: unescape('methodsFor%3Astamp%3A'),
 fn: function (aString, aStamp){
 var self=this;
 return smalltalk.send(self, "_methodsFor_", [aString]);
@@ -264,9 +264,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_commentStamp_prior_',
+unescape('_commentStamp_prior_'),
 smalltalk.method({
-selector: 'commentStamp:prior:',
+selector: unescape('commentStamp%3Aprior%3A'),
 fn: function (aStamp, prior){
 var self=this;
 return smalltalk.send(self, "_commentStamp", []);
@@ -275,9 +275,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_compile_',
+unescape('_compile_'),
 smalltalk.method({
-selector: 'compile:',
+selector: unescape('compile%3A'),
 fn: function (aString){
 var self=this;
 smalltalk.send(self, "_compile_category_", [aString, ""]);
@@ -286,9 +286,9 @@ return self;}
 smalltalk.Behavior);
 
 smalltalk.addMethod(
-'_compile_category_',
+unescape('_compile_category_'),
 smalltalk.method({
-selector: 'compile:category:',
+selector: unescape('compile%3Acategory%3A'),
 fn: function (aString, anotherString){
 var self=this;
 var method=nil;
@@ -303,9 +303,9 @@ smalltalk.Behavior);
 
 smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel-Classes');
 smalltalk.addMethod(
-'_category',
+unescape('_category'),
 smalltalk.method({
-selector: 'category',
+selector: unescape('category'),
 fn: function (){
 var self=this;
 return (($receiver = smalltalk.send(self, "_package", [])) == nil || $receiver == undefined) ? (function(){return "Unclassified";})() : (function(){return smalltalk.send(smalltalk.send(self, "_package", []), "_name", []);})();
@@ -314,9 +314,9 @@ return self;}
 smalltalk.Class);
 
 smalltalk.addMethod(
-'_subclass_instanceVariableNames_',
+unescape('_subclass_instanceVariableNames_'),
 smalltalk.method({
-selector: 'subclass:instanceVariableNames:',
+selector: unescape('subclass%3AinstanceVariableNames%3A'),
 fn: function (aString, anotherString){
 var self=this;
 return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
@@ -325,9 +325,9 @@ return self;}
 smalltalk.Class);
 
 smalltalk.addMethod(
-'_subclass_instanceVariableNames_category_',
+unescape('_subclass_instanceVariableNames_category_'),
 smalltalk.method({
-selector: 'subclass:instanceVariableNames:category:',
+selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
 fn: function (aString, aString2, aString3){
 var self=this;
 smalltalk.send(self, "_deprecatedAPI", []);
@@ -337,9 +337,9 @@ return self;}
 smalltalk.Class);
 
 smalltalk.addMethod(
-'_isClass',
+unescape('_isClass'),
 smalltalk.method({
-selector: 'isClass',
+selector: unescape('isClass'),
 fn: function (){
 var self=this;
 return true;
@@ -348,9 +348,9 @@ return self;}
 smalltalk.Class);
 
 smalltalk.addMethod(
-'_printString',
+unescape('_printString'),
 smalltalk.method({
-selector: 'printString',
+selector: unescape('printString'),
 fn: function (){
 var self=this;
 return smalltalk.send(self, "_name", []);
@@ -359,9 +359,9 @@ return self;}
 smalltalk.Class);
 
 smalltalk.addMethod(
-'_rename_',
+unescape('_rename_'),
 smalltalk.method({
-selector: 'rename:',
+selector: unescape('rename%3A'),
 fn: function (aString){
 var self=this;
 
@@ -374,9 +374,9 @@ return self;}
 smalltalk.Class);
 
 smalltalk.addMethod(
-'_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_',
+unescape('_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_'),
 smalltalk.method({
-selector: 'subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:',
+selector: unescape('subclass%3AinstanceVariableNames%3AclassVariableNames%3ApoolDictionaries%3Acategory%3A'),
 fn: function (aString, aString2, classVars, pools, aString3){
 var self=this;
 return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
@@ -385,9 +385,9 @@ return self;}
 smalltalk.Class);
 
 smalltalk.addMethod(
-'_package',
+unescape('_package'),
 smalltalk.method({
-selector: 'package',
+selector: unescape('package'),
 fn: function (){
 var self=this;
 return self.pkg;
@@ -396,9 +396,9 @@ return self;}
 smalltalk.Class);
 
 smalltalk.addMethod(
-'_package_',
+unescape('_package_'),
 smalltalk.method({
-selector: 'package:',
+selector: unescape('package%3A'),
 fn: function (aPackage){
 var self=this;
 self.pkg = aPackage;
@@ -407,9 +407,9 @@ return self;}
 smalltalk.Class);
 
 smalltalk.addMethod(
-'_subclass_instanceVariableNames_package_',
+unescape('_subclass_instanceVariableNames_package_'),
 smalltalk.method({
-selector: 'subclass:instanceVariableNames:package:',
+selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
 fn: function (aString, aString2, aString3){
 var self=this;
 return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, smalltalk.send(aString, "_asString", []), aString2, aString3]);
@@ -421,9 +421,9 @@ smalltalk.Class);
 
 smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel-Classes');
 smalltalk.addMethod(
-'_instanceClass',
+unescape('_instanceClass'),
 smalltalk.method({
-selector: 'instanceClass',
+selector: unescape('instanceClass'),
 fn: function (){
 var self=this;
 return self.instanceClass;
@@ -432,9 +432,9 @@ return self;}
 smalltalk.Metaclass);
 
 smalltalk.addMethod(
-'_instanceVariableNames_',
+unescape('_instanceVariableNames_'),
 smalltalk.method({
-selector: 'instanceVariableNames:',
+selector: unescape('instanceVariableNames%3A'),
 fn: function (aCollection){
 var self=this;
 smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_class_instanceVariableNames_", [self, aCollection]);
@@ -443,9 +443,9 @@ return self;}
 smalltalk.Metaclass);
 
 smalltalk.addMethod(
-'_isMetaclass',
+unescape('_isMetaclass'),
 smalltalk.method({
-selector: 'isMetaclass',
+selector: unescape('isMetaclass'),
 fn: function (){
 var self=this;
 return true;
@@ -454,9 +454,9 @@ return self;}
 smalltalk.Metaclass);
 
 smalltalk.addMethod(
-'_printString',
+unescape('_printString'),
 smalltalk.method({
-selector: 'printString',
+selector: unescape('printString'),
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(smalltalk.send(self, "_instanceClass", []), "_name", []), "__comma", [" class"]);
@@ -468,9 +468,9 @@ smalltalk.Metaclass);
 
 smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel-Classes');
 smalltalk.addMethod(
-'_superclass_subclass_',
+unescape('_superclass_subclass_'),
 smalltalk.method({
-selector: 'superclass:subclass:',
+selector: unescape('superclass%3Asubclass%3A'),
 fn: function (aClass, aString){
 var self=this;
 return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
@@ -479,9 +479,9 @@ return self;}
 smalltalk.ClassBuilder);
 
 smalltalk.addMethod(
-'_class_instanceVariableNames_',
+unescape('_class_instanceVariableNames_'),
 smalltalk.method({
-selector: 'class:instanceVariableNames:',
+selector: unescape('class%3AinstanceVariableNames%3A'),
 fn: function (aClass, aString){
 var self=this;
 ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_name", []), "__comma", [" is not a metaclass"])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_name", []), "__comma", [" is not a metaclass"])]);})]));
@@ -492,9 +492,9 @@ return self;}
 smalltalk.ClassBuilder);
 
 smalltalk.addMethod(
-'_instanceVariableNamesFor_',
+unescape('_instanceVariableNamesFor_'),
 smalltalk.method({
-selector: 'instanceVariableNamesFor:',
+selector: unescape('instanceVariableNamesFor%3A'),
 fn: function (aString){
 var self=this;
 return smalltalk.send(smalltalk.send(aString, "_tokenize_", [" "]), "_reject_", [(function(each){return smalltalk.send(each, "_isEmpty", []);})]);
@@ -503,9 +503,9 @@ return self;}
 smalltalk.ClassBuilder);
 
 smalltalk.addMethod(
-'_addSubclassOf_named_instanceVariableNames_',
+unescape('_addSubclassOf_named_instanceVariableNames_'),
 smalltalk.method({
-selector: 'addSubclassOf:named:instanceVariableNames:',
+selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3A'),
 fn: function (aClass, aString, aCollection){
 var self=this;
 smalltalk.addClass(aString, aClass, aCollection);
@@ -515,9 +515,9 @@ return self;}
 smalltalk.ClassBuilder);
 
 smalltalk.addMethod(
-'_setupClass_',
+unescape('_setupClass_'),
 smalltalk.method({
-selector: 'setupClass:',
+selector: unescape('setupClass%3A'),
 fn: function (aClass){
 var self=this;
 smalltalk.init(aClass);;
@@ -526,9 +526,9 @@ return self;}
 smalltalk.ClassBuilder);
 
 smalltalk.addMethod(
-'_superclass_subclass_instanceVariableNames_package_',
+unescape('_superclass_subclass_instanceVariableNames_package_'),
 smalltalk.method({
-selector: 'superclass:subclass:instanceVariableNames:package:',
+selector: unescape('superclass%3Asubclass%3AinstanceVariableNames%3Apackage%3A'),
 fn: function (aClass, aString, aString2, aString3){
 var self=this;
 var newClass=nil;
@@ -540,9 +540,9 @@ return self;}
 smalltalk.ClassBuilder);
 
 smalltalk.addMethod(
-'_addSubclassOf_named_instanceVariableNames_package_',
+unescape('_addSubclassOf_named_instanceVariableNames_package_'),
 smalltalk.method({
-selector: 'addSubclassOf:named:instanceVariableNames:package:',
+selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3Apackage%3A'),
 fn: function (aClass, aString, aCollection, packageName){
 var self=this;
 smalltalk.addClass(aString, aClass, aCollection, packageName);
@@ -552,9 +552,9 @@ return self;}
 smalltalk.ClassBuilder);
 
 smalltalk.addMethod(
-'_copyClass_named_',
+unescape('_copyClass_named_'),
 smalltalk.method({
-selector: 'copyClass:named:',
+selector: unescape('copyClass%3Anamed%3A'),
 fn: function (aClass, aString){
 var self=this;
 var newClass=nil;
@@ -572,9 +572,9 @@ smalltalk.ClassBuilder);
 
 smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel-Classes');
 smalltalk.addMethod(
-'_initialize',
+unescape('_initialize'),
 smalltalk.method({
-selector: 'initialize',
+selector: unescape('initialize'),
 fn: function (){
 var self=this;
 smalltalk.send(self, "_initialize", [], smalltalk.Object);
@@ -584,9 +584,9 @@ return self;}
 smalltalk.ClassCategoryReader);
 
 smalltalk.addMethod(
-'_class_category_',
+unescape('_class_category_'),
 smalltalk.method({
-selector: 'class:category:',
+selector: unescape('class%3Acategory%3A'),
 fn: function (aClass, aString){
 var self=this;
 (self['@class']=aClass);
@@ -596,9 +596,9 @@ return self;}
 smalltalk.ClassCategoryReader);
 
 smalltalk.addMethod(
-'_scanFrom_',
+unescape('_scanFrom_'),
 smalltalk.method({
-selector: 'scanFrom:',
+selector: unescape('scanFrom%3A'),
 fn: function (aChunkParser){
 var self=this;
 var chunk=nil;
@@ -608,9 +608,9 @@ return self;}
 smalltalk.ClassCategoryReader);
 
 smalltalk.addMethod(
-'_compileMethod_',
+unescape('_compileMethod_'),
 smalltalk.method({
-selector: 'compileMethod:',
+selector: unescape('compileMethod%3A'),
 fn: function (aString){
 var self=this;
 var method=nil;
@@ -625,9 +625,9 @@ smalltalk.ClassCategoryReader);
 
 smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel-Classes');
 smalltalk.addMethod(
-'_class_',
+unescape('_class_'),
 smalltalk.method({
-selector: 'class:',
+selector: unescape('class%3A'),
 fn: function (aClass){
 var self=this;
 (self['@class']=aClass);
@@ -636,9 +636,9 @@ return self;}
 smalltalk.ClassCommentReader);
 
 smalltalk.addMethod(
-'_scanFrom_',
+unescape('_scanFrom_'),
 smalltalk.method({
-selector: 'scanFrom:',
+selector: unescape('scanFrom%3A'),
 fn: function (aChunkParser){
 var self=this;
 var chunk=nil;
@@ -649,9 +649,9 @@ return self;}
 smalltalk.ClassCommentReader);
 
 smalltalk.addMethod(
-'_initialize',
+unescape('_initialize'),
 smalltalk.method({
-selector: 'initialize',
+selector: unescape('initialize'),
 fn: function (){
 var self=this;
 smalltalk.send(self, "_initialize", [], smalltalk.Object);
@@ -661,9 +661,9 @@ return self;}
 smalltalk.ClassCommentReader);
 
 smalltalk.addMethod(
-'_setComment_',
+unescape('_setComment_'),
 smalltalk.method({
-selector: 'setComment:',
+selector: unescape('setComment%3A'),
 fn: function (aString){
 var self=this;
 smalltalk.send(self['@class'], "_comment_", [aString]);

+ 6 - 3
js/Kernel-Classes.js

@@ -1,5 +1,6 @@
 smalltalk.addPackage('Kernel-Classes', {});
 smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel-Classes');
+smalltalk.Behavior.comment=unescape('Behavior%20is%20the%20superclass%20of%20all%20class%20objects.%20%0A%0AIt%20defines%20the%20protocol%20for%20creating%20instances%20of%20a%20class%20with%20%60%23basicNew%60%20and%20%60%23new%60%20%28see%20%60boot.js%60%20for%20class%20constructors%20details%29.%0AInstances%20know%20about%20the%20subclass/superclass%20relationships%20between%20classes%2C%20contain%20the%20description%20that%20instances%20are%20created%20from%2C%20%0Aand%20hold%20the%20method%20dictionary%20that%27s%20associated%20with%20each%20class.%0A%0ABehavior%20also%20%20provides%20methods%20for%20compiling%20methods%2C%20examining%20the%20method%20dictionary%2C%20and%20iterating%20over%20the%20class%20hierarchy.')
 smalltalk.addMethod(
 unescape('_new'),
 smalltalk.method({
@@ -174,7 +175,7 @@ smalltalk.addMethod(
 unescape('_addCompiledMethod_'),
 smalltalk.method({
 selector: unescape('addCompiledMethod%3A'),
-category: 'accessing',
+category: 'compiling',
 fn: function (aMethod){
 var self=this;
 smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
@@ -254,7 +255,7 @@ smalltalk.addMethod(
 unescape('_removeCompiledMethod_'),
 smalltalk.method({
 selector: unescape('removeCompiledMethod%3A'),
-category: 'accessing',
+category: 'compiling',
 fn: function (aMethod){
 var self=this;
 delete self.fn.prototype[aMethod.selector._asSelector()];
@@ -272,7 +273,7 @@ smalltalk.addMethod(
 unescape('_inheritsFrom_'),
 smalltalk.method({
 selector: unescape('inheritsFrom%3A'),
-category: 'instance creation',
+category: 'testing',
 fn: function (aClass){
 var self=this;
 return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
@@ -427,6 +428,7 @@ smalltalk.Behavior);
 
 
 smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel-Classes');
+smalltalk.Class.comment=unescape('Class%20is%20__the__%20class%20object.%20%0A%0AInstances%20are%20the%20classes%20of%20the%20system.%0AClass%20creation%20is%20done%20throught%20a%20%60ClassBuilder%60')
 smalltalk.addMethod(
 unescape('_category'),
 smalltalk.method({
@@ -595,6 +597,7 @@ smalltalk.Class);
 
 
 smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel-Classes');
+smalltalk.Metaclass.comment=unescape('Metaclass%20is%20the%20root%20of%20the%20class%20hierarchy.%0A%0AMetaclass%20instances%20are%20metaclasses%2C%20one%20for%20each%20real%20class.%20%0AMetaclass%20instances%20have%20a%20single%20instance%2C%20which%20they%20hold%20onto%2C%20which%20is%20the%20class%20that%20they%20are%20the%20metaclass%20of.')
 smalltalk.addMethod(
 unescape('_instanceClass'),
 smalltalk.method({

+ 31 - 11
st/Kernel-Classes.st

@@ -2,6 +2,14 @@ Smalltalk current createPackage: 'Kernel-Classes' properties: #{}!
 Object subclass: #Behavior
 	instanceVariableNames: ''
 	category: 'Kernel-Classes'!
+!Behavior commentStamp!
+Behavior is the superclass of all class objects. 
+
+It defines the protocol for creating instances of a class with `#basicNew` and `#new` (see `boot.js` for class constructors details).
+Instances know about the subclass/superclass relationships between classes, contain the description that instances are created from, 
+and hold the method dictionary that's associated with each class.
+
+Behavior also  provides methods for compiling methods, examining the method dictionary, and iterating over the class hierarchy.!
 
 !Behavior methodsFor: 'accessing'!
 
@@ -50,10 +58,6 @@ methodsFor: aString
 	    yourself
 !
 
-addCompiledMethod: aMethod
-	<smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self)>
-!
-
 instanceVariableNames
 	<return self.iVarNames>
 !
@@ -72,12 +76,6 @@ commentStamp
 	yourself
 !
 
-removeCompiledMethod: aMethod
-	<delete self.fn.prototype[aMethod.selector._asSelector()];
-	delete self.fn.prototype.methods[aMethod.selector];
-	smalltalk.init(self);>
-!
-
 protocols
     | protocols |
     protocols := Array new.
@@ -123,6 +121,16 @@ commentStamp: aStamp prior: prior
 
 !Behavior methodsFor: 'compiling'!
 
+addCompiledMethod: aMethod
+	<smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self)>
+!
+
+removeCompiledMethod: aMethod
+	<delete self.fn.prototype[aMethod.selector._asSelector()];
+	delete self.fn.prototype.methods[aMethod.selector];
+	smalltalk.init(self);>
+!
+
 compile: aString
 	self compile: aString category: ''
 !
@@ -142,7 +150,9 @@ new
 
 basicNew
 	<return new self.fn()>
-!
+! !
+
+!Behavior methodsFor: 'testing'!
 
 inheritsFrom: aClass
 	^aClass allSubclasses includes: self
@@ -151,6 +161,11 @@ inheritsFrom: aClass
 Behavior subclass: #Class
 	instanceVariableNames: ''
 	category: 'Kernel-Classes'!
+!Class commentStamp!
+Class is __the__ class object. 
+
+Instances are the classes of the system.
+Class creation is done throught a `ClassBuilder`!
 
 !Class methodsFor: 'accessing'!
 
@@ -212,6 +227,11 @@ isClass
 Behavior subclass: #Metaclass
 	instanceVariableNames: ''
 	category: 'Kernel-Classes'!
+!Metaclass commentStamp!
+Metaclass is the root of the class hierarchy.
+
+Metaclass instances are metaclasses, one for each real class. 
+Metaclass instances have a single instance, which they hold onto, which is the class that they are the metaclass of.!
 
 !Metaclass methodsFor: 'accessing'!