2
0

Kernel-Classes.deploy.js 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785
  1. smalltalk.addPackage('Kernel-Classes', {});
  2. smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel-Classes');
  3. smalltalk.addMethod(
  4. unescape('_addCompiledMethod_'),
  5. smalltalk.method({
  6. selector: unescape('addCompiledMethod%3A'),
  7. fn: function (aMethod) {
  8. var self=this;
  9. smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
  10. return self;}
  11. }),
  12. smalltalk.Behavior);
  13. smalltalk.addMethod(
  14. unescape('_allInstanceVariableNames'),
  15. smalltalk.method({
  16. selector: unescape('allInstanceVariableNames'),
  17. fn: function () {
  18. var self=this;
  19. var result=nil;
  20. (result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []));
  21. (($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
  22. return result;
  23. return self;}
  24. }),
  25. smalltalk.Behavior);
  26. smalltalk.addMethod(
  27. unescape('_allSubclasses'),
  28. smalltalk.method({
  29. selector: unescape('allSubclasses'),
  30. fn: function () {
  31. var self=this;
  32. var result=nil;
  33. (result=smalltalk.send(self, "_subclasses", []));
  34. smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
  35. return result;
  36. return self;}
  37. }),
  38. smalltalk.Behavior);
  39. smalltalk.addMethod(
  40. unescape('_basicNew'),
  41. smalltalk.method({
  42. selector: unescape('basicNew'),
  43. fn: function () {
  44. var self=this;
  45. return new self.fn();
  46. return self;}
  47. }),
  48. smalltalk.Behavior);
  49. smalltalk.addMethod(
  50. unescape('_canUnderstand_'),
  51. smalltalk.method({
  52. selector: unescape('canUnderstand%3A'),
  53. fn: function (aSelector) {
  54. var self=this;
  55. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_keys", []), "_includes_", [smalltalk.send(aSelector, "_asString", [])]), "_or_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_superclass", []), "_notNil", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_superclass", []), "_canUnderstand_", [aSelector]);})]);})]);
  56. return self;}
  57. }),
  58. smalltalk.Behavior);
  59. smalltalk.addMethod(
  60. unescape('_comment'),
  61. smalltalk.method({
  62. selector: unescape('comment'),
  63. fn: function () {
  64. var self=this;
  65. return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  66. return self;}
  67. }),
  68. smalltalk.Behavior);
  69. smalltalk.addMethod(
  70. unescape('_comment_'),
  71. smalltalk.method({
  72. selector: unescape('comment%3A'),
  73. fn: function (aString) {
  74. var self=this;
  75. smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
  76. return self;}
  77. }),
  78. smalltalk.Behavior);
  79. smalltalk.addMethod(
  80. unescape('_commentStamp'),
  81. smalltalk.method({
  82. selector: unescape('commentStamp'),
  83. fn: function () {
  84. var self=this;
  85. return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
  86. return self;}
  87. }),
  88. smalltalk.Behavior);
  89. smalltalk.addMethod(
  90. unescape('_commentStamp_prior_'),
  91. smalltalk.method({
  92. selector: unescape('commentStamp%3Aprior%3A'),
  93. fn: function (aStamp, prior) {
  94. var self=this;
  95. return smalltalk.send(self, "_commentStamp", []);
  96. return self;}
  97. }),
  98. smalltalk.Behavior);
  99. smalltalk.addMethod(
  100. unescape('_compile_'),
  101. smalltalk.method({
  102. selector: unescape('compile%3A'),
  103. fn: function (aString) {
  104. var self=this;
  105. smalltalk.send(self, "_compile_category_", [aString, ""]);
  106. return self;}
  107. }),
  108. smalltalk.Behavior);
  109. smalltalk.addMethod(
  110. unescape('_compile_category_'),
  111. smalltalk.method({
  112. selector: unescape('compile%3Acategory%3A'),
  113. fn: function (aString, anotherString) {
  114. var self=this;
  115. var method=nil;
  116. (method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self]));
  117. smalltalk.send(method, "_category_", [anotherString]);
  118. smalltalk.send(self, "_addCompiledMethod_", [method]);
  119. return self;}
  120. }),
  121. smalltalk.Behavior);
  122. smalltalk.addMethod(
  123. unescape('_inheritsFrom_'),
  124. smalltalk.method({
  125. selector: unescape('inheritsFrom%3A'),
  126. fn: function (aClass) {
  127. var self=this;
  128. return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
  129. return self;}
  130. }),
  131. smalltalk.Behavior);
  132. smalltalk.addMethod(
  133. unescape('_instanceVariableNames'),
  134. smalltalk.method({
  135. selector: unescape('instanceVariableNames'),
  136. fn: function () {
  137. var self=this;
  138. return self.iVarNames;
  139. return self;}
  140. }),
  141. smalltalk.Behavior);
  142. smalltalk.addMethod(
  143. unescape('_methodAt_'),
  144. smalltalk.method({
  145. selector: unescape('methodAt%3A'),
  146. fn: function (aString) {
  147. var self=this;
  148. return smalltalk.methods(self)[aString];
  149. return self;}
  150. }),
  151. smalltalk.Behavior);
  152. smalltalk.addMethod(
  153. unescape('_methodDictionary'),
  154. smalltalk.method({
  155. selector: unescape('methodDictionary'),
  156. fn: function () {
  157. var self=this;
  158. var dict = smalltalk.HashedCollection._new();
  159. var methods = self.fn.prototype.methods;
  160. for(var i in methods) {
  161. if(methods[i].selector) {
  162. dict._at_put_(methods[i].selector, methods[i]);
  163. }
  164. };
  165. return dict;
  166. return self;}
  167. }),
  168. smalltalk.Behavior);
  169. smalltalk.addMethod(
  170. unescape('_methodsFor_'),
  171. smalltalk.method({
  172. selector: unescape('methodsFor%3A'),
  173. fn: function (aString) {
  174. var self=this;
  175. return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
  176. return self;}
  177. }),
  178. smalltalk.Behavior);
  179. smalltalk.addMethod(
  180. unescape('_methodsFor_stamp_'),
  181. smalltalk.method({
  182. selector: unescape('methodsFor%3Astamp%3A'),
  183. fn: function (aString, aStamp) {
  184. var self=this;
  185. return smalltalk.send(self, "_methodsFor_", [aString]);
  186. return self;}
  187. }),
  188. smalltalk.Behavior);
  189. smalltalk.addMethod(
  190. unescape('_name'),
  191. smalltalk.method({
  192. selector: unescape('name'),
  193. fn: function () {
  194. var self=this;
  195. return self.className || nil;
  196. return self;}
  197. }),
  198. smalltalk.Behavior);
  199. smalltalk.addMethod(
  200. unescape('_new'),
  201. smalltalk.method({
  202. selector: unescape('new'),
  203. fn: function () {
  204. var self=this;
  205. return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
  206. return self;}
  207. }),
  208. smalltalk.Behavior);
  209. smalltalk.addMethod(
  210. unescape('_protocols'),
  211. smalltalk.method({
  212. selector: unescape('protocols'),
  213. fn: function () {
  214. var self=this;
  215. var protocols=nil;
  216. (protocols=smalltalk.send((smalltalk.Array || Array), "_new", []));
  217. 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", [])]);})]));})]);
  218. return smalltalk.send(protocols, "_sort", []);
  219. return self;}
  220. }),
  221. smalltalk.Behavior);
  222. smalltalk.addMethod(
  223. unescape('_protocolsDo_'),
  224. smalltalk.method({
  225. selector: unescape('protocolsDo%3A'),
  226. fn: function (aBlock) {
  227. var self=this;
  228. var methodsByCategory=nil;
  229. (methodsByCategory=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
  230. 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]);})]);
  231. smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(category){return smalltalk.send(aBlock, "_value_value_", [category, smalltalk.send(methodsByCategory, "_at_", [category])]);})]);
  232. return self;}
  233. }),
  234. smalltalk.Behavior);
  235. smalltalk.addMethod(
  236. unescape('_prototype'),
  237. smalltalk.method({
  238. selector: unescape('prototype'),
  239. fn: function () {
  240. var self=this;
  241. return self.fn.prototype;
  242. return self;}
  243. }),
  244. smalltalk.Behavior);
  245. smalltalk.addMethod(
  246. unescape('_removeCompiledMethod_'),
  247. smalltalk.method({
  248. selector: unescape('removeCompiledMethod%3A'),
  249. fn: function (aMethod) {
  250. var self=this;
  251. delete self.fn.prototype[aMethod.selector._asSelector()];
  252. delete self.fn.prototype.methods[aMethod.selector];
  253. smalltalk.init(self);;
  254. return self;}
  255. }),
  256. smalltalk.Behavior);
  257. smalltalk.addMethod(
  258. unescape('_subclasses'),
  259. smalltalk.method({
  260. selector: unescape('subclasses'),
  261. fn: function () {
  262. var self=this;
  263. return smalltalk.subclasses(self);
  264. return self;}
  265. }),
  266. smalltalk.Behavior);
  267. smalltalk.addMethod(
  268. unescape('_superclass'),
  269. smalltalk.method({
  270. selector: unescape('superclass'),
  271. fn: function () {
  272. var self=this;
  273. return self.superclass || nil;
  274. return self;}
  275. }),
  276. smalltalk.Behavior);
  277. smalltalk.addMethod(
  278. unescape('_withAllSubclasses'),
  279. smalltalk.method({
  280. selector: unescape('withAllSubclasses'),
  281. fn: function () {
  282. var self=this;
  283. return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
  284. return self;}
  285. }),
  286. smalltalk.Behavior);
  287. smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel-Classes');
  288. smalltalk.addMethod(
  289. unescape('_category'),
  290. smalltalk.method({
  291. selector: unescape('category'),
  292. fn: function () {
  293. var self=this;
  294. return (($receiver = smalltalk.send(self, "_package", [])) == nil || $receiver == undefined) ? (function(){return "Unclassified";})() : (function(){return smalltalk.send(smalltalk.send(self, "_package", []), "_name", []);})();
  295. return self;}
  296. }),
  297. smalltalk.Class);
  298. smalltalk.addMethod(
  299. unescape('_isClass'),
  300. smalltalk.method({
  301. selector: unescape('isClass'),
  302. fn: function () {
  303. var self=this;
  304. return true;
  305. return self;}
  306. }),
  307. smalltalk.Class);
  308. smalltalk.addMethod(
  309. unescape('_package'),
  310. smalltalk.method({
  311. selector: unescape('package'),
  312. fn: function () {
  313. var self=this;
  314. return self.pkg;
  315. return self;}
  316. }),
  317. smalltalk.Class);
  318. smalltalk.addMethod(
  319. unescape('_package_'),
  320. smalltalk.method({
  321. selector: unescape('package%3A'),
  322. fn: function (aPackage) {
  323. var self=this;
  324. self.pkg = aPackage;
  325. return self;}
  326. }),
  327. smalltalk.Class);
  328. smalltalk.addMethod(
  329. unescape('_printString'),
  330. smalltalk.method({
  331. selector: unescape('printString'),
  332. fn: function () {
  333. var self=this;
  334. return smalltalk.send(self, "_name", []);
  335. return self;}
  336. }),
  337. smalltalk.Class);
  338. smalltalk.addMethod(
  339. unescape('_rename_'),
  340. smalltalk.method({
  341. selector: unescape('rename%3A'),
  342. fn: function (aString) {
  343. var self=this;
  344. smalltalk[aString] = self;
  345. delete smalltalk[self.className];
  346. self.className = aString;
  347. ;
  348. return self;}
  349. }),
  350. smalltalk.Class);
  351. smalltalk.addMethod(
  352. unescape('_subclass_instanceVariableNames_'),
  353. smalltalk.method({
  354. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  355. fn: function (aString, anotherString) {
  356. var self=this;
  357. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  358. return self;}
  359. }),
  360. smalltalk.Class);
  361. smalltalk.addMethod(
  362. unescape('_subclass_instanceVariableNames_category_'),
  363. smalltalk.method({
  364. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  365. fn: function (aString, aString2, aString3) {
  366. var self=this;
  367. smalltalk.send(self, "_deprecatedAPI", []);
  368. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  369. return self;}
  370. }),
  371. smalltalk.Class);
  372. smalltalk.addMethod(
  373. unescape('_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_'),
  374. smalltalk.method({
  375. selector: unescape('subclass%3AinstanceVariableNames%3AclassVariableNames%3ApoolDictionaries%3Acategory%3A'),
  376. fn: function (aString, aString2, classVars, pools, aString3) {
  377. var self=this;
  378. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  379. return self;}
  380. }),
  381. smalltalk.Class);
  382. smalltalk.addMethod(
  383. unescape('_subclass_instanceVariableNames_package_'),
  384. smalltalk.method({
  385. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  386. fn: function (aString, aString2, aString3) {
  387. var self=this;
  388. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, smalltalk.send(aString, "_asString", []), aString2, aString3]);
  389. return self;}
  390. }),
  391. smalltalk.Class);
  392. smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel-Classes');
  393. smalltalk.addMethod(
  394. unescape('_instanceClass'),
  395. smalltalk.method({
  396. selector: unescape('instanceClass'),
  397. fn: function () {
  398. var self=this;
  399. return self.instanceClass;
  400. return self;}
  401. }),
  402. smalltalk.Metaclass);
  403. smalltalk.addMethod(
  404. unescape('_instanceVariableNames_'),
  405. smalltalk.method({
  406. selector: unescape('instanceVariableNames%3A'),
  407. fn: function (aCollection) {
  408. var self=this;
  409. smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_class_instanceVariableNames_", [self, aCollection]);
  410. return self;}
  411. }),
  412. smalltalk.Metaclass);
  413. smalltalk.addMethod(
  414. unescape('_isMetaclass'),
  415. smalltalk.method({
  416. selector: unescape('isMetaclass'),
  417. fn: function () {
  418. var self=this;
  419. return true;
  420. return self;}
  421. }),
  422. smalltalk.Metaclass);
  423. smalltalk.addMethod(
  424. unescape('_printString'),
  425. smalltalk.method({
  426. selector: unescape('printString'),
  427. fn: function () {
  428. var self=this;
  429. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_instanceClass", []), "_name", []), "__comma", [" class"]);
  430. return self;}
  431. }),
  432. smalltalk.Metaclass);
  433. smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel-Classes');
  434. smalltalk.addMethod(
  435. unescape('_addSubclassOf_named_instanceVariableNames_'),
  436. smalltalk.method({
  437. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3A'),
  438. fn: function (aClass, aString, aCollection) {
  439. var self=this;
  440. smalltalk.addClass(aString, aClass, aCollection);
  441. return smalltalk[aString];
  442. return self;}
  443. }),
  444. smalltalk.ClassBuilder);
  445. smalltalk.addMethod(
  446. unescape('_addSubclassOf_named_instanceVariableNames_package_'),
  447. smalltalk.method({
  448. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3Apackage%3A'),
  449. fn: function (aClass, aString, aCollection, packageName) {
  450. var self=this;
  451. smalltalk.addClass(aString, aClass, aCollection, packageName);
  452. return smalltalk[aString];
  453. return self;}
  454. }),
  455. smalltalk.ClassBuilder);
  456. smalltalk.addMethod(
  457. unescape('_class_instanceVariableNames_'),
  458. smalltalk.method({
  459. selector: unescape('class%3AinstanceVariableNames%3A'),
  460. fn: function (aClass, aString) {
  461. var self=this;
  462. ((($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"])]);})]));
  463. smalltalk.send(aClass, "_basicAt_put_", ["iVarNames", smalltalk.send(self, "_instanceVariableNamesFor_", [aString])]);
  464. smalltalk.send(self, "_setupClass_", [aClass]);
  465. return self;}
  466. }),
  467. smalltalk.ClassBuilder);
  468. smalltalk.addMethod(
  469. unescape('_copyClass_named_'),
  470. smalltalk.method({
  471. selector: unescape('copyClass%3Anamed%3A'),
  472. fn: function (aClass, aString) {
  473. var self=this;
  474. var newClass=nil;
  475. (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), aString, smalltalk.send(aClass, "_instanceVariableNames", []), smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]));
  476. smalltalk.send(self, "_setupClass_", [newClass]);
  477. 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", [])]);})]);
  478. 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", [])]);})]);
  479. smalltalk.send(self, "_setupClass_", [newClass]);
  480. return newClass;
  481. return self;}
  482. }),
  483. smalltalk.ClassBuilder);
  484. smalltalk.addMethod(
  485. unescape('_instanceVariableNamesFor_'),
  486. smalltalk.method({
  487. selector: unescape('instanceVariableNamesFor%3A'),
  488. fn: function (aString) {
  489. var self=this;
  490. return smalltalk.send(smalltalk.send(aString, "_tokenize_", [" "]), "_reject_", [(function(each){return smalltalk.send(each, "_isEmpty", []);})]);
  491. return self;}
  492. }),
  493. smalltalk.ClassBuilder);
  494. smalltalk.addMethod(
  495. unescape('_setupClass_'),
  496. smalltalk.method({
  497. selector: unescape('setupClass%3A'),
  498. fn: function (aClass) {
  499. var self=this;
  500. smalltalk.init(aClass);;
  501. return self;}
  502. }),
  503. smalltalk.ClassBuilder);
  504. smalltalk.addMethod(
  505. unescape('_superclass_subclass_'),
  506. smalltalk.method({
  507. selector: unescape('superclass%3Asubclass%3A'),
  508. fn: function (aClass, aString) {
  509. var self=this;
  510. return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
  511. return self;}
  512. }),
  513. smalltalk.ClassBuilder);
  514. smalltalk.addMethod(
  515. unescape('_superclass_subclass_instanceVariableNames_package_'),
  516. smalltalk.method({
  517. selector: unescape('superclass%3Asubclass%3AinstanceVariableNames%3Apackage%3A'),
  518. fn: function (aClass, aString, aString2, aString3) {
  519. var self=this;
  520. var newClass=nil;
  521. (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [aClass, aString, smalltalk.send(self, "_instanceVariableNamesFor_", [aString2]), (($receiver = aString3) == nil || $receiver == undefined) ? (function(){return "unclassified";})() : $receiver]));
  522. smalltalk.send(self, "_setupClass_", [newClass]);
  523. return newClass;
  524. return self;}
  525. }),
  526. smalltalk.ClassBuilder);
  527. smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel-Classes');
  528. smalltalk.addMethod(
  529. unescape('_class_category_'),
  530. smalltalk.method({
  531. selector: unescape('class%3Acategory%3A'),
  532. fn: function (aClass, aString) {
  533. var self=this;
  534. (self['@class']=aClass);
  535. (self['@category']=aString);
  536. return self;}
  537. }),
  538. smalltalk.ClassCategoryReader);
  539. smalltalk.addMethod(
  540. unescape('_compileMethod_'),
  541. smalltalk.method({
  542. selector: unescape('compileMethod%3A'),
  543. fn: function (aString) {
  544. var self=this;
  545. var method=nil;
  546. var compiler=nil;
  547. (method=smalltalk.send((compiler=smalltalk.send((smalltalk.Compiler || Compiler), "_new", [])), "_load_forClass_", [aString, self['@class']]));
  548. smalltalk.send(method, "_category_", [self['@category']]);
  549. smalltalk.send(self['@class'], "_addCompiledMethod_", [method]);
  550. smalltalk.send(compiler, "_setupClass_", [self['@class']]);
  551. return self;}
  552. }),
  553. smalltalk.ClassCategoryReader);
  554. smalltalk.addMethod(
  555. unescape('_initialize'),
  556. smalltalk.method({
  557. selector: unescape('initialize'),
  558. fn: function () {
  559. var self=this;
  560. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  561. (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
  562. return self;}
  563. }),
  564. smalltalk.ClassCategoryReader);
  565. smalltalk.addMethod(
  566. unescape('_scanFrom_'),
  567. smalltalk.method({
  568. selector: unescape('scanFrom%3A'),
  569. fn: function (aChunkParser) {
  570. var self=this;
  571. var chunk=nil;
  572. (function(){while(!(function(){(chunk=smalltalk.send(aChunkParser, "_nextChunk", []));return smalltalk.send(chunk, "_isEmpty", []);})()) {(function(){return smalltalk.send(self, "_compileMethod_", [chunk]);})()}})();
  573. return self;}
  574. }),
  575. smalltalk.ClassCategoryReader);
  576. smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel-Classes');
  577. smalltalk.addMethod(
  578. unescape('_class_'),
  579. smalltalk.method({
  580. selector: unescape('class%3A'),
  581. fn: function (aClass) {
  582. var self=this;
  583. (self['@class']=aClass);
  584. return self;}
  585. }),
  586. smalltalk.ClassCommentReader);
  587. smalltalk.addMethod(
  588. unescape('_initialize'),
  589. smalltalk.method({
  590. selector: unescape('initialize'),
  591. fn: function () {
  592. var self=this;
  593. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  594. (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
  595. return self;}
  596. }),
  597. smalltalk.ClassCommentReader);
  598. smalltalk.addMethod(
  599. unescape('_scanFrom_'),
  600. smalltalk.method({
  601. selector: unescape('scanFrom%3A'),
  602. fn: function (aChunkParser) {
  603. var self=this;
  604. var chunk=nil;
  605. (chunk=smalltalk.send(aChunkParser, "_nextChunk", []));
  606. ((($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]);})]));
  607. return self;}
  608. }),
  609. smalltalk.ClassCommentReader);
  610. smalltalk.addMethod(
  611. unescape('_setComment_'),
  612. smalltalk.method({
  613. selector: unescape('setComment%3A'),
  614. fn: function (aString) {
  615. var self=this;
  616. smalltalk.send(self['@class'], "_comment_", [aString]);
  617. return self;}
  618. }),
  619. smalltalk.ClassCommentReader);
  620. smalltalk.addClass('ClassSorterNode', smalltalk.Object, ['theClass', 'level', 'nodes'], 'Kernel-Classes');
  621. smalltalk.addMethod(
  622. unescape('_getNodesFrom_'),
  623. smalltalk.method({
  624. selector: unescape('getNodesFrom%3A'),
  625. fn: function (aCollection) {
  626. var self=this;
  627. var children=nil;
  628. var others=nil;
  629. (children=[]);
  630. (others=[]);
  631. smalltalk.send(aCollection, "_do_", [(function(each){return ((($receiver = smalltalk.send(smalltalk.send(each, "_superclass", []), "__eq", [smalltalk.send(self, "_theClass", [])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(children, "_add_", [each]);})() : (function(){return smalltalk.send(others, "_add_", [each]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(children, "_add_", [each]);}), (function(){return smalltalk.send(others, "_add_", [each]);})]));})]);
  632. (self['@nodes']=smalltalk.send(children, "_collect_", [(function(each){return smalltalk.send((smalltalk.ClassSorterNode || ClassSorterNode), "_on_classes_level_", [each, others, ((($receiver = smalltalk.send(self, "_level", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})]));
  633. return self;}
  634. }),
  635. smalltalk.ClassSorterNode);
  636. smalltalk.addMethod(
  637. unescape('_level'),
  638. smalltalk.method({
  639. selector: unescape('level'),
  640. fn: function () {
  641. var self=this;
  642. return self['@level'];
  643. return self;}
  644. }),
  645. smalltalk.ClassSorterNode);
  646. smalltalk.addMethod(
  647. unescape('_level_'),
  648. smalltalk.method({
  649. selector: unescape('level%3A'),
  650. fn: function (anInteger) {
  651. var self=this;
  652. (self['@level']=anInteger);
  653. return self;}
  654. }),
  655. smalltalk.ClassSorterNode);
  656. smalltalk.addMethod(
  657. unescape('_nodes'),
  658. smalltalk.method({
  659. selector: unescape('nodes'),
  660. fn: function () {
  661. var self=this;
  662. return self['@nodes'];
  663. return self;}
  664. }),
  665. smalltalk.ClassSorterNode);
  666. smalltalk.addMethod(
  667. unescape('_theClass'),
  668. smalltalk.method({
  669. selector: unescape('theClass'),
  670. fn: function () {
  671. var self=this;
  672. return self['@theClass'];
  673. return self;}
  674. }),
  675. smalltalk.ClassSorterNode);
  676. smalltalk.addMethod(
  677. unescape('_theClass_'),
  678. smalltalk.method({
  679. selector: unescape('theClass%3A'),
  680. fn: function (aClass) {
  681. var self=this;
  682. (self['@theClass']=aClass);
  683. return self;}
  684. }),
  685. smalltalk.ClassSorterNode);
  686. smalltalk.addMethod(
  687. unescape('_traverseClassesWith_'),
  688. smalltalk.method({
  689. selector: unescape('traverseClassesWith%3A'),
  690. fn: function (aCollection) {
  691. var self=this;
  692. smalltalk.send(aCollection, "_add_", [smalltalk.send(self, "_theClass", [])]);
  693. smalltalk.send(smalltalk.send(smalltalk.send(self, "_nodes", []), "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(smalltalk.send(a, "_theClass", []), "_name", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(smalltalk.send(b, "_theClass", []), "_name", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(smalltalk.send(b, "_theClass", []), "_name", [])]));})]), "_do_", [(function(aNode){return smalltalk.send(aNode, "_traverseClassesWith_", [aCollection]);})]);
  694. return self;}
  695. }),
  696. smalltalk.ClassSorterNode);
  697. smalltalk.addMethod(
  698. unescape('_on_classes_level_'),
  699. smalltalk.method({
  700. selector: unescape('on%3Aclasses%3Alevel%3A'),
  701. fn: function (aClass, aCollection, anInteger) {
  702. var self=this;
  703. return (function($rec){smalltalk.send($rec, "_theClass_", [aClass]);smalltalk.send($rec, "_level_", [anInteger]);smalltalk.send($rec, "_getNodesFrom_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  704. return self;}
  705. }),
  706. smalltalk.ClassSorterNode.klass);