1
0

Kernel-Classes.js 37 KB

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