|
@@ -2,187 +2,186 @@ 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'),
|
|
|
+unescape('_addCompiledMethod_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('new'),
|
|
|
-category: 'instance creation',
|
|
|
-fn: function (){
|
|
|
+selector: unescape('addCompiledMethod%3A'),
|
|
|
+category: 'compiling',
|
|
|
+fn: function (aMethod){
|
|
|
var self=this;
|
|
|
-return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
|
|
|
+smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
|
|
|
return self;},
|
|
|
-args: [],
|
|
|
-source: unescape('new%0A%09%5Eself%20basicNew%20initialize'),
|
|
|
-messageSends: ["initialize", "basicNew"],
|
|
|
+args: ["aMethod"],
|
|
|
+source: unescape('addCompiledMethod%3A%20aMethod%0A%09%3Csmalltalk.addMethod%28aMethod.selector._asSelector%28%29%2C%20aMethod%2C%20self%29%3E'),
|
|
|
+messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_basicNew'),
|
|
|
+unescape('_allInstanceVariableNames'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('basicNew'),
|
|
|
-category: 'instance creation',
|
|
|
+selector: unescape('allInstanceVariableNames'),
|
|
|
+category: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
-return new self.fn();
|
|
|
+var result=nil;
|
|
|
+(result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []));
|
|
|
+(($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
|
|
|
+return result;
|
|
|
return self;},
|
|
|
args: [],
|
|
|
-source: unescape('basicNew%0A%09%3Creturn%20new%20self.fn%28%29%3E'),
|
|
|
-messageSends: [],
|
|
|
+source: unescape('allInstanceVariableNames%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20self%20instanceVariableNames%20copy.%0A%09self%20superclass%20ifNotNil%3A%20%5B%0A%09%20%20%20%20result%20addAll%3A%20self%20superclass%20allInstanceVariableNames%5D.%0A%09%5Eresult'),
|
|
|
+messageSends: ["copy", "instanceVariableNames", "ifNotNil:", "superclass", "addAll:", "allInstanceVariableNames"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_name'),
|
|
|
+unescape('_allSubclasses'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('name'),
|
|
|
+selector: unescape('allSubclasses'),
|
|
|
category: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
-return self.className || nil;
|
|
|
+var result=nil;
|
|
|
+(result=smalltalk.send(self, "_subclasses", []));
|
|
|
+smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
|
|
|
+return result;
|
|
|
return self;},
|
|
|
args: [],
|
|
|
-source: unescape('name%0A%09%3Creturn%20self.className%20%7C%7C%20nil%3E'),
|
|
|
-messageSends: [],
|
|
|
+source: unescape('allSubclasses%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20self%20subclasses.%0A%09self%20subclasses%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20result%20addAll%3A%20each%20allSubclasses%5D.%0A%09%5Eresult'),
|
|
|
+messageSends: ["subclasses", "do:", "addAll:", "allSubclasses"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_superclass'),
|
|
|
+unescape('_basicNew'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('superclass'),
|
|
|
-category: 'accessing',
|
|
|
+selector: unescape('basicNew'),
|
|
|
+category: 'instance creation',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
-return self.superclass || nil;
|
|
|
+return new self.fn();
|
|
|
return self;},
|
|
|
args: [],
|
|
|
-source: unescape('superclass%0A%09%3Creturn%20self.superclass%20%7C%7C%20nil%3E'),
|
|
|
+source: unescape('basicNew%0A%09%3Creturn%20new%20self.fn%28%29%3E'),
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_subclasses'),
|
|
|
+unescape('_comment'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('subclasses'),
|
|
|
+selector: unescape('comment'),
|
|
|
category: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
-return smalltalk.subclasses(self);
|
|
|
+return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
|
|
|
return self;},
|
|
|
args: [],
|
|
|
-source: unescape('subclasses%0A%09%3Creturn%20smalltalk.subclasses%28self%29%3E'),
|
|
|
-messageSends: [],
|
|
|
+source: unescape('comment%0A%20%20%20%20%5E%28self%20basicAt%3A%20%27comment%27%29%20ifNil%3A%20%5B%27%27%5D'),
|
|
|
+messageSends: ["ifNil:", "basicAt:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_allSubclasses'),
|
|
|
+unescape('_comment_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('allSubclasses'),
|
|
|
+selector: unescape('comment%3A'),
|
|
|
category: 'accessing',
|
|
|
-fn: function (){
|
|
|
+fn: function (aString){
|
|
|
var self=this;
|
|
|
-var result=nil;
|
|
|
-(result=smalltalk.send(self, "_subclasses", []));
|
|
|
-smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
|
|
|
-return result;
|
|
|
+smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
|
|
|
return self;},
|
|
|
-args: [],
|
|
|
-source: unescape('allSubclasses%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20self%20subclasses.%0A%09self%20subclasses%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20result%20addAll%3A%20each%20allSubclasses%5D.%0A%09%5Eresult'),
|
|
|
-messageSends: ["subclasses", "do:", "addAll:", "allSubclasses"],
|
|
|
+args: ["aString"],
|
|
|
+source: unescape('comment%3A%20aString%0A%20%20%20%20self%20basicAt%3A%20%27comment%27%20put%3A%20aString'),
|
|
|
+messageSends: ["basicAt:put:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_withAllSubclasses'),
|
|
|
+unescape('_commentStamp'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('withAllSubclasses'),
|
|
|
+selector: unescape('commentStamp'),
|
|
|
category: 'accessing',
|
|
|
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]));
|
|
|
+return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
|
|
|
return self;},
|
|
|
args: [],
|
|
|
-source: unescape('withAllSubclasses%0A%09%5E%28Array%20with%3A%20self%29%20addAll%3A%20self%20allSubclasses%3B%20yourself'),
|
|
|
-messageSends: ["addAll:", "allSubclasses", "yourself", "with:"],
|
|
|
-referencedClasses: ["Array"]
|
|
|
+source: unescape('commentStamp%0A%20%20%20%20%5EClassCommentReader%20new%0A%09class%3A%20self%3B%0A%09yourself'),
|
|
|
+messageSends: ["class:", "yourself", "new"],
|
|
|
+referencedClasses: ["ClassCommentReader"]
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_prototype'),
|
|
|
+unescape('_commentStamp_prior_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('prototype'),
|
|
|
+selector: unescape('commentStamp%3Aprior%3A'),
|
|
|
category: 'accessing',
|
|
|
-fn: function (){
|
|
|
+fn: function (aStamp, prior){
|
|
|
var self=this;
|
|
|
-return self.fn.prototype;
|
|
|
+return smalltalk.send(self, "_commentStamp", []);
|
|
|
return self;},
|
|
|
-args: [],
|
|
|
-source: unescape('prototype%0A%09%3Creturn%20self.fn.prototype%3E'),
|
|
|
-messageSends: [],
|
|
|
+args: ["aStamp", "prior"],
|
|
|
+source: unescape('commentStamp%3A%20aStamp%20prior%3A%20prior%0A%20%20%20%20%20%20%20%20%5Eself%20commentStamp'),
|
|
|
+messageSends: ["commentStamp"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_methodDictionary'),
|
|
|
+unescape('_compile_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('methodDictionary'),
|
|
|
-category: 'accessing',
|
|
|
-fn: function (){
|
|
|
+selector: unescape('compile%3A'),
|
|
|
+category: 'compiling',
|
|
|
+fn: function (aString){
|
|
|
var self=this;
|
|
|
-var dict = smalltalk.HashedCollection._new();
|
|
|
- var methods = self.fn.prototype.methods;
|
|
|
- for(var i in methods) {
|
|
|
- if(methods[i].selector) {
|
|
|
- dict._at_put_(methods[i].selector, methods[i]);
|
|
|
- }
|
|
|
- };
|
|
|
- return dict;
|
|
|
+smalltalk.send(self, "_compile_category_", [aString, ""]);
|
|
|
return self;},
|
|
|
-args: [],
|
|
|
-source: unescape('methodDictionary%0A%09%3Cvar%20dict%20%3D%20smalltalk.HashedCollection._new%28%29%3B%0A%09var%20methods%20%3D%20self.fn.prototype.methods%3B%0A%09for%28var%20i%20in%20methods%29%20%7B%0A%09%09if%28methods%5Bi%5D.selector%29%20%7B%0A%09%09%09dict._at_put_%28methods%5Bi%5D.selector%2C%20methods%5Bi%5D%29%3B%0A%09%09%7D%0A%09%7D%3B%0A%09return%20dict%3E'),
|
|
|
-messageSends: [],
|
|
|
+args: ["aString"],
|
|
|
+source: unescape('compile%3A%20aString%0A%09self%20compile%3A%20aString%20category%3A%20%27%27'),
|
|
|
+messageSends: ["compile:category:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_methodsFor_'),
|
|
|
+unescape('_compile_category_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('methodsFor%3A'),
|
|
|
-category: 'accessing',
|
|
|
-fn: function (aString){
|
|
|
+selector: unescape('compile%3Acategory%3A'),
|
|
|
+category: 'compiling',
|
|
|
+fn: function (aString, anotherString){
|
|
|
var self=this;
|
|
|
-return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
|
|
|
+var method=nil;
|
|
|
+(method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self]));
|
|
|
+smalltalk.send(method, "_category_", [anotherString]);
|
|
|
+smalltalk.send(self, "_addCompiledMethod_", [method]);
|
|
|
return self;},
|
|
|
-args: ["aString"],
|
|
|
-source: unescape('methodsFor%3A%20aString%0A%09%5EClassCategoryReader%20new%0A%09%20%20%20%20class%3A%20self%20category%3A%20aString%3B%0A%09%20%20%20%20yourself'),
|
|
|
-messageSends: ["class:category:", "yourself", "new"],
|
|
|
-referencedClasses: ["ClassCategoryReader"]
|
|
|
+args: ["aString", "anotherString"],
|
|
|
+source: unescape('compile%3A%20aString%20category%3A%20anotherString%0A%09%7C%20method%20%7C%0A%09method%20%3A%3D%20Compiler%20new%20load%3A%20aString%20forClass%3A%20self.%0A%09method%20category%3A%20anotherString.%0A%09self%20addCompiledMethod%3A%20method'),
|
|
|
+messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
|
|
|
+referencedClasses: ["Compiler"]
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_addCompiledMethod_'),
|
|
|
+unescape('_inheritsFrom_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('addCompiledMethod%3A'),
|
|
|
-category: 'compiling',
|
|
|
-fn: function (aMethod){
|
|
|
+selector: unescape('inheritsFrom%3A'),
|
|
|
+category: 'testing',
|
|
|
+fn: function (aClass){
|
|
|
var self=this;
|
|
|
-smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
|
|
|
+return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
|
|
|
return self;},
|
|
|
-args: ["aMethod"],
|
|
|
-source: unescape('addCompiledMethod%3A%20aMethod%0A%09%3Csmalltalk.addMethod%28aMethod.selector._asSelector%28%29%2C%20aMethod%2C%20self%29%3E'),
|
|
|
-messageSends: [],
|
|
|
+args: ["aClass"],
|
|
|
+source: unescape('inheritsFrom%3A%20aClass%0A%09%5EaClass%20allSubclasses%20includes%3A%20self'),
|
|
|
+messageSends: ["includes:", "allSubclasses"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
@@ -204,83 +203,104 @@ referencedClasses: []
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_comment'),
|
|
|
+unescape('_methodAt_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('comment'),
|
|
|
+selector: unescape('methodAt%3A'),
|
|
|
+category: 'accessing',
|
|
|
+fn: function (aString){
|
|
|
+var self=this;
|
|
|
+return smalltalk.methods(self)[aString];
|
|
|
+return self;},
|
|
|
+args: ["aString"],
|
|
|
+source: unescape('methodAt%3A%20aString%0A%09%3Creturn%20smalltalk.methods%28self%29%5BaString%5D%3E'),
|
|
|
+messageSends: [],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+smalltalk.Behavior);
|
|
|
+
|
|
|
+smalltalk.addMethod(
|
|
|
+unescape('_methodDictionary'),
|
|
|
+smalltalk.method({
|
|
|
+selector: unescape('methodDictionary'),
|
|
|
category: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
-return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
|
|
|
+var dict = smalltalk.HashedCollection._new();
|
|
|
+ var methods = self.fn.prototype.methods;
|
|
|
+ for(var i in methods) {
|
|
|
+ if(methods[i].selector) {
|
|
|
+ dict._at_put_(methods[i].selector, methods[i]);
|
|
|
+ }
|
|
|
+ };
|
|
|
+ return dict;
|
|
|
return self;},
|
|
|
args: [],
|
|
|
-source: unescape('comment%0A%20%20%20%20%5E%28self%20basicAt%3A%20%27comment%27%29%20ifNil%3A%20%5B%27%27%5D'),
|
|
|
-messageSends: ["ifNil:", "basicAt:"],
|
|
|
+source: unescape('methodDictionary%0A%09%3Cvar%20dict%20%3D%20smalltalk.HashedCollection._new%28%29%3B%0A%09var%20methods%20%3D%20self.fn.prototype.methods%3B%0A%09for%28var%20i%20in%20methods%29%20%7B%0A%09%09if%28methods%5Bi%5D.selector%29%20%7B%0A%09%09%09dict._at_put_%28methods%5Bi%5D.selector%2C%20methods%5Bi%5D%29%3B%0A%09%09%7D%0A%09%7D%3B%0A%09return%20dict%3E'),
|
|
|
+messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_comment_'),
|
|
|
+unescape('_methodsFor_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('comment%3A'),
|
|
|
+selector: unescape('methodsFor%3A'),
|
|
|
category: 'accessing',
|
|
|
fn: function (aString){
|
|
|
var self=this;
|
|
|
-smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
|
|
|
+return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
|
|
|
return self;},
|
|
|
args: ["aString"],
|
|
|
-source: unescape('comment%3A%20aString%0A%20%20%20%20self%20basicAt%3A%20%27comment%27%20put%3A%20aString'),
|
|
|
-messageSends: ["basicAt:put:"],
|
|
|
-referencedClasses: []
|
|
|
+source: unescape('methodsFor%3A%20aString%0A%09%5EClassCategoryReader%20new%0A%09%20%20%20%20class%3A%20self%20category%3A%20aString%3B%0A%09%20%20%20%20yourself'),
|
|
|
+messageSends: ["class:category:", "yourself", "new"],
|
|
|
+referencedClasses: ["ClassCategoryReader"]
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_commentStamp'),
|
|
|
+unescape('_methodsFor_stamp_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('commentStamp'),
|
|
|
+selector: unescape('methodsFor%3Astamp%3A'),
|
|
|
category: 'accessing',
|
|
|
-fn: function (){
|
|
|
+fn: function (aString, aStamp){
|
|
|
var self=this;
|
|
|
-return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
|
|
|
+return smalltalk.send(self, "_methodsFor_", [aString]);
|
|
|
return self;},
|
|
|
-args: [],
|
|
|
-source: unescape('commentStamp%0A%20%20%20%20%5EClassCommentReader%20new%0A%09class%3A%20self%3B%0A%09yourself'),
|
|
|
-messageSends: ["class:", "yourself", "new"],
|
|
|
-referencedClasses: ["ClassCommentReader"]
|
|
|
+args: ["aString", "aStamp"],
|
|
|
+source: unescape('methodsFor%3A%20aString%20stamp%3A%20aStamp%0A%09%22Added%20for%20compatibility%2C%20right%20now%20ignores%20stamp.%22%0A%09%5Eself%20methodsFor%3A%20aString'),
|
|
|
+messageSends: ["methodsFor:"],
|
|
|
+referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_removeCompiledMethod_'),
|
|
|
+unescape('_name'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('removeCompiledMethod%3A'),
|
|
|
-category: 'compiling',
|
|
|
-fn: function (aMethod){
|
|
|
+selector: unescape('name'),
|
|
|
+category: 'accessing',
|
|
|
+fn: function (){
|
|
|
var self=this;
|
|
|
-delete self.fn.prototype[aMethod.selector._asSelector()];
|
|
|
- delete self.fn.prototype.methods[aMethod.selector];
|
|
|
- smalltalk.init(self);;
|
|
|
+return self.className || nil;
|
|
|
return self;},
|
|
|
-args: ["aMethod"],
|
|
|
-source: unescape('removeCompiledMethod%3A%20aMethod%0A%09%3Cdelete%20self.fn.prototype%5BaMethod.selector._asSelector%28%29%5D%3B%0A%09delete%20self.fn.prototype.methods%5BaMethod.selector%5D%3B%0A%09smalltalk.init%28self%29%3B%3E'),
|
|
|
+args: [],
|
|
|
+source: unescape('name%0A%09%3Creturn%20self.className%20%7C%7C%20nil%3E'),
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_inheritsFrom_'),
|
|
|
+unescape('_new'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('inheritsFrom%3A'),
|
|
|
-category: 'testing',
|
|
|
-fn: function (aClass){
|
|
|
+selector: unescape('new'),
|
|
|
+category: 'instance creation',
|
|
|
+fn: function (){
|
|
|
var self=this;
|
|
|
-return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
|
|
|
+return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
|
|
|
return self;},
|
|
|
-args: ["aClass"],
|
|
|
-source: unescape('inheritsFrom%3A%20aClass%0A%09%5EaClass%20allSubclasses%20includes%3A%20self'),
|
|
|
-messageSends: ["includes:", "allSubclasses"],
|
|
|
+args: [],
|
|
|
+source: unescape('new%0A%09%5Eself%20basicNew%20initialize'),
|
|
|
+messageSends: ["initialize", "basicNew"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
@@ -324,104 +344,84 @@ referencedClasses: ["HashedCollection", "Array"]
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_allInstanceVariableNames'),
|
|
|
+unescape('_prototype'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('allInstanceVariableNames'),
|
|
|
+selector: unescape('prototype'),
|
|
|
category: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
-var result=nil;
|
|
|
-(result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []));
|
|
|
-(($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
|
|
|
-return result;
|
|
|
+return self.fn.prototype;
|
|
|
return self;},
|
|
|
args: [],
|
|
|
-source: unescape('allInstanceVariableNames%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20self%20instanceVariableNames%20copy.%0A%09self%20superclass%20ifNotNil%3A%20%5B%0A%09%20%20%20%20result%20addAll%3A%20self%20superclass%20allInstanceVariableNames%5D.%0A%09%5Eresult'),
|
|
|
-messageSends: ["copy", "instanceVariableNames", "ifNotNil:", "superclass", "addAll:", "allInstanceVariableNames"],
|
|
|
+source: unescape('prototype%0A%09%3Creturn%20self.fn.prototype%3E'),
|
|
|
+messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_methodAt_'),
|
|
|
+unescape('_removeCompiledMethod_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('methodAt%3A'),
|
|
|
-category: 'accessing',
|
|
|
-fn: function (aString){
|
|
|
+selector: unescape('removeCompiledMethod%3A'),
|
|
|
+category: 'compiling',
|
|
|
+fn: function (aMethod){
|
|
|
var self=this;
|
|
|
-return smalltalk.methods(self)[aString];
|
|
|
+delete self.fn.prototype[aMethod.selector._asSelector()];
|
|
|
+ delete self.fn.prototype.methods[aMethod.selector];
|
|
|
+ smalltalk.init(self);;
|
|
|
return self;},
|
|
|
-args: ["aString"],
|
|
|
-source: unescape('methodAt%3A%20aString%0A%09%3Creturn%20smalltalk.methods%28self%29%5BaString%5D%3E'),
|
|
|
+args: ["aMethod"],
|
|
|
+source: unescape('removeCompiledMethod%3A%20aMethod%0A%09%3Cdelete%20self.fn.prototype%5BaMethod.selector._asSelector%28%29%5D%3B%0A%09delete%20self.fn.prototype.methods%5BaMethod.selector%5D%3B%0A%09smalltalk.init%28self%29%3B%3E'),
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_methodsFor_stamp_'),
|
|
|
+unescape('_subclasses'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('methodsFor%3Astamp%3A'),
|
|
|
+selector: unescape('subclasses'),
|
|
|
category: 'accessing',
|
|
|
-fn: function (aString, aStamp){
|
|
|
+fn: function (){
|
|
|
var self=this;
|
|
|
-return smalltalk.send(self, "_methodsFor_", [aString]);
|
|
|
+return smalltalk.subclasses(self);
|
|
|
return self;},
|
|
|
-args: ["aString", "aStamp"],
|
|
|
-source: unescape('methodsFor%3A%20aString%20stamp%3A%20aStamp%0A%09%22Added%20for%20compatibility%2C%20right%20now%20ignores%20stamp.%22%0A%09%5Eself%20methodsFor%3A%20aString'),
|
|
|
-messageSends: ["methodsFor:"],
|
|
|
+args: [],
|
|
|
+source: unescape('subclasses%0A%09%3Creturn%20smalltalk.subclasses%28self%29%3E'),
|
|
|
+messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_commentStamp_prior_'),
|
|
|
+unescape('_superclass'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('commentStamp%3Aprior%3A'),
|
|
|
+selector: unescape('superclass'),
|
|
|
category: 'accessing',
|
|
|
-fn: function (aStamp, prior){
|
|
|
-var self=this;
|
|
|
-return smalltalk.send(self, "_commentStamp", []);
|
|
|
-return self;},
|
|
|
-args: ["aStamp", "prior"],
|
|
|
-source: unescape('commentStamp%3A%20aStamp%20prior%3A%20prior%0A%20%20%20%20%20%20%20%20%5Eself%20commentStamp'),
|
|
|
-messageSends: ["commentStamp"],
|
|
|
-referencedClasses: []
|
|
|
-}),
|
|
|
-smalltalk.Behavior);
|
|
|
-
|
|
|
-smalltalk.addMethod(
|
|
|
-unescape('_compile_'),
|
|
|
-smalltalk.method({
|
|
|
-selector: unescape('compile%3A'),
|
|
|
-category: 'compiling',
|
|
|
-fn: function (aString){
|
|
|
+fn: function (){
|
|
|
var self=this;
|
|
|
-smalltalk.send(self, "_compile_category_", [aString, ""]);
|
|
|
+return self.superclass || nil;
|
|
|
return self;},
|
|
|
-args: ["aString"],
|
|
|
-source: unescape('compile%3A%20aString%0A%09self%20compile%3A%20aString%20category%3A%20%27%27'),
|
|
|
-messageSends: ["compile:category:"],
|
|
|
+args: [],
|
|
|
+source: unescape('superclass%0A%09%3Creturn%20self.superclass%20%7C%7C%20nil%3E'),
|
|
|
+messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_compile_category_'),
|
|
|
+unescape('_withAllSubclasses'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('compile%3Acategory%3A'),
|
|
|
-category: 'compiling',
|
|
|
-fn: function (aString, anotherString){
|
|
|
+selector: unescape('withAllSubclasses'),
|
|
|
+category: 'accessing',
|
|
|
+fn: function (){
|
|
|
var self=this;
|
|
|
-var method=nil;
|
|
|
-(method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self]));
|
|
|
-smalltalk.send(method, "_category_", [anotherString]);
|
|
|
-smalltalk.send(self, "_addCompiledMethod_", [method]);
|
|
|
+return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
|
|
|
return self;},
|
|
|
-args: ["aString", "anotherString"],
|
|
|
-source: unescape('compile%3A%20aString%20category%3A%20anotherString%0A%09%7C%20method%20%7C%0A%09method%20%3A%3D%20Compiler%20new%20load%3A%20aString%20forClass%3A%20self.%0A%09method%20category%3A%20anotherString.%0A%09self%20addCompiledMethod%3A%20method'),
|
|
|
-messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
|
|
|
-referencedClasses: ["Compiler"]
|
|
|
+args: [],
|
|
|
+source: unescape('withAllSubclasses%0A%09%5E%28Array%20with%3A%20self%29%20addAll%3A%20self%20allSubclasses%3B%20yourself'),
|
|
|
+messageSends: ["addAll:", "allSubclasses", "yourself", "with:"],
|
|
|
+referencedClasses: ["Array"]
|
|
|
}),
|
|
|
smalltalk.Behavior);
|
|
|
|
|
@@ -446,49 +446,48 @@ referencedClasses: []
|
|
|
smalltalk.Class);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_subclass_instanceVariableNames_'),
|
|
|
+unescape('_isClass'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('subclass%3AinstanceVariableNames%3A'),
|
|
|
-category: 'class creation',
|
|
|
-fn: function (aString, anotherString){
|
|
|
+selector: unescape('isClass'),
|
|
|
+category: 'testing',
|
|
|
+fn: function (){
|
|
|
var self=this;
|
|
|
-return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
|
|
|
+return true;
|
|
|
return self;},
|
|
|
-args: ["aString", "anotherString"],
|
|
|
-source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20package%3A%20nil'),
|
|
|
-messageSends: ["subclass:instanceVariableNames:package:"],
|
|
|
+args: [],
|
|
|
+source: unescape('isClass%0A%09%5Etrue'),
|
|
|
+messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Class);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_subclass_instanceVariableNames_category_'),
|
|
|
+unescape('_package'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
|
|
|
-category: 'class creation',
|
|
|
-fn: function (aString, aString2, aString3){
|
|
|
+selector: unescape('package'),
|
|
|
+category: 'accessing',
|
|
|
+fn: function (){
|
|
|
var self=this;
|
|
|
-smalltalk.send(self, "_deprecatedAPI", []);
|
|
|
-return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
|
|
|
+return self.pkg;
|
|
|
return self;},
|
|
|
-args: ["aString", "aString2", "aString3"],
|
|
|
-source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09self%20deprecatedAPI.%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
|
|
|
-messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
|
|
|
+args: [],
|
|
|
+source: unescape('package%0A%09%3Creturn%20self.pkg%3E'),
|
|
|
+messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Class);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_isClass'),
|
|
|
-smalltalk.method({
|
|
|
-selector: unescape('isClass'),
|
|
|
-category: 'testing',
|
|
|
-fn: function (){
|
|
|
+unescape('_package_'),
|
|
|
+smalltalk.method({
|
|
|
+selector: unescape('package%3A'),
|
|
|
+category: 'accessing',
|
|
|
+fn: function (aPackage){
|
|
|
var self=this;
|
|
|
-return true;
|
|
|
+self.pkg = aPackage;
|
|
|
return self;},
|
|
|
-args: [],
|
|
|
-source: unescape('isClass%0A%09%5Etrue'),
|
|
|
+args: ["aPackage"],
|
|
|
+source: unescape('package%3A%20aPackage%0A%09%3Cself.pkg%20%3D%20aPackage%3E'),
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
@@ -531,49 +530,50 @@ referencedClasses: []
|
|
|
smalltalk.Class);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_'),
|
|
|
+unescape('_subclass_instanceVariableNames_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('subclass%3AinstanceVariableNames%3AclassVariableNames%3ApoolDictionaries%3Acategory%3A'),
|
|
|
+selector: unescape('subclass%3AinstanceVariableNames%3A'),
|
|
|
category: 'class creation',
|
|
|
-fn: function (aString, aString2, classVars, pools, aString3){
|
|
|
+fn: function (aString, anotherString){
|
|
|
var self=this;
|
|
|
-return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
|
|
|
+return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
|
|
|
return self;},
|
|
|
-args: ["aString", "aString2", "classVars", "pools", "aString3"],
|
|
|
-source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20classVariableNames%3A%20classVars%20poolDictionaries%3A%20pools%20category%3A%20aString3%0A%09%22Just%20ignore%20class%20variables%20and%20pools.%20Added%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
|
|
|
+args: ["aString", "anotherString"],
|
|
|
+source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%0A%09%22Kept%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20anotherString%20package%3A%20nil'),
|
|
|
messageSends: ["subclass:instanceVariableNames:package:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Class);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_package'),
|
|
|
+unescape('_subclass_instanceVariableNames_category_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('package'),
|
|
|
-category: 'accessing',
|
|
|
-fn: function (){
|
|
|
+selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
|
|
|
+category: 'class creation',
|
|
|
+fn: function (aString, aString2, aString3){
|
|
|
var self=this;
|
|
|
-return self.pkg;
|
|
|
+smalltalk.send(self, "_deprecatedAPI", []);
|
|
|
+return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
|
|
|
return self;},
|
|
|
-args: [],
|
|
|
-source: unescape('package%0A%09%3Creturn%20self.pkg%3E'),
|
|
|
-messageSends: [],
|
|
|
+args: ["aString", "aString2", "aString3"],
|
|
|
+source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3%0A%09%22Kept%20for%20compatibility.%22%0A%09self%20deprecatedAPI.%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
|
|
|
+messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Class);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_package_'),
|
|
|
+unescape('_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('package%3A'),
|
|
|
-category: 'accessing',
|
|
|
-fn: function (aPackage){
|
|
|
+selector: unescape('subclass%3AinstanceVariableNames%3AclassVariableNames%3ApoolDictionaries%3Acategory%3A'),
|
|
|
+category: 'class creation',
|
|
|
+fn: function (aString, aString2, classVars, pools, aString3){
|
|
|
var self=this;
|
|
|
-self.pkg = aPackage;
|
|
|
+return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
|
|
|
return self;},
|
|
|
-args: ["aPackage"],
|
|
|
-source: unescape('package%3A%20aPackage%0A%09%3Cself.pkg%20%3D%20aPackage%3E'),
|
|
|
-messageSends: [],
|
|
|
+args: ["aString", "aString2", "classVars", "pools", "aString3"],
|
|
|
+source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20classVariableNames%3A%20classVars%20poolDictionaries%3A%20pools%20category%3A%20aString3%0A%09%22Just%20ignore%20class%20variables%20and%20pools.%20Added%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
|
|
|
+messageSends: ["subclass:instanceVariableNames:package:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.Class);
|
|
@@ -667,17 +667,35 @@ smalltalk.Metaclass);
|
|
|
smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel-Classes');
|
|
|
smalltalk.ClassBuilder.comment=unescape('ClassBuilder%20is%20responsible%20for%20compiling%20new%20classes%20or%20modifying%20existing%20classes%20in%20the%20system.%0A%0ARather%20than%20using%20ClassBuilder%20directly%20to%20compile%20a%20class%2C%20use%20%60Class%20%3E%3E%20subclass%3AinstanceVariableNames%3Apackage%3A%60.')
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_superclass_subclass_'),
|
|
|
+unescape('_addSubclassOf_named_instanceVariableNames_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('superclass%3Asubclass%3A'),
|
|
|
-category: 'class creation',
|
|
|
-fn: function (aClass, aString){
|
|
|
+selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3A'),
|
|
|
+category: 'private',
|
|
|
+fn: function (aClass, aString, aCollection){
|
|
|
var self=this;
|
|
|
-return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
|
|
|
+smalltalk.addClass(aString, aClass, aCollection);
|
|
|
+ return smalltalk[aString];
|
|
|
return self;},
|
|
|
-args: ["aClass", "aString"],
|
|
|
-source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%0A%09%5Eself%20superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20%27%27%20package%3A%20nil'),
|
|
|
-messageSends: ["superclass:subclass:instanceVariableNames:package:"],
|
|
|
+args: ["aClass", "aString", "aCollection"],
|
|
|
+source: unescape('addSubclassOf%3A%20aClass%20named%3A%20aString%20instanceVariableNames%3A%20aCollection%0A%09%3Csmalltalk.addClass%28aString%2C%20aClass%2C%20aCollection%29%3B%0A%09%20%20%20%20return%20smalltalk%5BaString%5D%3E'),
|
|
|
+messageSends: [],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+smalltalk.ClassBuilder);
|
|
|
+
|
|
|
+smalltalk.addMethod(
|
|
|
+unescape('_addSubclassOf_named_instanceVariableNames_package_'),
|
|
|
+smalltalk.method({
|
|
|
+selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3Apackage%3A'),
|
|
|
+category: 'private',
|
|
|
+fn: function (aClass, aString, aCollection, packageName){
|
|
|
+var self=this;
|
|
|
+smalltalk.addClass(aString, aClass, aCollection, packageName);
|
|
|
+ return smalltalk[aString];
|
|
|
+return self;},
|
|
|
+args: ["aClass", "aString", "aCollection", "packageName"],
|
|
|
+source: unescape('addSubclassOf%3A%20aClass%20named%3A%20aString%20instanceVariableNames%3A%20aCollection%20package%3A%20packageName%0A%09%3Csmalltalk.addClass%28aString%2C%20aClass%2C%20aCollection%2C%20packageName%29%3B%0A%09%20%20%20%20return%20smalltalk%5BaString%5D%3E'),
|
|
|
+messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.ClassBuilder);
|
|
@@ -700,6 +718,28 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.ClassBuilder);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+unescape('_copyClass_named_'),
|
|
|
+smalltalk.method({
|
|
|
+selector: unescape('copyClass%3Anamed%3A'),
|
|
|
+category: 'private',
|
|
|
+fn: function (aClass, aString){
|
|
|
+var self=this;
|
|
|
+var newClass=nil;
|
|
|
+(newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), aString, smalltalk.send(aClass, "_instanceVariableNames", []), smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]));
|
|
|
+smalltalk.send(self, "_setupClass_", [newClass]);
|
|
|
+smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){smalltalk.send(newClass, "_addCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [smalltalk.send(each, "_source", []), newClass])]);return smalltalk.send(smalltalk.send(smalltalk.send(newClass, "_methodDictionary", []), "_at_", [smalltalk.send(each, "_selector", [])]), "_category_", [smalltalk.send(each, "_category", [])]);})]);
|
|
|
+smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){smalltalk.send(smalltalk.send(newClass, "_class", []), "_addCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [smalltalk.send(each, "_source", []), smalltalk.send(newClass, "_class", [])])]);return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(newClass, "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(each, "_selector", [])]), "_category_", [smalltalk.send(each, "_category", [])]);})]);
|
|
|
+smalltalk.send(self, "_setupClass_", [newClass]);
|
|
|
+return newClass;
|
|
|
+return self;},
|
|
|
+args: ["aClass", "aString"],
|
|
|
+source: unescape('copyClass%3A%20aClass%20named%3A%20aString%0A%09%7C%20newClass%20%7C%0A%0A%09newClass%20%3A%3D%20self%20%0A%09%09addSubclassOf%3A%20aClass%20superclass%0A%09%09named%3A%20aString%20%0A%09%09instanceVariableNames%3A%20aClass%20instanceVariableNames%20%0A%09%09package%3A%20aClass%20package%20name.%0A%0A%09self%20setupClass%3A%20newClass.%0A%0A%09aClass%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09newClass%20addCompiledMethod%3A%20%28Compiler%20new%20load%3A%20each%20source%20forClass%3A%20newClass%29.%0A%09%09%28newClass%20methodDictionary%20at%3A%20each%20selector%29%20category%3A%20each%20category%5D.%0A%0A%09aClass%20class%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09newClass%20class%20addCompiledMethod%3A%20%28Compiler%20new%20load%3A%20each%20source%20forClass%3A%20newClass%20class%29.%0A%09%09%28newClass%20class%20methodDictionary%20at%3A%20each%20selector%29%20category%3A%20each%20category%5D.%0A%0A%09self%20setupClass%3A%20newClass.%0A%09%5EnewClass'),
|
|
|
+messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "instanceVariableNames", "name", "package", "setupClass:", "do:", "values", "methodDictionary", "addCompiledMethod:", "load:forClass:", "new", "source", "category:", "at:", "selector", "category", "class"],
|
|
|
+referencedClasses: ["Compiler"]
|
|
|
+}),
|
|
|
+smalltalk.ClassBuilder);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
unescape('_instanceVariableNamesFor_'),
|
|
|
smalltalk.method({
|
|
@@ -717,34 +757,33 @@ referencedClasses: []
|
|
|
smalltalk.ClassBuilder);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_addSubclassOf_named_instanceVariableNames_'),
|
|
|
+unescape('_setupClass_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3A'),
|
|
|
+selector: unescape('setupClass%3A'),
|
|
|
category: 'private',
|
|
|
-fn: function (aClass, aString, aCollection){
|
|
|
+fn: function (aClass){
|
|
|
var self=this;
|
|
|
-smalltalk.addClass(aString, aClass, aCollection);
|
|
|
- return smalltalk[aString];
|
|
|
+smalltalk.init(aClass);;
|
|
|
return self;},
|
|
|
-args: ["aClass", "aString", "aCollection"],
|
|
|
-source: unescape('addSubclassOf%3A%20aClass%20named%3A%20aString%20instanceVariableNames%3A%20aCollection%0A%09%3Csmalltalk.addClass%28aString%2C%20aClass%2C%20aCollection%29%3B%0A%09%20%20%20%20return%20smalltalk%5BaString%5D%3E'),
|
|
|
+args: ["aClass"],
|
|
|
+source: unescape('setupClass%3A%20aClass%0A%09%3Csmalltalk.init%28aClass%29%3B%3E'),
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.ClassBuilder);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_setupClass_'),
|
|
|
+unescape('_superclass_subclass_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('setupClass%3A'),
|
|
|
-category: 'private',
|
|
|
-fn: function (aClass){
|
|
|
+selector: unescape('superclass%3Asubclass%3A'),
|
|
|
+category: 'class creation',
|
|
|
+fn: function (aClass, aString){
|
|
|
var self=this;
|
|
|
-smalltalk.init(aClass);;
|
|
|
+return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
|
|
|
return self;},
|
|
|
-args: ["aClass"],
|
|
|
-source: unescape('setupClass%3A%20aClass%0A%09%3Csmalltalk.init%28aClass%29%3B%3E'),
|
|
|
-messageSends: [],
|
|
|
+args: ["aClass", "aString"],
|
|
|
+source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%0A%09%5Eself%20superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20%27%27%20package%3A%20nil'),
|
|
|
+messageSends: ["superclass:subclass:instanceVariableNames:package:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.ClassBuilder);
|
|
@@ -768,49 +807,48 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.ClassBuilder);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel-Classes');
|
|
|
+smalltalk.ClassCategoryReader.comment=unescape('ClassCategoryReader%20represents%20a%20mechanism%20for%20retrieving%20class%20descriptions%20stored%20on%20a%20file.')
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_addSubclassOf_named_instanceVariableNames_package_'),
|
|
|
+unescape('_class_category_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3Apackage%3A'),
|
|
|
-category: 'private',
|
|
|
-fn: function (aClass, aString, aCollection, packageName){
|
|
|
+selector: unescape('class%3Acategory%3A'),
|
|
|
+category: 'accessing',
|
|
|
+fn: function (aClass, aString){
|
|
|
var self=this;
|
|
|
-smalltalk.addClass(aString, aClass, aCollection, packageName);
|
|
|
- return smalltalk[aString];
|
|
|
+(self['@class']=aClass);
|
|
|
+(self['@category']=aString);
|
|
|
return self;},
|
|
|
-args: ["aClass", "aString", "aCollection", "packageName"],
|
|
|
-source: unescape('addSubclassOf%3A%20aClass%20named%3A%20aString%20instanceVariableNames%3A%20aCollection%20package%3A%20packageName%0A%09%3Csmalltalk.addClass%28aString%2C%20aClass%2C%20aCollection%2C%20packageName%29%3B%0A%09%20%20%20%20return%20smalltalk%5BaString%5D%3E'),
|
|
|
+args: ["aClass", "aString"],
|
|
|
+source: unescape('class%3A%20aClass%20category%3A%20aString%0A%09class%20%3A%3D%20aClass.%0A%09category%20%3A%3D%20aString'),
|
|
|
messageSends: [],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
-smalltalk.ClassBuilder);
|
|
|
+smalltalk.ClassCategoryReader);
|
|
|
|
|
|
smalltalk.addMethod(
|
|
|
-unescape('_copyClass_named_'),
|
|
|
+unescape('_compileMethod_'),
|
|
|
smalltalk.method({
|
|
|
-selector: unescape('copyClass%3Anamed%3A'),
|
|
|
+selector: unescape('compileMethod%3A'),
|
|
|
category: 'private',
|
|
|
-fn: function (aClass, aString){
|
|
|
+fn: function (aString){
|
|
|
var self=this;
|
|
|
-var newClass=nil;
|
|
|
-(newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), aString, smalltalk.send(aClass, "_instanceVariableNames", []), smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]));
|
|
|
-smalltalk.send(self, "_setupClass_", [newClass]);
|
|
|
-smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){smalltalk.send(newClass, "_addCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [smalltalk.send(each, "_source", []), newClass])]);return smalltalk.send(smalltalk.send(smalltalk.send(newClass, "_methodDictionary", []), "_at_", [smalltalk.send(each, "_selector", [])]), "_category_", [smalltalk.send(each, "_category", [])]);})]);
|
|
|
-smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){smalltalk.send(smalltalk.send(newClass, "_class", []), "_addCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [smalltalk.send(each, "_source", []), smalltalk.send(newClass, "_class", [])])]);return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(newClass, "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(each, "_selector", [])]), "_category_", [smalltalk.send(each, "_category", [])]);})]);
|
|
|
-smalltalk.send(self, "_setupClass_", [newClass]);
|
|
|
-return newClass;
|
|
|
+var method=nil;
|
|
|
+var compiler=nil;
|
|
|
+(method=smalltalk.send((compiler=smalltalk.send((smalltalk.Compiler || Compiler), "_new", [])), "_load_forClass_", [aString, self['@class']]));
|
|
|
+smalltalk.send(method, "_category_", [self['@category']]);
|
|
|
+smalltalk.send(self['@class'], "_addCompiledMethod_", [method]);
|
|
|
+smalltalk.send(compiler, "_setupClass_", [self['@class']]);
|
|
|
return self;},
|
|
|
-args: ["aClass", "aString"],
|
|
|
-source: unescape('copyClass%3A%20aClass%20named%3A%20aString%0A%09%7C%20newClass%20%7C%0A%0A%09newClass%20%3A%3D%20self%20%0A%09%09addSubclassOf%3A%20aClass%20superclass%0A%09%09named%3A%20aString%20%0A%09%09instanceVariableNames%3A%20aClass%20instanceVariableNames%20%0A%09%09package%3A%20aClass%20package%20name.%0A%0A%09self%20setupClass%3A%20newClass.%0A%0A%09aClass%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09newClass%20addCompiledMethod%3A%20%28Compiler%20new%20load%3A%20each%20source%20forClass%3A%20newClass%29.%0A%09%09%28newClass%20methodDictionary%20at%3A%20each%20selector%29%20category%3A%20each%20category%5D.%0A%0A%09aClass%20class%20methodDictionary%20values%20do%3A%20%5B%3Aeach%20%7C%0A%09%09newClass%20class%20addCompiledMethod%3A%20%28Compiler%20new%20load%3A%20each%20source%20forClass%3A%20newClass%20class%29.%0A%09%09%28newClass%20class%20methodDictionary%20at%3A%20each%20selector%29%20category%3A%20each%20category%5D.%0A%0A%09self%20setupClass%3A%20newClass.%0A%09%5EnewClass'),
|
|
|
-messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "instanceVariableNames", "name", "package", "setupClass:", "do:", "values", "methodDictionary", "addCompiledMethod:", "load:forClass:", "new", "source", "category:", "at:", "selector", "category", "class"],
|
|
|
+args: ["aString"],
|
|
|
+source: unescape('compileMethod%3A%20aString%0A%09%7C%20method%20compiler%20%7C%0A%09method%20%3A%3D%20%28compiler%20%3A%3D%20Compiler%20new%29%20load%3A%20aString%20forClass%3A%20class.%0A%09method%20category%3A%20category.%0A%09class%20addCompiledMethod%3A%20method.%0A%09compiler%20setupClass%3A%20class.'),
|
|
|
+messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:", "setupClass:"],
|
|
|
referencedClasses: ["Compiler"]
|
|
|
}),
|
|
|
-smalltalk.ClassBuilder);
|
|
|
-
|
|
|
-
|
|
|
+smalltalk.ClassCategoryReader);
|
|
|
|
|
|
-smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel-Classes');
|
|
|
-smalltalk.ClassCategoryReader.comment=unescape('ClassCategoryReader%20represents%20a%20mechanism%20for%20retrieving%20class%20descriptions%20stored%20on%20a%20file.')
|
|
|
smalltalk.addMethod(
|
|
|
unescape('_initialize'),
|
|
|
smalltalk.method({
|
|
@@ -828,23 +866,6 @@ referencedClasses: ["ChunkParser"]
|
|
|
}),
|
|
|
smalltalk.ClassCategoryReader);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-unescape('_class_category_'),
|
|
|
-smalltalk.method({
|
|
|
-selector: unescape('class%3Acategory%3A'),
|
|
|
-category: 'accessing',
|
|
|
-fn: function (aClass, aString){
|
|
|
-var self=this;
|
|
|
-(self['@class']=aClass);
|
|
|
-(self['@category']=aString);
|
|
|
-return self;},
|
|
|
-args: ["aClass", "aString"],
|
|
|
-source: unescape('class%3A%20aClass%20category%3A%20aString%0A%09class%20%3A%3D%20aClass.%0A%09category%20%3A%3D%20aString'),
|
|
|
-messageSends: [],
|
|
|
-referencedClasses: []
|
|
|
-}),
|
|
|
-smalltalk.ClassCategoryReader);
|
|
|
-
|
|
|
smalltalk.addMethod(
|
|
|
unescape('_scanFrom_'),
|
|
|
smalltalk.method({
|
|
@@ -862,25 +883,6 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.ClassCategoryReader);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-unescape('_compileMethod_'),
|
|
|
-smalltalk.method({
|
|
|
-selector: unescape('compileMethod%3A'),
|
|
|
-category: 'private',
|
|
|
-fn: function (aString){
|
|
|
-var self=this;
|
|
|
-var method=nil;
|
|
|
-(method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self['@class']]));
|
|
|
-smalltalk.send(method, "_category_", [self['@category']]);
|
|
|
-smalltalk.send(self['@class'], "_addCompiledMethod_", [method]);
|
|
|
-return self;},
|
|
|
-args: ["aString"],
|
|
|
-source: unescape('compileMethod%3A%20aString%0A%09%7C%20method%20%7C%0A%09method%20%3A%3D%20Compiler%20new%20load%3A%20aString%20forClass%3A%20class.%0A%09method%20category%3A%20category.%0A%09class%20addCompiledMethod%3A%20method'),
|
|
|
-messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
|
|
|
-referencedClasses: ["Compiler"]
|
|
|
-}),
|
|
|
-smalltalk.ClassCategoryReader);
|
|
|
-
|
|
|
|
|
|
|
|
|
smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel-Classes');
|
|
@@ -901,6 +903,23 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.ClassCommentReader);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+unescape('_initialize'),
|
|
|
+smalltalk.method({
|
|
|
+selector: unescape('initialize'),
|
|
|
+category: 'initialization',
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+smalltalk.send(self, "_initialize", [], smalltalk.Object);
|
|
|
+(self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
|
|
|
+return self;},
|
|
|
+args: [],
|
|
|
+source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
|
|
|
+messageSends: ["initialize", "new"],
|
|
|
+referencedClasses: ["ChunkParser"]
|
|
|
+}),
|
|
|
+smalltalk.ClassCommentReader);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
unescape('_scanFrom_'),
|
|
|
smalltalk.method({
|
|
@@ -919,23 +938,6 @@ referencedClasses: []
|
|
|
}),
|
|
|
smalltalk.ClassCommentReader);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-unescape('_initialize'),
|
|
|
-smalltalk.method({
|
|
|
-selector: unescape('initialize'),
|
|
|
-category: 'initialization',
|
|
|
-fn: function (){
|
|
|
-var self=this;
|
|
|
-smalltalk.send(self, "_initialize", [], smalltalk.Object);
|
|
|
-(self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
|
|
|
-return self;},
|
|
|
-args: [],
|
|
|
-source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
|
|
|
-messageSends: ["initialize", "new"],
|
|
|
-referencedClasses: ["ChunkParser"]
|
|
|
-}),
|
|
|
-smalltalk.ClassCommentReader);
|
|
|
-
|
|
|
smalltalk.addMethod(
|
|
|
unescape('_setComment_'),
|
|
|
smalltalk.method({
|