1
0

Kernel-Classes.js 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958
  1. smalltalk.addPackage('Kernel-Classes', {});
  2. smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel-Classes');
  3. 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.')
  4. smalltalk.addMethod(
  5. unescape('_addCompiledMethod_'),
  6. smalltalk.method({
  7. selector: unescape('addCompiledMethod%3A'),
  8. category: 'compiling',
  9. fn: function (aMethod){
  10. var self=this;
  11. smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
  12. return self;},
  13. args: ["aMethod"],
  14. source: unescape('addCompiledMethod%3A%20aMethod%0A%09%3Csmalltalk.addMethod%28aMethod.selector._asSelector%28%29%2C%20aMethod%2C%20self%29%3E'),
  15. messageSends: [],
  16. referencedClasses: []
  17. }),
  18. smalltalk.Behavior);
  19. smalltalk.addMethod(
  20. unescape('_allInstanceVariableNames'),
  21. smalltalk.method({
  22. selector: unescape('allInstanceVariableNames'),
  23. category: 'accessing',
  24. fn: function (){
  25. var self=this;
  26. var result=nil;
  27. (result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []));
  28. (($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
  29. return result;
  30. return self;},
  31. args: [],
  32. 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'),
  33. messageSends: ["copy", "instanceVariableNames", "ifNotNil:", "superclass", "addAll:", "allInstanceVariableNames"],
  34. referencedClasses: []
  35. }),
  36. smalltalk.Behavior);
  37. smalltalk.addMethod(
  38. unescape('_allSubclasses'),
  39. smalltalk.method({
  40. selector: unescape('allSubclasses'),
  41. category: 'accessing',
  42. fn: function (){
  43. var self=this;
  44. var result=nil;
  45. (result=smalltalk.send(self, "_subclasses", []));
  46. smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
  47. return result;
  48. return self;},
  49. args: [],
  50. 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'),
  51. messageSends: ["subclasses", "do:", "addAll:", "allSubclasses"],
  52. referencedClasses: []
  53. }),
  54. smalltalk.Behavior);
  55. smalltalk.addMethod(
  56. unescape('_basicNew'),
  57. smalltalk.method({
  58. selector: unescape('basicNew'),
  59. category: 'instance creation',
  60. fn: function (){
  61. var self=this;
  62. return new self.fn();
  63. return self;},
  64. args: [],
  65. source: unescape('basicNew%0A%09%3Creturn%20new%20self.fn%28%29%3E'),
  66. messageSends: [],
  67. referencedClasses: []
  68. }),
  69. smalltalk.Behavior);
  70. smalltalk.addMethod(
  71. unescape('_comment'),
  72. smalltalk.method({
  73. selector: unescape('comment'),
  74. category: 'accessing',
  75. fn: function (){
  76. var self=this;
  77. return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  78. return self;},
  79. args: [],
  80. source: unescape('comment%0A%20%20%20%20%5E%28self%20basicAt%3A%20%27comment%27%29%20ifNil%3A%20%5B%27%27%5D'),
  81. messageSends: ["ifNil:", "basicAt:"],
  82. referencedClasses: []
  83. }),
  84. smalltalk.Behavior);
  85. smalltalk.addMethod(
  86. unescape('_comment_'),
  87. smalltalk.method({
  88. selector: unescape('comment%3A'),
  89. category: 'accessing',
  90. fn: function (aString){
  91. var self=this;
  92. smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
  93. return self;},
  94. args: ["aString"],
  95. source: unescape('comment%3A%20aString%0A%20%20%20%20self%20basicAt%3A%20%27comment%27%20put%3A%20aString'),
  96. messageSends: ["basicAt:put:"],
  97. referencedClasses: []
  98. }),
  99. smalltalk.Behavior);
  100. smalltalk.addMethod(
  101. unescape('_commentStamp'),
  102. smalltalk.method({
  103. selector: unescape('commentStamp'),
  104. category: 'accessing',
  105. fn: function (){
  106. var self=this;
  107. return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
  108. return self;},
  109. args: [],
  110. source: unescape('commentStamp%0A%20%20%20%20%5EClassCommentReader%20new%0A%09class%3A%20self%3B%0A%09yourself'),
  111. messageSends: ["class:", "yourself", "new"],
  112. referencedClasses: ["ClassCommentReader"]
  113. }),
  114. smalltalk.Behavior);
  115. smalltalk.addMethod(
  116. unescape('_commentStamp_prior_'),
  117. smalltalk.method({
  118. selector: unescape('commentStamp%3Aprior%3A'),
  119. category: 'accessing',
  120. fn: function (aStamp, prior){
  121. var self=this;
  122. return smalltalk.send(self, "_commentStamp", []);
  123. return self;},
  124. args: ["aStamp", "prior"],
  125. source: unescape('commentStamp%3A%20aStamp%20prior%3A%20prior%0A%20%20%20%20%20%20%20%20%5Eself%20commentStamp'),
  126. messageSends: ["commentStamp"],
  127. referencedClasses: []
  128. }),
  129. smalltalk.Behavior);
  130. smalltalk.addMethod(
  131. unescape('_compile_'),
  132. smalltalk.method({
  133. selector: unescape('compile%3A'),
  134. category: 'compiling',
  135. fn: function (aString){
  136. var self=this;
  137. smalltalk.send(self, "_compile_category_", [aString, ""]);
  138. return self;},
  139. args: ["aString"],
  140. source: unescape('compile%3A%20aString%0A%09self%20compile%3A%20aString%20category%3A%20%27%27'),
  141. messageSends: ["compile:category:"],
  142. referencedClasses: []
  143. }),
  144. smalltalk.Behavior);
  145. smalltalk.addMethod(
  146. unescape('_compile_category_'),
  147. smalltalk.method({
  148. selector: unescape('compile%3Acategory%3A'),
  149. category: 'compiling',
  150. fn: function (aString, anotherString){
  151. var self=this;
  152. var method=nil;
  153. (method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self]));
  154. smalltalk.send(method, "_category_", [anotherString]);
  155. smalltalk.send(self, "_addCompiledMethod_", [method]);
  156. return self;},
  157. args: ["aString", "anotherString"],
  158. 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'),
  159. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:"],
  160. referencedClasses: ["Compiler"]
  161. }),
  162. smalltalk.Behavior);
  163. smalltalk.addMethod(
  164. unescape('_inheritsFrom_'),
  165. smalltalk.method({
  166. selector: unescape('inheritsFrom%3A'),
  167. category: 'testing',
  168. fn: function (aClass){
  169. var self=this;
  170. return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
  171. return self;},
  172. args: ["aClass"],
  173. source: unescape('inheritsFrom%3A%20aClass%0A%09%5EaClass%20allSubclasses%20includes%3A%20self'),
  174. messageSends: ["includes:", "allSubclasses"],
  175. referencedClasses: []
  176. }),
  177. smalltalk.Behavior);
  178. smalltalk.addMethod(
  179. unescape('_instanceVariableNames'),
  180. smalltalk.method({
  181. selector: unescape('instanceVariableNames'),
  182. category: 'accessing',
  183. fn: function (){
  184. var self=this;
  185. return self.iVarNames;
  186. return self;},
  187. args: [],
  188. source: unescape('instanceVariableNames%0A%09%3Creturn%20self.iVarNames%3E'),
  189. messageSends: [],
  190. referencedClasses: []
  191. }),
  192. smalltalk.Behavior);
  193. smalltalk.addMethod(
  194. unescape('_methodAt_'),
  195. smalltalk.method({
  196. selector: unescape('methodAt%3A'),
  197. category: 'accessing',
  198. fn: function (aString){
  199. var self=this;
  200. return smalltalk.methods(self)[aString];
  201. return self;},
  202. args: ["aString"],
  203. source: unescape('methodAt%3A%20aString%0A%09%3Creturn%20smalltalk.methods%28self%29%5BaString%5D%3E'),
  204. messageSends: [],
  205. referencedClasses: []
  206. }),
  207. smalltalk.Behavior);
  208. smalltalk.addMethod(
  209. unescape('_methodDictionary'),
  210. smalltalk.method({
  211. selector: unescape('methodDictionary'),
  212. category: 'accessing',
  213. fn: function (){
  214. var self=this;
  215. var dict = smalltalk.HashedCollection._new();
  216. var methods = self.fn.prototype.methods;
  217. for(var i in methods) {
  218. if(methods[i].selector) {
  219. dict._at_put_(methods[i].selector, methods[i]);
  220. }
  221. };
  222. return dict;
  223. return self;},
  224. args: [],
  225. 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'),
  226. messageSends: [],
  227. referencedClasses: []
  228. }),
  229. smalltalk.Behavior);
  230. smalltalk.addMethod(
  231. unescape('_methodsFor_'),
  232. smalltalk.method({
  233. selector: unescape('methodsFor%3A'),
  234. category: 'accessing',
  235. fn: function (aString){
  236. var self=this;
  237. return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
  238. return self;},
  239. args: ["aString"],
  240. 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'),
  241. messageSends: ["class:category:", "yourself", "new"],
  242. referencedClasses: ["ClassCategoryReader"]
  243. }),
  244. smalltalk.Behavior);
  245. smalltalk.addMethod(
  246. unescape('_methodsFor_stamp_'),
  247. smalltalk.method({
  248. selector: unescape('methodsFor%3Astamp%3A'),
  249. category: 'accessing',
  250. fn: function (aString, aStamp){
  251. var self=this;
  252. return smalltalk.send(self, "_methodsFor_", [aString]);
  253. return self;},
  254. args: ["aString", "aStamp"],
  255. 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'),
  256. messageSends: ["methodsFor:"],
  257. referencedClasses: []
  258. }),
  259. smalltalk.Behavior);
  260. smalltalk.addMethod(
  261. unescape('_name'),
  262. smalltalk.method({
  263. selector: unescape('name'),
  264. category: 'accessing',
  265. fn: function (){
  266. var self=this;
  267. return self.className || nil;
  268. return self;},
  269. args: [],
  270. source: unescape('name%0A%09%3Creturn%20self.className%20%7C%7C%20nil%3E'),
  271. messageSends: [],
  272. referencedClasses: []
  273. }),
  274. smalltalk.Behavior);
  275. smalltalk.addMethod(
  276. unescape('_new'),
  277. smalltalk.method({
  278. selector: unescape('new'),
  279. category: 'instance creation',
  280. fn: function (){
  281. var self=this;
  282. return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
  283. return self;},
  284. args: [],
  285. source: unescape('new%0A%09%5Eself%20basicNew%20initialize'),
  286. messageSends: ["initialize", "basicNew"],
  287. referencedClasses: []
  288. }),
  289. smalltalk.Behavior);
  290. smalltalk.addMethod(
  291. unescape('_protocols'),
  292. smalltalk.method({
  293. selector: unescape('protocols'),
  294. category: 'accessing',
  295. fn: function (){
  296. var self=this;
  297. var protocols=nil;
  298. (protocols=smalltalk.send((smalltalk.Array || Array), "_new", []));
  299. smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(protocols, "_includes_", [smalltalk.send(each, "_category", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(protocols, "_add_", [smalltalk.send(each, "_category", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(protocols, "_add_", [smalltalk.send(each, "_category", [])]);})]));})]);
  300. return smalltalk.send(protocols, "_sort", []);
  301. return self;},
  302. args: [],
  303. source: unescape('protocols%0A%20%20%20%20%7C%20protocols%20%7C%0A%20%20%20%20protocols%20%3A%3D%20Array%20new.%0A%20%20%20%20self%20methodDictionary%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20%28protocols%20includes%3A%20each%20category%29%20ifFalse%3A%20%5B%0A%09%09protocols%20add%3A%20each%20category%5D%5D.%0A%20%20%20%20%5Eprotocols%20sort'),
  304. messageSends: ["new", "do:", "methodDictionary", "ifFalse:", "includes:", "category", "add:", "sort"],
  305. referencedClasses: ["Array"]
  306. }),
  307. smalltalk.Behavior);
  308. smalltalk.addMethod(
  309. unescape('_protocolsDo_'),
  310. smalltalk.method({
  311. selector: unescape('protocolsDo%3A'),
  312. category: 'accessing',
  313. fn: function (aBlock){
  314. var self=this;
  315. var methodsByCategory=nil;
  316. (methodsByCategory=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
  317. smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_values", []), "_do_", [(function(m){return smalltalk.send(smalltalk.send(methodsByCategory, "_at_ifAbsentPut_", [smalltalk.send(m, "_category", []), (function(){return smalltalk.send((smalltalk.Array || Array), "_new", []);})]), "_add_", [m]);})]);
  318. smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(category){return smalltalk.send(aBlock, "_value_value_", [category, smalltalk.send(methodsByCategory, "_at_", [category])]);})]);
  319. return self;},
  320. args: ["aBlock"],
  321. source: unescape('protocolsDo%3A%20aBlock%0A%09%22Execute%20aBlock%20for%20each%20method%20category%20with%0A%09its%20collection%20of%20methods%20in%20the%20sort%20order%20of%20category%20name.%22%0A%0A%09%7C%20methodsByCategory%20%7C%0A%09methodsByCategory%20%3A%3D%20HashedCollection%20new.%0A%09self%20methodDictionary%20values%20do%3A%20%5B%3Am%20%7C%0A%09%09%28methodsByCategory%20at%3A%20m%20category%20ifAbsentPut%3A%20%5BArray%20new%5D%29%0A%20%09%09%09add%3A%20m%5D.%20%0A%09self%20protocols%20do%3A%20%5B%3Acategory%20%7C%0A%09%09aBlock%20value%3A%20category%20value%3A%20%28methodsByCategory%20at%3A%20category%29%5D'),
  322. messageSends: ["new", "do:", "values", "methodDictionary", "add:", "at:ifAbsentPut:", "category", "protocols", "value:value:", "at:"],
  323. referencedClasses: ["HashedCollection", "Array"]
  324. }),
  325. smalltalk.Behavior);
  326. smalltalk.addMethod(
  327. unescape('_prototype'),
  328. smalltalk.method({
  329. selector: unescape('prototype'),
  330. category: 'accessing',
  331. fn: function (){
  332. var self=this;
  333. return self.fn.prototype;
  334. return self;},
  335. args: [],
  336. source: unescape('prototype%0A%09%3Creturn%20self.fn.prototype%3E'),
  337. messageSends: [],
  338. referencedClasses: []
  339. }),
  340. smalltalk.Behavior);
  341. smalltalk.addMethod(
  342. unescape('_removeCompiledMethod_'),
  343. smalltalk.method({
  344. selector: unescape('removeCompiledMethod%3A'),
  345. category: 'compiling',
  346. fn: function (aMethod){
  347. var self=this;
  348. delete self.fn.prototype[aMethod.selector._asSelector()];
  349. delete self.fn.prototype.methods[aMethod.selector];
  350. smalltalk.init(self);;
  351. return self;},
  352. args: ["aMethod"],
  353. 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'),
  354. messageSends: [],
  355. referencedClasses: []
  356. }),
  357. smalltalk.Behavior);
  358. smalltalk.addMethod(
  359. unescape('_subclasses'),
  360. smalltalk.method({
  361. selector: unescape('subclasses'),
  362. category: 'accessing',
  363. fn: function (){
  364. var self=this;
  365. return smalltalk.subclasses(self);
  366. return self;},
  367. args: [],
  368. source: unescape('subclasses%0A%09%3Creturn%20smalltalk.subclasses%28self%29%3E'),
  369. messageSends: [],
  370. referencedClasses: []
  371. }),
  372. smalltalk.Behavior);
  373. smalltalk.addMethod(
  374. unescape('_superclass'),
  375. smalltalk.method({
  376. selector: unescape('superclass'),
  377. category: 'accessing',
  378. fn: function (){
  379. var self=this;
  380. return self.superclass || nil;
  381. return self;},
  382. args: [],
  383. source: unescape('superclass%0A%09%3Creturn%20self.superclass%20%7C%7C%20nil%3E'),
  384. messageSends: [],
  385. referencedClasses: []
  386. }),
  387. smalltalk.Behavior);
  388. smalltalk.addMethod(
  389. unescape('_withAllSubclasses'),
  390. smalltalk.method({
  391. selector: unescape('withAllSubclasses'),
  392. category: 'accessing',
  393. fn: function (){
  394. var self=this;
  395. return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
  396. return self;},
  397. args: [],
  398. source: unescape('withAllSubclasses%0A%09%5E%28Array%20with%3A%20self%29%20addAll%3A%20self%20allSubclasses%3B%20yourself'),
  399. messageSends: ["addAll:", "allSubclasses", "yourself", "with:"],
  400. referencedClasses: ["Array"]
  401. }),
  402. smalltalk.Behavior);
  403. smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel-Classes');
  404. 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')
  405. smalltalk.addMethod(
  406. unescape('_category'),
  407. smalltalk.method({
  408. selector: unescape('category'),
  409. category: 'accessing',
  410. fn: function (){
  411. var self=this;
  412. return (($receiver = smalltalk.send(self, "_package", [])) == nil || $receiver == undefined) ? (function(){return "Unclassified";})() : (function(){return smalltalk.send(smalltalk.send(self, "_package", []), "_name", []);})();
  413. return self;},
  414. args: [],
  415. source: unescape('category%0A%09%5Eself%20package%20ifNil%3A%20%5B%27Unclassified%27%5D%20ifNotNil%3A%20%5Bself%20package%20name%5D'),
  416. messageSends: ["ifNil:ifNotNil:", "package", "name"],
  417. referencedClasses: []
  418. }),
  419. smalltalk.Class);
  420. smalltalk.addMethod(
  421. unescape('_isClass'),
  422. smalltalk.method({
  423. selector: unescape('isClass'),
  424. category: 'testing',
  425. fn: function (){
  426. var self=this;
  427. return true;
  428. return self;},
  429. args: [],
  430. source: unescape('isClass%0A%09%5Etrue'),
  431. messageSends: [],
  432. referencedClasses: []
  433. }),
  434. smalltalk.Class);
  435. smalltalk.addMethod(
  436. unescape('_package'),
  437. smalltalk.method({
  438. selector: unescape('package'),
  439. category: 'accessing',
  440. fn: function (){
  441. var self=this;
  442. return self.pkg;
  443. return self;},
  444. args: [],
  445. source: unescape('package%0A%09%3Creturn%20self.pkg%3E'),
  446. messageSends: [],
  447. referencedClasses: []
  448. }),
  449. smalltalk.Class);
  450. smalltalk.addMethod(
  451. unescape('_package_'),
  452. smalltalk.method({
  453. selector: unescape('package%3A'),
  454. category: 'accessing',
  455. fn: function (aPackage){
  456. var self=this;
  457. self.pkg = aPackage;
  458. return self;},
  459. args: ["aPackage"],
  460. source: unescape('package%3A%20aPackage%0A%09%3Cself.pkg%20%3D%20aPackage%3E'),
  461. messageSends: [],
  462. referencedClasses: []
  463. }),
  464. smalltalk.Class);
  465. smalltalk.addMethod(
  466. unescape('_printString'),
  467. smalltalk.method({
  468. selector: unescape('printString'),
  469. category: 'printing',
  470. fn: function (){
  471. var self=this;
  472. return smalltalk.send(self, "_name", []);
  473. return self;},
  474. args: [],
  475. source: unescape('printString%0A%09%5Eself%20name'),
  476. messageSends: ["name"],
  477. referencedClasses: []
  478. }),
  479. smalltalk.Class);
  480. smalltalk.addMethod(
  481. unescape('_rename_'),
  482. smalltalk.method({
  483. selector: unescape('rename%3A'),
  484. category: 'accessing',
  485. fn: function (aString){
  486. var self=this;
  487. smalltalk[aString] = self;
  488. delete smalltalk[self.className];
  489. self.className = aString;
  490. ;
  491. return self;},
  492. args: ["aString"],
  493. source: unescape('rename%3A%20aString%0A%09%3C%0A%09%09smalltalk%5BaString%5D%20%3D%20self%3B%0A%09%09delete%20smalltalk%5Bself.className%5D%3B%0A%09%09self.className%20%3D%20aString%3B%0A%09%3E'),
  494. messageSends: [],
  495. referencedClasses: []
  496. }),
  497. smalltalk.Class);
  498. smalltalk.addMethod(
  499. unescape('_subclass_instanceVariableNames_'),
  500. smalltalk.method({
  501. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  502. category: 'class creation',
  503. fn: function (aString, anotherString){
  504. var self=this;
  505. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  506. return self;},
  507. args: ["aString", "anotherString"],
  508. 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'),
  509. messageSends: ["subclass:instanceVariableNames:package:"],
  510. referencedClasses: []
  511. }),
  512. smalltalk.Class);
  513. smalltalk.addMethod(
  514. unescape('_subclass_instanceVariableNames_category_'),
  515. smalltalk.method({
  516. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  517. category: 'class creation',
  518. fn: function (aString, aString2, aString3){
  519. var self=this;
  520. smalltalk.send(self, "_deprecatedAPI", []);
  521. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  522. return self;},
  523. args: ["aString", "aString2", "aString3"],
  524. 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'),
  525. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
  526. referencedClasses: []
  527. }),
  528. smalltalk.Class);
  529. smalltalk.addMethod(
  530. unescape('_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_'),
  531. smalltalk.method({
  532. selector: unescape('subclass%3AinstanceVariableNames%3AclassVariableNames%3ApoolDictionaries%3Acategory%3A'),
  533. category: 'class creation',
  534. fn: function (aString, aString2, classVars, pools, aString3){
  535. var self=this;
  536. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  537. return self;},
  538. args: ["aString", "aString2", "classVars", "pools", "aString3"],
  539. 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'),
  540. messageSends: ["subclass:instanceVariableNames:package:"],
  541. referencedClasses: []
  542. }),
  543. smalltalk.Class);
  544. smalltalk.addMethod(
  545. unescape('_subclass_instanceVariableNames_package_'),
  546. smalltalk.method({
  547. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  548. category: 'class creation',
  549. fn: function (aString, aString2, aString3){
  550. var self=this;
  551. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, smalltalk.send(aString, "_asString", []), aString2, aString3]);
  552. return self;},
  553. args: ["aString", "aString2", "aString3"],
  554. source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%5EClassBuilder%20new%0A%09%20%20%20%20superclass%3A%20self%20subclass%3A%20aString%20asString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3'),
  555. messageSends: ["superclass:subclass:instanceVariableNames:package:", "new", "asString"],
  556. referencedClasses: ["ClassBuilder"]
  557. }),
  558. smalltalk.Class);
  559. smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel-Classes');
  560. 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.')
  561. smalltalk.addMethod(
  562. unescape('_instanceClass'),
  563. smalltalk.method({
  564. selector: unescape('instanceClass'),
  565. category: 'accessing',
  566. fn: function (){
  567. var self=this;
  568. return self.instanceClass;
  569. return self;},
  570. args: [],
  571. source: unescape('instanceClass%0A%09%3Creturn%20self.instanceClass%3E'),
  572. messageSends: [],
  573. referencedClasses: []
  574. }),
  575. smalltalk.Metaclass);
  576. smalltalk.addMethod(
  577. unescape('_instanceVariableNames_'),
  578. smalltalk.method({
  579. selector: unescape('instanceVariableNames%3A'),
  580. category: 'accessing',
  581. fn: function (aCollection){
  582. var self=this;
  583. smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_class_instanceVariableNames_", [self, aCollection]);
  584. return self;},
  585. args: ["aCollection"],
  586. source: unescape('instanceVariableNames%3A%20aCollection%0A%09ClassBuilder%20new%0A%09%20%20%20%20class%3A%20self%20instanceVariableNames%3A%20aCollection'),
  587. messageSends: ["class:instanceVariableNames:", "new"],
  588. referencedClasses: ["ClassBuilder"]
  589. }),
  590. smalltalk.Metaclass);
  591. smalltalk.addMethod(
  592. unescape('_isMetaclass'),
  593. smalltalk.method({
  594. selector: unescape('isMetaclass'),
  595. category: 'testing',
  596. fn: function (){
  597. var self=this;
  598. return true;
  599. return self;},
  600. args: [],
  601. source: unescape('isMetaclass%0A%09%5Etrue'),
  602. messageSends: [],
  603. referencedClasses: []
  604. }),
  605. smalltalk.Metaclass);
  606. smalltalk.addMethod(
  607. unescape('_printString'),
  608. smalltalk.method({
  609. selector: unescape('printString'),
  610. category: 'printing',
  611. fn: function (){
  612. var self=this;
  613. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_instanceClass", []), "_name", []), "__comma", [" class"]);
  614. return self;},
  615. args: [],
  616. source: unescape('printString%0A%09%5Eself%20instanceClass%20name%2C%20%27%20class%27'),
  617. messageSends: [unescape("%2C"), "name", "instanceClass"],
  618. referencedClasses: []
  619. }),
  620. smalltalk.Metaclass);
  621. smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel-Classes');
  622. 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.')
  623. smalltalk.addMethod(
  624. unescape('_addSubclassOf_named_instanceVariableNames_'),
  625. smalltalk.method({
  626. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3A'),
  627. category: 'private',
  628. fn: function (aClass, aString, aCollection){
  629. var self=this;
  630. smalltalk.addClass(aString, aClass, aCollection);
  631. return smalltalk[aString];
  632. return self;},
  633. args: ["aClass", "aString", "aCollection"],
  634. 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'),
  635. messageSends: [],
  636. referencedClasses: []
  637. }),
  638. smalltalk.ClassBuilder);
  639. smalltalk.addMethod(
  640. unescape('_addSubclassOf_named_instanceVariableNames_package_'),
  641. smalltalk.method({
  642. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3Apackage%3A'),
  643. category: 'private',
  644. fn: function (aClass, aString, aCollection, packageName){
  645. var self=this;
  646. smalltalk.addClass(aString, aClass, aCollection, packageName);
  647. return smalltalk[aString];
  648. return self;},
  649. args: ["aClass", "aString", "aCollection", "packageName"],
  650. 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'),
  651. messageSends: [],
  652. referencedClasses: []
  653. }),
  654. smalltalk.ClassBuilder);
  655. smalltalk.addMethod(
  656. unescape('_class_instanceVariableNames_'),
  657. smalltalk.method({
  658. selector: unescape('class%3AinstanceVariableNames%3A'),
  659. category: 'class creation',
  660. fn: function (aClass, aString){
  661. var self=this;
  662. ((($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"])]);})]));
  663. smalltalk.send(aClass, "_basicAt_put_", ["iVarNames", smalltalk.send(self, "_instanceVariableNamesFor_", [aString])]);
  664. smalltalk.send(self, "_setupClass_", [aClass]);
  665. return self;},
  666. args: ["aClass", "aString"],
  667. source: unescape('class%3A%20aClass%20instanceVariableNames%3A%20aString%0A%09aClass%20isMetaclass%20ifFalse%3A%20%5Bself%20error%3A%20aClass%20name%2C%20%27%20is%20not%20a%20metaclass%27%5D.%0A%09aClass%20basicAt%3A%20%27iVarNames%27%20put%3A%20%28self%20instanceVariableNamesFor%3A%20aString%29.%0A%09self%20setupClass%3A%20aClass'),
  668. messageSends: ["ifFalse:", "isMetaclass", "error:", unescape("%2C"), "name", "basicAt:put:", "instanceVariableNamesFor:", "setupClass:"],
  669. referencedClasses: []
  670. }),
  671. smalltalk.ClassBuilder);
  672. smalltalk.addMethod(
  673. unescape('_copyClass_named_'),
  674. smalltalk.method({
  675. selector: unescape('copyClass%3Anamed%3A'),
  676. category: 'private',
  677. fn: function (aClass, aString){
  678. var self=this;
  679. var newClass=nil;
  680. (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), aString, smalltalk.send(aClass, "_instanceVariableNames", []), smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]));
  681. smalltalk.send(self, "_setupClass_", [newClass]);
  682. 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", [])]);})]);
  683. 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", [])]);})]);
  684. smalltalk.send(self, "_setupClass_", [newClass]);
  685. return newClass;
  686. return self;},
  687. args: ["aClass", "aString"],
  688. 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'),
  689. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "instanceVariableNames", "name", "package", "setupClass:", "do:", "values", "methodDictionary", "addCompiledMethod:", "load:forClass:", "new", "source", "category:", "at:", "selector", "category", "class"],
  690. referencedClasses: ["Compiler"]
  691. }),
  692. smalltalk.ClassBuilder);
  693. smalltalk.addMethod(
  694. unescape('_instanceVariableNamesFor_'),
  695. smalltalk.method({
  696. selector: unescape('instanceVariableNamesFor%3A'),
  697. category: 'private',
  698. fn: function (aString){
  699. var self=this;
  700. return smalltalk.send(smalltalk.send(aString, "_tokenize_", [" "]), "_reject_", [(function(each){return smalltalk.send(each, "_isEmpty", []);})]);
  701. return self;},
  702. args: ["aString"],
  703. source: unescape('instanceVariableNamesFor%3A%20aString%0A%09%5E%28aString%20tokenize%3A%20%27%20%27%29%20reject%3A%20%5B%3Aeach%20%7C%20each%20isEmpty%5D'),
  704. messageSends: ["reject:", "tokenize:", "isEmpty"],
  705. referencedClasses: []
  706. }),
  707. smalltalk.ClassBuilder);
  708. smalltalk.addMethod(
  709. unescape('_setupClass_'),
  710. smalltalk.method({
  711. selector: unescape('setupClass%3A'),
  712. category: 'private',
  713. fn: function (aClass){
  714. var self=this;
  715. smalltalk.init(aClass);;
  716. return self;},
  717. args: ["aClass"],
  718. source: unescape('setupClass%3A%20aClass%0A%09%3Csmalltalk.init%28aClass%29%3B%3E'),
  719. messageSends: [],
  720. referencedClasses: []
  721. }),
  722. smalltalk.ClassBuilder);
  723. smalltalk.addMethod(
  724. unescape('_superclass_subclass_'),
  725. smalltalk.method({
  726. selector: unescape('superclass%3Asubclass%3A'),
  727. category: 'class creation',
  728. fn: function (aClass, aString){
  729. var self=this;
  730. return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
  731. return self;},
  732. args: ["aClass", "aString"],
  733. 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'),
  734. messageSends: ["superclass:subclass:instanceVariableNames:package:"],
  735. referencedClasses: []
  736. }),
  737. smalltalk.ClassBuilder);
  738. smalltalk.addMethod(
  739. unescape('_superclass_subclass_instanceVariableNames_package_'),
  740. smalltalk.method({
  741. selector: unescape('superclass%3Asubclass%3AinstanceVariableNames%3Apackage%3A'),
  742. category: 'class creation',
  743. fn: function (aClass, aString, aString2, aString3){
  744. var self=this;
  745. var newClass=nil;
  746. (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [aClass, aString, smalltalk.send(self, "_instanceVariableNamesFor_", [aString2]), (($receiver = aString3) == nil || $receiver == undefined) ? (function(){return "unclassified";})() : $receiver]));
  747. smalltalk.send(self, "_setupClass_", [newClass]);
  748. return newClass;
  749. return self;},
  750. args: ["aClass", "aString", "aString2", "aString3"],
  751. source: unescape('superclass%3A%20aClass%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20package%3A%20aString3%0A%09%7C%20newClass%20%7C%0A%09newClass%20%3A%3D%20self%20addSubclassOf%3A%20aClass%0A%09%09%09%09named%3A%20aString%20instanceVariableNames%3A%20%28self%20instanceVariableNamesFor%3A%20aString2%29%0A%09%09%09%09package%3A%20%28aString3%20ifNil%3A%20%5B%27unclassified%27%5D%29.%0A%09self%20setupClass%3A%20newClass.%0A%09%5EnewClass'),
  752. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "instanceVariableNamesFor:", "ifNil:", "setupClass:"],
  753. referencedClasses: []
  754. }),
  755. smalltalk.ClassBuilder);
  756. smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel-Classes');
  757. smalltalk.ClassCategoryReader.comment=unescape('ClassCategoryReader%20represents%20a%20mechanism%20for%20retrieving%20class%20descriptions%20stored%20on%20a%20file.')
  758. smalltalk.addMethod(
  759. unescape('_class_category_'),
  760. smalltalk.method({
  761. selector: unescape('class%3Acategory%3A'),
  762. category: 'accessing',
  763. fn: function (aClass, aString){
  764. var self=this;
  765. (self['@class']=aClass);
  766. (self['@category']=aString);
  767. return self;},
  768. args: ["aClass", "aString"],
  769. source: unescape('class%3A%20aClass%20category%3A%20aString%0A%09class%20%3A%3D%20aClass.%0A%09category%20%3A%3D%20aString'),
  770. messageSends: [],
  771. referencedClasses: []
  772. }),
  773. smalltalk.ClassCategoryReader);
  774. smalltalk.addMethod(
  775. unescape('_compileMethod_'),
  776. smalltalk.method({
  777. selector: unescape('compileMethod%3A'),
  778. category: 'private',
  779. fn: function (aString){
  780. var self=this;
  781. var method=nil;
  782. var compiler=nil;
  783. (method=smalltalk.send((compiler=smalltalk.send((smalltalk.Compiler || Compiler), "_new", [])), "_load_forClass_", [aString, self['@class']]));
  784. smalltalk.send(method, "_category_", [self['@category']]);
  785. smalltalk.send(self['@class'], "_addCompiledMethod_", [method]);
  786. smalltalk.send(compiler, "_setupClass_", [self['@class']]);
  787. return self;},
  788. args: ["aString"],
  789. 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.'),
  790. messageSends: ["load:forClass:", "new", "category:", "addCompiledMethod:", "setupClass:"],
  791. referencedClasses: ["Compiler"]
  792. }),
  793. smalltalk.ClassCategoryReader);
  794. smalltalk.addMethod(
  795. unescape('_initialize'),
  796. smalltalk.method({
  797. selector: unescape('initialize'),
  798. category: 'initialization',
  799. fn: function (){
  800. var self=this;
  801. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  802. (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
  803. return self;},
  804. args: [],
  805. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  806. messageSends: ["initialize", "new"],
  807. referencedClasses: ["ChunkParser"]
  808. }),
  809. smalltalk.ClassCategoryReader);
  810. smalltalk.addMethod(
  811. unescape('_scanFrom_'),
  812. smalltalk.method({
  813. selector: unescape('scanFrom%3A'),
  814. category: 'fileIn',
  815. fn: function (aChunkParser){
  816. var self=this;
  817. var chunk=nil;
  818. (function(){while(!(function(){(chunk=smalltalk.send(aChunkParser, "_nextChunk", []));return smalltalk.send(chunk, "_isEmpty", []);})()) {(function(){return smalltalk.send(self, "_compileMethod_", [chunk]);})()}})();
  819. return self;},
  820. args: ["aChunkParser"],
  821. source: unescape('scanFrom%3A%20aChunkParser%0A%09%7C%20chunk%20%7C%0A%09%5Bchunk%20%3A%3D%20aChunkParser%20nextChunk.%0A%09chunk%20isEmpty%5D%20whileFalse%3A%20%5B%0A%09%20%20%20%20self%20compileMethod%3A%20chunk%5D'),
  822. messageSends: ["whileFalse:", "nextChunk", "isEmpty", "compileMethod:"],
  823. referencedClasses: []
  824. }),
  825. smalltalk.ClassCategoryReader);
  826. smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel-Classes');
  827. smalltalk.ClassCommentReader.comment=unescape('ClassCommentReader%20represents%20a%20mechanism%20for%20retrieving%20class%20descriptions%20stored%20on%20a%20file.%0ASee%20%60ClassCategoryReader%60%20too.')
  828. smalltalk.addMethod(
  829. unescape('_class_'),
  830. smalltalk.method({
  831. selector: unescape('class%3A'),
  832. category: 'accessing',
  833. fn: function (aClass){
  834. var self=this;
  835. (self['@class']=aClass);
  836. return self;},
  837. args: ["aClass"],
  838. source: unescape('class%3A%20aClass%0A%09class%20%3A%3D%20aClass'),
  839. messageSends: [],
  840. referencedClasses: []
  841. }),
  842. smalltalk.ClassCommentReader);
  843. smalltalk.addMethod(
  844. unescape('_initialize'),
  845. smalltalk.method({
  846. selector: unescape('initialize'),
  847. category: 'initialization',
  848. fn: function (){
  849. var self=this;
  850. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  851. (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
  852. return self;},
  853. args: [],
  854. source: unescape('initialize%0A%09super%20initialize.%0A%09chunkParser%20%3A%3D%20ChunkParser%20new.'),
  855. messageSends: ["initialize", "new"],
  856. referencedClasses: ["ChunkParser"]
  857. }),
  858. smalltalk.ClassCommentReader);
  859. smalltalk.addMethod(
  860. unescape('_scanFrom_'),
  861. smalltalk.method({
  862. selector: unescape('scanFrom%3A'),
  863. category: 'fileIn',
  864. fn: function (aChunkParser){
  865. var self=this;
  866. var chunk=nil;
  867. (chunk=smalltalk.send(aChunkParser, "_nextChunk", []));
  868. ((($receiver = smalltalk.send(chunk, "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_setComment_", [chunk]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_setComment_", [chunk]);})]));
  869. return self;},
  870. args: ["aChunkParser"],
  871. source: unescape('scanFrom%3A%20aChunkParser%0A%09%7C%20chunk%20%7C%0A%09chunk%20%3A%3D%20aChunkParser%20nextChunk.%0A%09chunk%20isEmpty%20ifFalse%3A%20%5B%0A%09%20%20%20%20self%20setComment%3A%20chunk%5D.'),
  872. messageSends: ["nextChunk", "ifFalse:", "isEmpty", "setComment:"],
  873. referencedClasses: []
  874. }),
  875. smalltalk.ClassCommentReader);
  876. smalltalk.addMethod(
  877. unescape('_setComment_'),
  878. smalltalk.method({
  879. selector: unescape('setComment%3A'),
  880. category: 'private',
  881. fn: function (aString){
  882. var self=this;
  883. smalltalk.send(self['@class'], "_comment_", [aString]);
  884. return self;},
  885. args: ["aString"],
  886. source: unescape('setComment%3A%20aString%0A%20%20%20%20class%20comment%3A%20aString'),
  887. messageSends: ["comment:"],
  888. referencedClasses: []
  889. }),
  890. smalltalk.ClassCommentReader);