Kernel-Classes.js 39 KB

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