Kernel-Classes.deploy.js 54 KB

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