Kernel-Classes.deploy.js 53 KB

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