1
0

Kernel-Classes.deploy.js 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214
  1. smalltalk.addPackage('Kernel-Classes', {});
  2. smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel-Classes');
  3. smalltalk.addMethod(
  4. "_addCompiledMethod_",
  5. smalltalk.method({
  6. selector: "addCompiledMethod:",
  7. fn: function (aMethod){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) { var $1,$2;
  10. smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
  11. ;
  12. $1=_st((smalltalk.MethodAdded || MethodAdded))._new();
  13. _st($1)._theClass_(self);
  14. _st($1)._method_(aMethod);
  15. $2=_st($1)._yourself();
  16. _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._announce_($2);
  17. return self}, self, "addCompiledMethod:", [aMethod], smalltalk.Behavior)}
  18. }),
  19. smalltalk.Behavior);
  20. smalltalk.addMethod(
  21. "_allInstanceVariableNames",
  22. smalltalk.method({
  23. selector: "allInstanceVariableNames",
  24. fn: function (){
  25. var self=this;
  26. return smalltalk.withContext(function($ctx1) { var $1;
  27. $ctx1.result=nil;
  28. $ctx1.locals.result=_st(_st(self)._instanceVariableNames())._copy();
  29. $1=_st(self)._superclass();
  30. if(($receiver = $1) == nil || $receiver == undefined){
  31. $1;
  32. } else {
  33. _st($ctx1.locals.result)._addAll_(_st(_st(self)._superclass())._allInstanceVariableNames());
  34. };
  35. return $ctx1.locals.result;
  36. }, self, "allInstanceVariableNames", [], smalltalk.Behavior)}
  37. }),
  38. smalltalk.Behavior);
  39. smalltalk.addMethod(
  40. "_allSubclasses",
  41. smalltalk.method({
  42. selector: "allSubclasses",
  43. fn: function (){
  44. var self=this;
  45. return smalltalk.withContext(function($ctx1) { $ctx1.result=nil;
  46. $ctx1.locals.result=_st(self)._subclasses();
  47. _st(_st(self)._subclasses())._do_((function(each){
  48. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.result)._addAll_(_st(each)._allSubclasses());
  49. })}));
  50. return $ctx1.locals.result;
  51. }, self, "allSubclasses", [], smalltalk.Behavior)}
  52. }),
  53. smalltalk.Behavior);
  54. smalltalk.addMethod(
  55. "_allSuperclasses",
  56. smalltalk.method({
  57. selector: "allSuperclasses",
  58. fn: function (){
  59. var self=this;
  60. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  61. $1=_st(self)._superclass();
  62. if(($receiver = $1) == nil || $receiver == undefined){
  63. return [];
  64. } else {
  65. $1;
  66. };
  67. $3=_st((smalltalk.OrderedCollection || OrderedCollection))._with_(_st(self)._superclass());
  68. _st($3)._addAll_(_st(_st(self)._superclass())._allSuperclasses());
  69. $4=_st($3)._yourself();
  70. $2=$4;
  71. return $2;
  72. }, self, "allSuperclasses", [], smalltalk.Behavior)}
  73. }),
  74. smalltalk.Behavior);
  75. smalltalk.addMethod(
  76. "_basicNew",
  77. smalltalk.method({
  78. selector: "basicNew",
  79. fn: function (){
  80. var self=this;
  81. return smalltalk.withContext(function($ctx1) { return new self.fn();
  82. ;
  83. return self}, self, "basicNew", [], smalltalk.Behavior)}
  84. }),
  85. smalltalk.Behavior);
  86. smalltalk.addMethod(
  87. "_canUnderstand_",
  88. smalltalk.method({
  89. selector: "canUnderstand:",
  90. fn: function (aSelector){
  91. var self=this;
  92. return smalltalk.withContext(function($ctx1) { var $1;
  93. $1=_st(_st(_st(_st(self)._methodDictionary())._keys())._includes_(_st(aSelector)._asString()))._or_((function(){
  94. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._superclass())._notNil())._and_((function(){
  95. return smalltalk.withContext(function($ctx3) { return _st(_st(self)._superclass())._canUnderstand_(aSelector);
  96. })}));
  97. })}));
  98. return $1;
  99. }, self, "canUnderstand:", [aSelector], smalltalk.Behavior)}
  100. }),
  101. smalltalk.Behavior);
  102. smalltalk.addMethod(
  103. "_comment",
  104. smalltalk.method({
  105. selector: "comment",
  106. fn: function (){
  107. var self=this;
  108. return smalltalk.withContext(function($ctx1) { var $2,$1;
  109. $2=_st(self)._basicAt_("comment");
  110. if(($receiver = $2) == nil || $receiver == undefined){
  111. $1="";
  112. } else {
  113. $1=$2;
  114. };
  115. return $1;
  116. }, self, "comment", [], smalltalk.Behavior)}
  117. }),
  118. smalltalk.Behavior);
  119. smalltalk.addMethod(
  120. "_comment_",
  121. smalltalk.method({
  122. selector: "comment:",
  123. fn: function (aString){
  124. var self=this;
  125. return smalltalk.withContext(function($ctx1) { var $1,$2;
  126. _st(self)._basicAt_put_("comment",aString);
  127. $1=_st((smalltalk.ClassCommentChanged || ClassCommentChanged))._new();
  128. _st($1)._theClass_(self);
  129. $2=_st($1)._yourself();
  130. _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._announce_($2);
  131. return self}, self, "comment:", [aString], smalltalk.Behavior)}
  132. }),
  133. smalltalk.Behavior);
  134. smalltalk.addMethod(
  135. "_commentStamp",
  136. smalltalk.method({
  137. selector: "commentStamp",
  138. fn: function (){
  139. var self=this;
  140. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  141. $2=_st((smalltalk.ClassCommentReader || ClassCommentReader))._new();
  142. _st($2)._class_(self);
  143. $3=_st($2)._yourself();
  144. $1=$3;
  145. return $1;
  146. }, self, "commentStamp", [], smalltalk.Behavior)}
  147. }),
  148. smalltalk.Behavior);
  149. smalltalk.addMethod(
  150. "_commentStamp_prior_",
  151. smalltalk.method({
  152. selector: "commentStamp:prior:",
  153. fn: function (aStamp,prior){
  154. var self=this;
  155. return smalltalk.withContext(function($ctx1) { var $1;
  156. $1=_st(self)._commentStamp();
  157. return $1;
  158. }, self, "commentStamp:prior:", [aStamp,prior], smalltalk.Behavior)}
  159. }),
  160. smalltalk.Behavior);
  161. smalltalk.addMethod(
  162. "_compile_",
  163. smalltalk.method({
  164. selector: "compile:",
  165. fn: function (aString){
  166. var self=this;
  167. return smalltalk.withContext(function($ctx1) { _st(self)._compile_category_(aString,"");
  168. return self}, self, "compile:", [aString], smalltalk.Behavior)}
  169. }),
  170. smalltalk.Behavior);
  171. smalltalk.addMethod(
  172. "_compile_category_",
  173. smalltalk.method({
  174. selector: "compile:category:",
  175. fn: function (aString,anotherString){
  176. var self=this;
  177. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.Compiler || Compiler))._new())._install_forClass_category_(aString,self,anotherString);
  178. return self}, self, "compile:category:", [aString,anotherString], smalltalk.Behavior)}
  179. }),
  180. smalltalk.Behavior);
  181. smalltalk.addMethod(
  182. "_definition",
  183. smalltalk.method({
  184. selector: "definition",
  185. fn: function (){
  186. var self=this;
  187. return smalltalk.withContext(function($ctx1) { return "";
  188. }, self, "definition", [], smalltalk.Behavior)}
  189. }),
  190. smalltalk.Behavior);
  191. smalltalk.addMethod(
  192. "_includesSelector_",
  193. smalltalk.method({
  194. selector: "includesSelector:",
  195. fn: function (aSymbol){
  196. var self=this;
  197. return smalltalk.withContext(function($ctx1) { var $1;
  198. $1=_st(_st(self)._methodDictionary())._includesKey_(_st(aSymbol)._asString());
  199. return $1;
  200. }, self, "includesSelector:", [aSymbol], smalltalk.Behavior)}
  201. }),
  202. smalltalk.Behavior);
  203. smalltalk.addMethod(
  204. "_inheritsFrom_",
  205. smalltalk.method({
  206. selector: "inheritsFrom:",
  207. fn: function (aClass){
  208. var self=this;
  209. return smalltalk.withContext(function($ctx1) { var $1;
  210. $1=_st(_st(aClass)._allSubclasses())._includes_(self);
  211. return $1;
  212. }, self, "inheritsFrom:", [aClass], smalltalk.Behavior)}
  213. }),
  214. smalltalk.Behavior);
  215. smalltalk.addMethod(
  216. "_instanceVariableNames",
  217. smalltalk.method({
  218. selector: "instanceVariableNames",
  219. fn: function (){
  220. var self=this;
  221. return smalltalk.withContext(function($ctx1) { return self.iVarNames;
  222. ;
  223. return self}, self, "instanceVariableNames", [], smalltalk.Behavior)}
  224. }),
  225. smalltalk.Behavior);
  226. smalltalk.addMethod(
  227. "_lookupSelector_",
  228. smalltalk.method({
  229. selector: "lookupSelector:",
  230. fn: function (selector){
  231. var self=this;
  232. return smalltalk.withContext(function($ctx1) { var $1,$2;
  233. var $early={};
  234. try {
  235. $ctx1.locals.lookupClass=nil;
  236. $ctx1.locals.lookupClass=self;
  237. _st((function(){
  238. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.lookupClass).__eq(nil);
  239. })}))._whileFalse_((function(){
  240. return smalltalk.withContext(function($ctx2) { $1=_st($ctx1.locals.lookupClass)._includesSelector_(selector);
  241. if(smalltalk.assert($1)){
  242. $2=_st($ctx1.locals.lookupClass)._methodAt_(selector);
  243. throw $early=[$2];
  244. };
  245. $ctx1.locals.lookupClass=_st($ctx1.locals.lookupClass)._superclass();
  246. return $ctx1.locals.lookupClass;
  247. })}));
  248. return nil;
  249. }
  250. catch(e) {if(e===$early)return e[0]; throw e}
  251. }, self, "lookupSelector:", [selector], smalltalk.Behavior)}
  252. }),
  253. smalltalk.Behavior);
  254. smalltalk.addMethod(
  255. "_methodAt_",
  256. smalltalk.method({
  257. selector: "methodAt:",
  258. fn: function (aSymbol){
  259. var self=this;
  260. return smalltalk.withContext(function($ctx1) { var $1;
  261. $1=_st(_st(self)._methodDictionary())._at_(_st(aSymbol)._asString());
  262. return $1;
  263. }, self, "methodAt:", [aSymbol], smalltalk.Behavior)}
  264. }),
  265. smalltalk.Behavior);
  266. smalltalk.addMethod(
  267. "_methodDictionary",
  268. smalltalk.method({
  269. selector: "methodDictionary",
  270. fn: function (){
  271. var self=this;
  272. return smalltalk.withContext(function($ctx1) { var dict = smalltalk.HashedCollection._new();
  273. var methods = self.methods;
  274. for(var i in methods) {
  275. if(methods[i].selector) {
  276. dict._at_put_(methods[i].selector, methods[i]);
  277. }
  278. };
  279. return dict;
  280. ;
  281. return self}, self, "methodDictionary", [], smalltalk.Behavior)}
  282. }),
  283. smalltalk.Behavior);
  284. smalltalk.addMethod(
  285. "_methods",
  286. smalltalk.method({
  287. selector: "methods",
  288. fn: function (){
  289. var self=this;
  290. return smalltalk.withContext(function($ctx1) { var $1;
  291. $1=_st(_st(self)._methodDictionary())._values();
  292. return $1;
  293. }, self, "methods", [], smalltalk.Behavior)}
  294. }),
  295. smalltalk.Behavior);
  296. smalltalk.addMethod(
  297. "_methodsFor_",
  298. smalltalk.method({
  299. selector: "methodsFor:",
  300. fn: function (aString){
  301. var self=this;
  302. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  303. $2=_st((smalltalk.ClassCategoryReader || ClassCategoryReader))._new();
  304. _st($2)._class_category_(self,aString);
  305. $3=_st($2)._yourself();
  306. $1=$3;
  307. return $1;
  308. }, self, "methodsFor:", [aString], smalltalk.Behavior)}
  309. }),
  310. smalltalk.Behavior);
  311. smalltalk.addMethod(
  312. "_methodsFor_stamp_",
  313. smalltalk.method({
  314. selector: "methodsFor:stamp:",
  315. fn: function (aString,aStamp){
  316. var self=this;
  317. return smalltalk.withContext(function($ctx1) { var $1;
  318. $1=_st(self)._methodsFor_(aString);
  319. return $1;
  320. }, self, "methodsFor:stamp:", [aString,aStamp], smalltalk.Behavior)}
  321. }),
  322. smalltalk.Behavior);
  323. smalltalk.addMethod(
  324. "_methodsInProtocol_",
  325. smalltalk.method({
  326. selector: "methodsInProtocol:",
  327. fn: function (aString){
  328. var self=this;
  329. return smalltalk.withContext(function($ctx1) { var $1;
  330. $1=_st(_st(_st(self)._methodDictionary())._values())._select_((function(each){
  331. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._protocol()).__eq(aString);
  332. })}));
  333. return $1;
  334. }, self, "methodsInProtocol:", [aString], smalltalk.Behavior)}
  335. }),
  336. smalltalk.Behavior);
  337. smalltalk.addMethod(
  338. "_name",
  339. smalltalk.method({
  340. selector: "name",
  341. fn: function (){
  342. var self=this;
  343. return smalltalk.withContext(function($ctx1) { return self.className || nil;
  344. ;
  345. return self}, self, "name", [], smalltalk.Behavior)}
  346. }),
  347. smalltalk.Behavior);
  348. smalltalk.addMethod(
  349. "_new",
  350. smalltalk.method({
  351. selector: "new",
  352. fn: function (){
  353. var self=this;
  354. return smalltalk.withContext(function($ctx1) { var $1;
  355. $1=_st(_st(self)._basicNew())._initialize();
  356. return $1;
  357. }, self, "new", [], smalltalk.Behavior)}
  358. }),
  359. smalltalk.Behavior);
  360. smalltalk.addMethod(
  361. "_organization",
  362. smalltalk.method({
  363. selector: "organization",
  364. fn: function (){
  365. var self=this;
  366. return smalltalk.withContext(function($ctx1) { var $1;
  367. $1=_st(self)._basicAt_("organization");
  368. return $1;
  369. }, self, "organization", [], smalltalk.Behavior)}
  370. }),
  371. smalltalk.Behavior);
  372. smalltalk.addMethod(
  373. "_protocols",
  374. smalltalk.method({
  375. selector: "protocols",
  376. fn: function (){
  377. var self=this;
  378. return smalltalk.withContext(function($ctx1) { var $1;
  379. $1=_st(_st(_st(self)._organization())._elements())._sorted();
  380. return $1;
  381. }, self, "protocols", [], smalltalk.Behavior)}
  382. }),
  383. smalltalk.Behavior);
  384. smalltalk.addMethod(
  385. "_protocolsDo_",
  386. smalltalk.method({
  387. selector: "protocolsDo:",
  388. fn: function (aBlock){
  389. var self=this;
  390. return smalltalk.withContext(function($ctx1) { $ctx1.methodsByCategory=nil;
  391. $ctx1.locals.methodsByCategory=_st((smalltalk.HashedCollection || HashedCollection))._new();
  392. _st(_st(_st(self)._methodDictionary())._values())._do_((function(m){
  393. return smalltalk.withContext(function($ctx2) { return _st(_st($ctx1.locals.methodsByCategory)._at_ifAbsentPut_(_st(m)._category(),(function(){
  394. return smalltalk.withContext(function($ctx3) { return _st((smalltalk.Array || Array))._new();
  395. })})))._add_(m);
  396. })}));
  397. _st(_st(self)._protocols())._do_((function(category){
  398. return smalltalk.withContext(function($ctx2) { return _st(aBlock)._value_value_(category,_st($ctx1.locals.methodsByCategory)._at_(category));
  399. })}));
  400. return self}, self, "protocolsDo:", [aBlock], smalltalk.Behavior)}
  401. }),
  402. smalltalk.Behavior);
  403. smalltalk.addMethod(
  404. "_prototype",
  405. smalltalk.method({
  406. selector: "prototype",
  407. fn: function (){
  408. var self=this;
  409. return smalltalk.withContext(function($ctx1) { return self.fn.prototype;
  410. ;
  411. return self}, self, "prototype", [], smalltalk.Behavior)}
  412. }),
  413. smalltalk.Behavior);
  414. smalltalk.addMethod(
  415. "_removeCompiledMethod_",
  416. smalltalk.method({
  417. selector: "removeCompiledMethod:",
  418. fn: function (aMethod){
  419. var self=this;
  420. return smalltalk.withContext(function($ctx1) { var $1,$2;
  421. smalltalk.removeMethod(aMethod)
  422. smalltalk.init(self);
  423. ;
  424. ;
  425. $1=_st((smalltalk.MethodRemoved || MethodRemoved))._new();
  426. _st($1)._theClass_(self);
  427. _st($1)._method_(aMethod);
  428. $2=_st($1)._yourself();
  429. _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._announce_($2);
  430. return self}, self, "removeCompiledMethod:", [aMethod], smalltalk.Behavior)}
  431. }),
  432. smalltalk.Behavior);
  433. smalltalk.addMethod(
  434. "_selectors",
  435. smalltalk.method({
  436. selector: "selectors",
  437. fn: function (){
  438. var self=this;
  439. return smalltalk.withContext(function($ctx1) { var $1;
  440. $1=_st(_st(self)._methodDictionary())._keys();
  441. return $1;
  442. }, self, "selectors", [], smalltalk.Behavior)}
  443. }),
  444. smalltalk.Behavior);
  445. smalltalk.addMethod(
  446. "_subclasses",
  447. smalltalk.method({
  448. selector: "subclasses",
  449. fn: function (){
  450. var self=this;
  451. return smalltalk.withContext(function($ctx1) { return smalltalk.subclasses(self);
  452. ;
  453. return self}, self, "subclasses", [], smalltalk.Behavior)}
  454. }),
  455. smalltalk.Behavior);
  456. smalltalk.addMethod(
  457. "_superclass",
  458. smalltalk.method({
  459. selector: "superclass",
  460. fn: function (){
  461. var self=this;
  462. return smalltalk.withContext(function($ctx1) { return self.superclass || nil;
  463. ;
  464. return self}, self, "superclass", [], smalltalk.Behavior)}
  465. }),
  466. smalltalk.Behavior);
  467. smalltalk.addMethod(
  468. "_theMetaClass",
  469. smalltalk.method({
  470. selector: "theMetaClass",
  471. fn: function (){
  472. var self=this;
  473. return smalltalk.withContext(function($ctx1) { var $1;
  474. $1=_st(self)._class();
  475. return $1;
  476. }, self, "theMetaClass", [], smalltalk.Behavior)}
  477. }),
  478. smalltalk.Behavior);
  479. smalltalk.addMethod(
  480. "_theNonMetaClass",
  481. smalltalk.method({
  482. selector: "theNonMetaClass",
  483. fn: function (){
  484. var self=this;
  485. return smalltalk.withContext(function($ctx1) { return self;
  486. }, self, "theNonMetaClass", [], smalltalk.Behavior)}
  487. }),
  488. smalltalk.Behavior);
  489. smalltalk.addMethod(
  490. "_withAllSubclasses",
  491. smalltalk.method({
  492. selector: "withAllSubclasses",
  493. fn: function (){
  494. var self=this;
  495. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  496. $2=_st((smalltalk.Array || Array))._with_(self);
  497. _st($2)._addAll_(_st(self)._allSubclasses());
  498. $3=_st($2)._yourself();
  499. $1=$3;
  500. return $1;
  501. }, self, "withAllSubclasses", [], smalltalk.Behavior)}
  502. }),
  503. smalltalk.Behavior);
  504. smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel-Classes');
  505. smalltalk.addMethod(
  506. "_asJavascript",
  507. smalltalk.method({
  508. selector: "asJavascript",
  509. fn: function (){
  510. var self=this;
  511. return smalltalk.withContext(function($ctx1) { var $1;
  512. $1=_st("smalltalk.").__comma(_st(self)._name());
  513. return $1;
  514. }, self, "asJavascript", [], smalltalk.Class)}
  515. }),
  516. smalltalk.Class);
  517. smalltalk.addMethod(
  518. "_category",
  519. smalltalk.method({
  520. selector: "category",
  521. fn: function (){
  522. var self=this;
  523. return smalltalk.withContext(function($ctx1) { var $2,$1;
  524. $2=_st(self)._package();
  525. if(($receiver = $2) == nil || $receiver == undefined){
  526. $1="Unclassified";
  527. } else {
  528. $1=_st(_st(self)._package())._name();
  529. };
  530. return $1;
  531. }, self, "category", [], smalltalk.Class)}
  532. }),
  533. smalltalk.Class);
  534. smalltalk.addMethod(
  535. "_definition",
  536. smalltalk.method({
  537. selector: "definition",
  538. fn: function (){
  539. var self=this;
  540. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  541. $1=_st((smalltalk.String || String))._streamContents_((function(stream){
  542. return smalltalk.withContext(function($ctx2) { _st(stream)._nextPutAll_(_st(_st(self)._superclass())._asString());
  543. _st(stream)._nextPutAll_(" subclass: #");
  544. _st(stream)._nextPutAll_(_st(self)._name());
  545. _st(stream)._nextPutAll_(_st(_st((smalltalk.String || String))._lf()).__comma(_st((smalltalk.String || String))._tab()));
  546. $2=_st(stream)._nextPutAll_("instanceVariableNames: '");
  547. $2;
  548. _st(_st(self)._instanceVariableNames())._do_separatedBy_((function(each){
  549. return smalltalk.withContext(function($ctx3) { return _st(stream)._nextPutAll_(each);
  550. })}),(function(){
  551. return smalltalk.withContext(function($ctx3) { return _st(stream)._nextPutAll_(" ");
  552. })}));
  553. _st(stream)._nextPutAll_(_st(_st("'").__comma(_st((smalltalk.String || String))._lf())).__comma(_st((smalltalk.String || String))._tab()));
  554. _st(stream)._nextPutAll_("package: '");
  555. _st(stream)._nextPutAll_(_st(self)._category());
  556. $3=_st(stream)._nextPutAll_("'");
  557. return $3;
  558. })}));
  559. return $1;
  560. }, self, "definition", [], smalltalk.Class)}
  561. }),
  562. smalltalk.Class);
  563. smalltalk.addMethod(
  564. "_isClass",
  565. smalltalk.method({
  566. selector: "isClass",
  567. fn: function (){
  568. var self=this;
  569. return smalltalk.withContext(function($ctx1) { return true;
  570. }, self, "isClass", [], smalltalk.Class)}
  571. }),
  572. smalltalk.Class);
  573. smalltalk.addMethod(
  574. "_package",
  575. smalltalk.method({
  576. selector: "package",
  577. fn: function (){
  578. var self=this;
  579. return smalltalk.withContext(function($ctx1) { return self.pkg;
  580. ;
  581. return self}, self, "package", [], smalltalk.Class)}
  582. }),
  583. smalltalk.Class);
  584. smalltalk.addMethod(
  585. "_package_",
  586. smalltalk.method({
  587. selector: "package:",
  588. fn: function (aPackage){
  589. var self=this;
  590. return smalltalk.withContext(function($ctx1) { self.pkg = aPackage;
  591. ;
  592. return self}, self, "package:", [aPackage], smalltalk.Class)}
  593. }),
  594. smalltalk.Class);
  595. smalltalk.addMethod(
  596. "_printString",
  597. smalltalk.method({
  598. selector: "printString",
  599. fn: function (){
  600. var self=this;
  601. return smalltalk.withContext(function($ctx1) { var $1;
  602. $1=_st(self)._name();
  603. return $1;
  604. }, self, "printString", [], smalltalk.Class)}
  605. }),
  606. smalltalk.Class);
  607. smalltalk.addMethod(
  608. "_rename_",
  609. smalltalk.method({
  610. selector: "rename:",
  611. fn: function (aString){
  612. var self=this;
  613. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._renameClass_to_(self,aString);
  614. return self}, self, "rename:", [aString], smalltalk.Class)}
  615. }),
  616. smalltalk.Class);
  617. smalltalk.addMethod(
  618. "_subclass_instanceVariableNames_",
  619. smalltalk.method({
  620. selector: "subclass:instanceVariableNames:",
  621. fn: function (aString,anotherString){
  622. var self=this;
  623. return smalltalk.withContext(function($ctx1) { var $1;
  624. $1=_st(self)._subclass_instanceVariableNames_package_(aString,anotherString,nil);
  625. return $1;
  626. }, self, "subclass:instanceVariableNames:", [aString,anotherString], smalltalk.Class)}
  627. }),
  628. smalltalk.Class);
  629. smalltalk.addMethod(
  630. "_subclass_instanceVariableNames_category_",
  631. smalltalk.method({
  632. selector: "subclass:instanceVariableNames:category:",
  633. fn: function (aString,aString2,aString3){
  634. var self=this;
  635. return smalltalk.withContext(function($ctx1) { var $1;
  636. _st(self)._deprecatedAPI();
  637. $1=_st(self)._subclass_instanceVariableNames_package_(aString,aString2,aString3);
  638. return $1;
  639. }, self, "subclass:instanceVariableNames:category:", [aString,aString2,aString3], smalltalk.Class)}
  640. }),
  641. smalltalk.Class);
  642. smalltalk.addMethod(
  643. "_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_",
  644. smalltalk.method({
  645. selector: "subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",
  646. fn: function (aString,aString2,classVars,pools,aString3){
  647. var self=this;
  648. return smalltalk.withContext(function($ctx1) { var $1;
  649. $1=_st(self)._subclass_instanceVariableNames_package_(aString,aString2,aString3);
  650. return $1;
  651. }, self, "subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:", [aString,aString2,classVars,pools,aString3], smalltalk.Class)}
  652. }),
  653. smalltalk.Class);
  654. smalltalk.addMethod(
  655. "_subclass_instanceVariableNames_package_",
  656. smalltalk.method({
  657. selector: "subclass:instanceVariableNames:package:",
  658. fn: function (aString,aString2,aString3){
  659. var self=this;
  660. return smalltalk.withContext(function($ctx1) { var $1;
  661. $1=_st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._superclass_subclass_instanceVariableNames_package_(self,_st(aString)._asString(),aString2,aString3);
  662. return $1;
  663. }, self, "subclass:instanceVariableNames:package:", [aString,aString2,aString3], smalltalk.Class)}
  664. }),
  665. smalltalk.Class);
  666. smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel-Classes');
  667. smalltalk.addMethod(
  668. "_asJavascript",
  669. smalltalk.method({
  670. selector: "asJavascript",
  671. fn: function (){
  672. var self=this;
  673. return smalltalk.withContext(function($ctx1) { var $1;
  674. $1=_st(_st("smalltalk.").__comma(_st(_st(self)._instanceClass())._name())).__comma(".klass");
  675. return $1;
  676. }, self, "asJavascript", [], smalltalk.Metaclass)}
  677. }),
  678. smalltalk.Metaclass);
  679. smalltalk.addMethod(
  680. "_definition",
  681. smalltalk.method({
  682. selector: "definition",
  683. fn: function (){
  684. var self=this;
  685. return smalltalk.withContext(function($ctx1) { var $2,$1;
  686. $1=_st((smalltalk.String || String))._streamContents_((function(stream){
  687. return smalltalk.withContext(function($ctx2) { _st(stream)._nextPutAll_(_st(self)._asString());
  688. _st(stream)._nextPutAll_(" class ");
  689. $2=_st(stream)._nextPutAll_("instanceVariableNames: '");
  690. $2;
  691. _st(_st(self)._instanceVariableNames())._do_separatedBy_((function(each){
  692. return smalltalk.withContext(function($ctx3) { return _st(stream)._nextPutAll_(each);
  693. })}),(function(){
  694. return smalltalk.withContext(function($ctx3) { return _st(stream)._nextPutAll_(" ");
  695. })}));
  696. return _st(stream)._nextPutAll_("'");
  697. })}));
  698. return $1;
  699. }, self, "definition", [], smalltalk.Metaclass)}
  700. }),
  701. smalltalk.Metaclass);
  702. smalltalk.addMethod(
  703. "_instanceClass",
  704. smalltalk.method({
  705. selector: "instanceClass",
  706. fn: function (){
  707. var self=this;
  708. return smalltalk.withContext(function($ctx1) { return self.instanceClass;
  709. ;
  710. return self}, self, "instanceClass", [], smalltalk.Metaclass)}
  711. }),
  712. smalltalk.Metaclass);
  713. smalltalk.addMethod(
  714. "_instanceVariableNames_",
  715. smalltalk.method({
  716. selector: "instanceVariableNames:",
  717. fn: function (aCollection){
  718. var self=this;
  719. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._class_instanceVariableNames_(self,aCollection);
  720. return self}, self, "instanceVariableNames:", [aCollection], smalltalk.Metaclass)}
  721. }),
  722. smalltalk.Metaclass);
  723. smalltalk.addMethod(
  724. "_isMetaclass",
  725. smalltalk.method({
  726. selector: "isMetaclass",
  727. fn: function (){
  728. var self=this;
  729. return smalltalk.withContext(function($ctx1) { return true;
  730. }, self, "isMetaclass", [], smalltalk.Metaclass)}
  731. }),
  732. smalltalk.Metaclass);
  733. smalltalk.addMethod(
  734. "_printString",
  735. smalltalk.method({
  736. selector: "printString",
  737. fn: function (){
  738. var self=this;
  739. return smalltalk.withContext(function($ctx1) { var $1;
  740. $1=_st(_st(_st(self)._instanceClass())._name()).__comma(" class");
  741. return $1;
  742. }, self, "printString", [], smalltalk.Metaclass)}
  743. }),
  744. smalltalk.Metaclass);
  745. smalltalk.addMethod(
  746. "_theMetaClass",
  747. smalltalk.method({
  748. selector: "theMetaClass",
  749. fn: function (){
  750. var self=this;
  751. return smalltalk.withContext(function($ctx1) { return self;
  752. }, self, "theMetaClass", [], smalltalk.Metaclass)}
  753. }),
  754. smalltalk.Metaclass);
  755. smalltalk.addMethod(
  756. "_theNonMetaClass",
  757. smalltalk.method({
  758. selector: "theNonMetaClass",
  759. fn: function (){
  760. var self=this;
  761. return smalltalk.withContext(function($ctx1) { var $1;
  762. $1=_st(self)._instanceClass();
  763. return $1;
  764. }, self, "theNonMetaClass", [], smalltalk.Metaclass)}
  765. }),
  766. smalltalk.Metaclass);
  767. smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel-Classes');
  768. smalltalk.addMethod(
  769. "_addSubclassOf_named_instanceVariableNames_",
  770. smalltalk.method({
  771. selector: "addSubclassOf:named:instanceVariableNames:",
  772. fn: function (aClass,aString,aCollection){
  773. var self=this;
  774. return smalltalk.withContext(function($ctx1) { smalltalk.addClass(aString, aClass, aCollection);
  775. return smalltalk[aString];
  776. ;
  777. return self}, self, "addSubclassOf:named:instanceVariableNames:", [aClass,aString,aCollection], smalltalk.ClassBuilder)}
  778. }),
  779. smalltalk.ClassBuilder);
  780. smalltalk.addMethod(
  781. "_addSubclassOf_named_instanceVariableNames_package_",
  782. smalltalk.method({
  783. selector: "addSubclassOf:named:instanceVariableNames:package:",
  784. fn: function (aClass,aString,aCollection,packageName){
  785. var self=this;
  786. return smalltalk.withContext(function($ctx1) { smalltalk.addClass(aString, aClass, aCollection, packageName);
  787. return smalltalk[aString];
  788. ;
  789. return self}, self, "addSubclassOf:named:instanceVariableNames:package:", [aClass,aString,aCollection,packageName], smalltalk.ClassBuilder)}
  790. }),
  791. smalltalk.ClassBuilder);
  792. smalltalk.addMethod(
  793. "_class_instanceVariableNames_",
  794. smalltalk.method({
  795. selector: "class:instanceVariableNames:",
  796. fn: function (aClass,aString){
  797. var self=this;
  798. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  799. $1=_st(aClass)._isMetaclass();
  800. if(! smalltalk.assert($1)){
  801. _st(self)._error_(_st(_st(aClass)._name()).__comma(" is not a metaclass"));
  802. };
  803. _st(aClass)._basicAt_put_("iVarNames",_st(self)._instanceVariableNamesFor_(aString));
  804. $2=_st((smalltalk.ClassDefinitionChanged || ClassDefinitionChanged))._new();
  805. _st($2)._theClass_(aClass);
  806. $3=_st($2)._yourself();
  807. _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._announce_($3);
  808. _st(self)._setupClass_(aClass);
  809. return self}, self, "class:instanceVariableNames:", [aClass,aString], smalltalk.ClassBuilder)}
  810. }),
  811. smalltalk.ClassBuilder);
  812. smalltalk.addMethod(
  813. "_copyClass_named_",
  814. smalltalk.method({
  815. selector: "copyClass:named:",
  816. fn: function (aClass,aString){
  817. var self=this;
  818. return smalltalk.withContext(function($ctx1) { $ctx1.newClass=nil;
  819. $ctx1.locals.newClass=_st(self)._addSubclassOf_named_instanceVariableNames_package_(_st(aClass)._superclass(),aString,_st(aClass)._instanceVariableNames(),_st(_st(aClass)._package())._name());
  820. _st(self)._setupClass_($ctx1.locals.newClass);
  821. _st(_st(_st(aClass)._methodDictionary())._values())._do_((function(each){
  822. return smalltalk.withContext(function($ctx2) { return _st(_st((smalltalk.Compiler || Compiler))._new())._install_forClass_category_(_st(each)._source(),$ctx1.locals.newClass,_st(each)._category());
  823. })}));
  824. _st(_st(_st(_st(aClass)._class())._methodDictionary())._values())._do_((function(each){
  825. return smalltalk.withContext(function($ctx2) { return _st(_st((smalltalk.Compiler || Compiler))._new())._install_forClass_category_(_st(each)._source(),_st($ctx1.locals.newClass)._class(),_st(each)._category());
  826. })}));
  827. _st(self)._setupClass_($ctx1.locals.newClass);
  828. return $ctx1.locals.newClass;
  829. }, self, "copyClass:named:", [aClass,aString], smalltalk.ClassBuilder)}
  830. }),
  831. smalltalk.ClassBuilder);
  832. smalltalk.addMethod(
  833. "_instanceVariableNamesFor_",
  834. smalltalk.method({
  835. selector: "instanceVariableNamesFor:",
  836. fn: function (aString){
  837. var self=this;
  838. return smalltalk.withContext(function($ctx1) { var $1;
  839. $1=_st(_st(aString)._tokenize_(" "))._reject_((function(each){
  840. return smalltalk.withContext(function($ctx2) { return _st(each)._isEmpty();
  841. })}));
  842. return $1;
  843. }, self, "instanceVariableNamesFor:", [aString], smalltalk.ClassBuilder)}
  844. }),
  845. smalltalk.ClassBuilder);
  846. smalltalk.addMethod(
  847. "_renameClass_to_",
  848. smalltalk.method({
  849. selector: "renameClass:to:",
  850. fn: function (aClass,aString){
  851. var self=this;
  852. return smalltalk.withContext(function($ctx1) { var $1,$2;
  853. smalltalk[aString] = aClass;
  854. delete smalltalk[aClass.className];
  855. aClass.className = aString;
  856. ;
  857. ;
  858. $1=_st((smalltalk.ClassRenamed || ClassRenamed))._new();
  859. _st($1)._theClass_(aClass);
  860. $2=_st($1)._yourself();
  861. _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._announce_($2);
  862. return self}, self, "renameClass:to:", [aClass,aString], smalltalk.ClassBuilder)}
  863. }),
  864. smalltalk.ClassBuilder);
  865. smalltalk.addMethod(
  866. "_setupClass_",
  867. smalltalk.method({
  868. selector: "setupClass:",
  869. fn: function (aClass){
  870. var self=this;
  871. return smalltalk.withContext(function($ctx1) { smalltalk.init(aClass);;
  872. ;
  873. return self}, self, "setupClass:", [aClass], smalltalk.ClassBuilder)}
  874. }),
  875. smalltalk.ClassBuilder);
  876. smalltalk.addMethod(
  877. "_superclass_subclass_",
  878. smalltalk.method({
  879. selector: "superclass:subclass:",
  880. fn: function (aClass,aString){
  881. var self=this;
  882. return smalltalk.withContext(function($ctx1) { var $1;
  883. $1=_st(self)._superclass_subclass_instanceVariableNames_package_(aClass,aString,"",nil);
  884. return $1;
  885. }, self, "superclass:subclass:", [aClass,aString], smalltalk.ClassBuilder)}
  886. }),
  887. smalltalk.ClassBuilder);
  888. smalltalk.addMethod(
  889. "_superclass_subclass_instanceVariableNames_package_",
  890. smalltalk.method({
  891. selector: "superclass:subclass:instanceVariableNames:package:",
  892. fn: function (aClass,aString,aString2,aString3){
  893. var self=this;
  894. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  895. $ctx1.newClass=nil;
  896. if(($receiver = aString3) == nil || $receiver == undefined){
  897. $1="unclassified";
  898. } else {
  899. $1=aString3;
  900. };
  901. $ctx1.locals.newClass=_st(self)._addSubclassOf_named_instanceVariableNames_package_(aClass,aString,_st(self)._instanceVariableNamesFor_(aString2),$1);
  902. _st(self)._setupClass_($ctx1.locals.newClass);
  903. $2=_st((smalltalk.ClassAdded || ClassAdded))._new();
  904. _st($2)._theClass_($ctx1.locals.newClass);
  905. $3=_st($2)._yourself();
  906. _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._announce_($3);
  907. return $ctx1.locals.newClass;
  908. }, self, "superclass:subclass:instanceVariableNames:package:", [aClass,aString,aString2,aString3], smalltalk.ClassBuilder)}
  909. }),
  910. smalltalk.ClassBuilder);
  911. smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel-Classes');
  912. smalltalk.addMethod(
  913. "_class_category_",
  914. smalltalk.method({
  915. selector: "class:category:",
  916. fn: function (aClass,aString){
  917. var self=this;
  918. return smalltalk.withContext(function($ctx1) { self["@class"]=aClass;
  919. self["@category"]=aString;
  920. return self}, self, "class:category:", [aClass,aString], smalltalk.ClassCategoryReader)}
  921. }),
  922. smalltalk.ClassCategoryReader);
  923. smalltalk.addMethod(
  924. "_compileMethod_",
  925. smalltalk.method({
  926. selector: "compileMethod:",
  927. fn: function (aString){
  928. var self=this;
  929. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.Compiler || Compiler))._new())._install_forClass_category_(aString,self["@class"],self["@category"]);
  930. return self}, self, "compileMethod:", [aString], smalltalk.ClassCategoryReader)}
  931. }),
  932. smalltalk.ClassCategoryReader);
  933. smalltalk.addMethod(
  934. "_initialize",
  935. smalltalk.method({
  936. selector: "initialize",
  937. fn: function (){
  938. var self=this;
  939. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  940. self["@chunkParser"]=_st((smalltalk.ChunkParser || ChunkParser))._new();
  941. return self}, self, "initialize", [], smalltalk.ClassCategoryReader)}
  942. }),
  943. smalltalk.ClassCategoryReader);
  944. smalltalk.addMethod(
  945. "_scanFrom_",
  946. smalltalk.method({
  947. selector: "scanFrom:",
  948. fn: function (aChunkParser){
  949. var self=this;
  950. return smalltalk.withContext(function($ctx1) { $ctx1.chunk=nil;
  951. _st((function(){
  952. return smalltalk.withContext(function($ctx2) { $ctx1.locals.chunk=_st(aChunkParser)._nextChunk();
  953. $ctx1.locals.chunk;
  954. return _st($ctx1.locals.chunk)._isEmpty();
  955. })}))._whileFalse_((function(){
  956. return smalltalk.withContext(function($ctx2) { return _st(self)._compileMethod_($ctx1.locals.chunk);
  957. })}));
  958. _st(_st((smalltalk.Compiler || Compiler))._new())._setupClass_(self["@class"]);
  959. return self}, self, "scanFrom:", [aChunkParser], smalltalk.ClassCategoryReader)}
  960. }),
  961. smalltalk.ClassCategoryReader);
  962. smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel-Classes');
  963. smalltalk.addMethod(
  964. "_class_",
  965. smalltalk.method({
  966. selector: "class:",
  967. fn: function (aClass){
  968. var self=this;
  969. return smalltalk.withContext(function($ctx1) { self["@class"]=aClass;
  970. return self}, self, "class:", [aClass], smalltalk.ClassCommentReader)}
  971. }),
  972. smalltalk.ClassCommentReader);
  973. smalltalk.addMethod(
  974. "_initialize",
  975. smalltalk.method({
  976. selector: "initialize",
  977. fn: function (){
  978. var self=this;
  979. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  980. self["@chunkParser"]=_st((smalltalk.ChunkParser || ChunkParser))._new();
  981. return self}, self, "initialize", [], smalltalk.ClassCommentReader)}
  982. }),
  983. smalltalk.ClassCommentReader);
  984. smalltalk.addMethod(
  985. "_scanFrom_",
  986. smalltalk.method({
  987. selector: "scanFrom:",
  988. fn: function (aChunkParser){
  989. var self=this;
  990. return smalltalk.withContext(function($ctx1) { var $1;
  991. $ctx1.chunk=nil;
  992. $ctx1.locals.chunk=_st(aChunkParser)._nextChunk();
  993. $1=_st($ctx1.locals.chunk)._isEmpty();
  994. if(! smalltalk.assert($1)){
  995. _st(self)._setComment_($ctx1.locals.chunk);
  996. };
  997. return self}, self, "scanFrom:", [aChunkParser], smalltalk.ClassCommentReader)}
  998. }),
  999. smalltalk.ClassCommentReader);
  1000. smalltalk.addMethod(
  1001. "_setComment_",
  1002. smalltalk.method({
  1003. selector: "setComment:",
  1004. fn: function (aString){
  1005. var self=this;
  1006. return smalltalk.withContext(function($ctx1) { _st(self["@class"])._comment_(aString);
  1007. return self}, self, "setComment:", [aString], smalltalk.ClassCommentReader)}
  1008. }),
  1009. smalltalk.ClassCommentReader);
  1010. smalltalk.addClass('ClassSorterNode', smalltalk.Object, ['theClass', 'level', 'nodes'], 'Kernel-Classes');
  1011. smalltalk.addMethod(
  1012. "_getNodesFrom_",
  1013. smalltalk.method({
  1014. selector: "getNodesFrom:",
  1015. fn: function (aCollection){
  1016. var self=this;
  1017. return smalltalk.withContext(function($ctx1) { var $1;
  1018. $ctx1.children=nil;
  1019. $ctx1.others=nil;
  1020. $ctx1.locals.children=[];
  1021. $ctx1.locals.others=[];
  1022. _st(aCollection)._do_((function(each){
  1023. return smalltalk.withContext(function($ctx2) { $1=_st(_st(each)._superclass()).__eq(_st(self)._theClass());
  1024. if(smalltalk.assert($1)){
  1025. return _st($ctx1.locals.children)._add_(each);
  1026. } else {
  1027. return _st($ctx1.locals.others)._add_(each);
  1028. };
  1029. })}));
  1030. self["@nodes"]=_st($ctx1.locals.children)._collect_((function(each){
  1031. return smalltalk.withContext(function($ctx2) { return _st((smalltalk.ClassSorterNode || ClassSorterNode))._on_classes_level_(each,$ctx1.locals.others,_st(_st(self)._level()).__plus((1)));
  1032. })}));
  1033. return self}, self, "getNodesFrom:", [aCollection], smalltalk.ClassSorterNode)}
  1034. }),
  1035. smalltalk.ClassSorterNode);
  1036. smalltalk.addMethod(
  1037. "_level",
  1038. smalltalk.method({
  1039. selector: "level",
  1040. fn: function (){
  1041. var self=this;
  1042. return smalltalk.withContext(function($ctx1) { return self["@level"];
  1043. }, self, "level", [], smalltalk.ClassSorterNode)}
  1044. }),
  1045. smalltalk.ClassSorterNode);
  1046. smalltalk.addMethod(
  1047. "_level_",
  1048. smalltalk.method({
  1049. selector: "level:",
  1050. fn: function (anInteger){
  1051. var self=this;
  1052. return smalltalk.withContext(function($ctx1) { self["@level"]=anInteger;
  1053. return self}, self, "level:", [anInteger], smalltalk.ClassSorterNode)}
  1054. }),
  1055. smalltalk.ClassSorterNode);
  1056. smalltalk.addMethod(
  1057. "_nodes",
  1058. smalltalk.method({
  1059. selector: "nodes",
  1060. fn: function (){
  1061. var self=this;
  1062. return smalltalk.withContext(function($ctx1) { return self["@nodes"];
  1063. }, self, "nodes", [], smalltalk.ClassSorterNode)}
  1064. }),
  1065. smalltalk.ClassSorterNode);
  1066. smalltalk.addMethod(
  1067. "_theClass",
  1068. smalltalk.method({
  1069. selector: "theClass",
  1070. fn: function (){
  1071. var self=this;
  1072. return smalltalk.withContext(function($ctx1) { return self["@theClass"];
  1073. }, self, "theClass", [], smalltalk.ClassSorterNode)}
  1074. }),
  1075. smalltalk.ClassSorterNode);
  1076. smalltalk.addMethod(
  1077. "_theClass_",
  1078. smalltalk.method({
  1079. selector: "theClass:",
  1080. fn: function (aClass){
  1081. var self=this;
  1082. return smalltalk.withContext(function($ctx1) { self["@theClass"]=aClass;
  1083. return self}, self, "theClass:", [aClass], smalltalk.ClassSorterNode)}
  1084. }),
  1085. smalltalk.ClassSorterNode);
  1086. smalltalk.addMethod(
  1087. "_traverseClassesWith_",
  1088. smalltalk.method({
  1089. selector: "traverseClassesWith:",
  1090. fn: function (aCollection){
  1091. var self=this;
  1092. return smalltalk.withContext(function($ctx1) { _st(aCollection)._add_(_st(self)._theClass());
  1093. _st(_st(_st(self)._nodes())._sorted_((function(a,b){
  1094. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(a)._theClass())._name()).__lt_eq(_st(_st(b)._theClass())._name());
  1095. })})))._do_((function(aNode){
  1096. return smalltalk.withContext(function($ctx2) { return _st(aNode)._traverseClassesWith_(aCollection);
  1097. })}));
  1098. return self}, self, "traverseClassesWith:", [aCollection], smalltalk.ClassSorterNode)}
  1099. }),
  1100. smalltalk.ClassSorterNode);
  1101. smalltalk.addMethod(
  1102. "_on_classes_level_",
  1103. smalltalk.method({
  1104. selector: "on:classes:level:",
  1105. fn: function (aClass,aCollection,anInteger){
  1106. var self=this;
  1107. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1108. $2=_st(self)._new();
  1109. _st($2)._theClass_(aClass);
  1110. _st($2)._level_(anInteger);
  1111. _st($2)._getNodesFrom_(aCollection);
  1112. $3=_st($2)._yourself();
  1113. $1=$3;
  1114. return $1;
  1115. }, self, "on:classes:level:", [aClass,aCollection,anInteger], smalltalk.ClassSorterNode.klass)}
  1116. }),
  1117. smalltalk.ClassSorterNode.klass);