Kernel-Classes.deploy.js 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441
  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. "_printOn_",
  652. smalltalk.method({
  653. selector: "printOn:",
  654. fn: function (aStream){
  655. var self=this;
  656. return smalltalk.withContext(function($ctx1) { _st(aStream)._nextPutAll_(_st(self)._name());
  657. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Class)})},
  658. messageSends: ["nextPutAll:", "name"]}),
  659. smalltalk.Class);
  660. smalltalk.addMethod(
  661. "_rename_",
  662. smalltalk.method({
  663. selector: "rename:",
  664. fn: function (aString){
  665. var self=this;
  666. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._renameClass_to_(self,aString);
  667. return self}, function($ctx1) {$ctx1.fill(self,"rename:",{aString:aString},smalltalk.Class)})},
  668. messageSends: ["renameClass:to:", "new"]}),
  669. smalltalk.Class);
  670. smalltalk.addMethod(
  671. "_subclass_instanceVariableNames_",
  672. smalltalk.method({
  673. selector: "subclass:instanceVariableNames:",
  674. fn: function (aString,anotherString){
  675. var self=this;
  676. return smalltalk.withContext(function($ctx1) { var $1;
  677. $1=_st(self)._subclass_instanceVariableNames_package_(aString,anotherString,nil);
  678. return $1;
  679. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString},smalltalk.Class)})},
  680. messageSends: ["subclass:instanceVariableNames:package:"]}),
  681. smalltalk.Class);
  682. smalltalk.addMethod(
  683. "_subclass_instanceVariableNames_category_",
  684. smalltalk.method({
  685. selector: "subclass:instanceVariableNames:category:",
  686. fn: function (aString,aString2,aString3){
  687. var self=this;
  688. return smalltalk.withContext(function($ctx1) { var $1;
  689. _st(self)._deprecatedAPI();
  690. $1=_st(self)._subclass_instanceVariableNames_package_(aString,aString2,aString3);
  691. return $1;
  692. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:category:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.Class)})},
  693. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"]}),
  694. smalltalk.Class);
  695. smalltalk.addMethod(
  696. "_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_",
  697. smalltalk.method({
  698. selector: "subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",
  699. fn: function (aString,aString2,classVars,pools,aString3){
  700. var self=this;
  701. return smalltalk.withContext(function($ctx1) { var $1;
  702. $1=_st(self)._subclass_instanceVariableNames_package_(aString,aString2,aString3);
  703. return $1;
  704. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",{aString:aString,aString2:aString2,classVars:classVars,pools:pools,aString3:aString3},smalltalk.Class)})},
  705. messageSends: ["subclass:instanceVariableNames:package:"]}),
  706. smalltalk.Class);
  707. smalltalk.addMethod(
  708. "_subclass_instanceVariableNames_package_",
  709. smalltalk.method({
  710. selector: "subclass:instanceVariableNames:package:",
  711. fn: function (aString,aString2,aString3){
  712. var self=this;
  713. return smalltalk.withContext(function($ctx1) { var $1;
  714. $1=_st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._superclass_subclass_instanceVariableNames_package_(self,_st(aString)._asString(),aString2,aString3);
  715. return $1;
  716. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.Class)})},
  717. messageSends: ["superclass:subclass:instanceVariableNames:package:", "asString", "new"]}),
  718. smalltalk.Class);
  719. smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel-Classes');
  720. smalltalk.addMethod(
  721. "_asJavascript",
  722. smalltalk.method({
  723. selector: "asJavascript",
  724. fn: function (){
  725. var self=this;
  726. return smalltalk.withContext(function($ctx1) { var $1;
  727. $1=_st(_st("smalltalk.").__comma(_st(_st(self)._instanceClass())._name())).__comma(".klass");
  728. return $1;
  729. }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Metaclass)})},
  730. messageSends: [",", "name", "instanceClass"]}),
  731. smalltalk.Metaclass);
  732. smalltalk.addMethod(
  733. "_definition",
  734. smalltalk.method({
  735. selector: "definition",
  736. fn: function (){
  737. var self=this;
  738. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  739. $1=_st((smalltalk.String || String))._streamContents_((function(stream){
  740. return smalltalk.withContext(function($ctx2) { $2=stream;
  741. _st($2)._nextPutAll_(_st(self)._asString());
  742. _st($2)._nextPutAll_(" class ");
  743. $3=_st($2)._nextPutAll_("instanceVariableNames: '");
  744. $3;
  745. _st(_st(self)._instanceVariableNames())._do_separatedBy_((function(each){
  746. return smalltalk.withContext(function($ctx3) { return _st(stream)._nextPutAll_(each);
  747. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}),(function(){
  748. return smalltalk.withContext(function($ctx3) { return _st(stream)._nextPutAll_(" ");
  749. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  750. return _st(stream)._nextPutAll_("'");
  751. }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})}));
  752. return $1;
  753. }, function($ctx1) {$ctx1.fill(self,"definition",{},smalltalk.Metaclass)})},
  754. messageSends: ["streamContents:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames"]}),
  755. smalltalk.Metaclass);
  756. smalltalk.addMethod(
  757. "_instanceClass",
  758. smalltalk.method({
  759. selector: "instanceClass",
  760. fn: function (){
  761. var self=this;
  762. return smalltalk.withContext(function($ctx1) { return self.instanceClass;
  763. return self}, function($ctx1) {$ctx1.fill(self,"instanceClass",{},smalltalk.Metaclass)})},
  764. messageSends: []}),
  765. smalltalk.Metaclass);
  766. smalltalk.addMethod(
  767. "_instanceVariableNames_",
  768. smalltalk.method({
  769. selector: "instanceVariableNames:",
  770. fn: function (aCollection){
  771. var self=this;
  772. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._class_instanceVariableNames_(self,aCollection);
  773. return self}, function($ctx1) {$ctx1.fill(self,"instanceVariableNames:",{aCollection:aCollection},smalltalk.Metaclass)})},
  774. messageSends: ["class:instanceVariableNames:", "new"]}),
  775. smalltalk.Metaclass);
  776. smalltalk.addMethod(
  777. "_isMetaclass",
  778. smalltalk.method({
  779. selector: "isMetaclass",
  780. fn: function (){
  781. var self=this;
  782. return smalltalk.withContext(function($ctx1) { return true;
  783. }, function($ctx1) {$ctx1.fill(self,"isMetaclass",{},smalltalk.Metaclass)})},
  784. messageSends: []}),
  785. smalltalk.Metaclass);
  786. smalltalk.addMethod(
  787. "_printOn_",
  788. smalltalk.method({
  789. selector: "printOn:",
  790. fn: function (aStream){
  791. var self=this;
  792. return smalltalk.withContext(function($ctx1) { var $1,$2;
  793. $1=aStream;
  794. _st($1)._nextPutAll_(_st(_st(self)._instanceClass())._name());
  795. $2=_st($1)._nextPutAll_(" class");
  796. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Metaclass)})},
  797. messageSends: ["nextPutAll:", "name", "instanceClass"]}),
  798. smalltalk.Metaclass);
  799. smalltalk.addMethod(
  800. "_theMetaClass",
  801. smalltalk.method({
  802. selector: "theMetaClass",
  803. fn: function (){
  804. var self=this;
  805. return smalltalk.withContext(function($ctx1) { var $1;
  806. $1=self;
  807. return $1;
  808. }, function($ctx1) {$ctx1.fill(self,"theMetaClass",{},smalltalk.Metaclass)})},
  809. messageSends: []}),
  810. smalltalk.Metaclass);
  811. smalltalk.addMethod(
  812. "_theNonMetaClass",
  813. smalltalk.method({
  814. selector: "theNonMetaClass",
  815. fn: function (){
  816. var self=this;
  817. return smalltalk.withContext(function($ctx1) { var $1;
  818. $1=_st(self)._instanceClass();
  819. return $1;
  820. }, function($ctx1) {$ctx1.fill(self,"theNonMetaClass",{},smalltalk.Metaclass)})},
  821. messageSends: ["instanceClass"]}),
  822. smalltalk.Metaclass);
  823. smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel-Classes');
  824. smalltalk.addMethod(
  825. "_addSubclassOf_named_instanceVariableNames_package_",
  826. smalltalk.method({
  827. selector: "addSubclassOf:named:instanceVariableNames:package:",
  828. fn: function (aClass,aString,aCollection,packageName){
  829. var self=this;
  830. var theClass;
  831. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  832. theClass=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(aString);
  833. $1=theClass;
  834. if(($receiver = $1) == nil || $receiver == undefined){
  835. $1;
  836. } else {
  837. $2=_st(_st(theClass)._superclass()).__eq_eq(aClass);
  838. if(! smalltalk.assert($2)){
  839. $3=_st(self)._migrateClassNamed_superclass_instanceVariableNames_package_(aString,aClass,aCollection,packageName);
  840. return $3;
  841. };
  842. };
  843. $4=_st(self)._basicAddSubclassOf_named_instanceVariableNames_package_(aClass,aString,aCollection,packageName);
  844. return $4;
  845. }, function($ctx1) {$ctx1.fill(self,"addSubclassOf:named:instanceVariableNames:package:",{aClass:aClass,aString:aString,aCollection:aCollection,packageName:packageName,theClass:theClass},smalltalk.ClassBuilder)})},
  846. messageSends: ["at:", "current", "ifNotNil:", "ifFalse:", "migrateClassNamed:superclass:instanceVariableNames:package:", "==", "superclass", "basicAddSubclassOf:named:instanceVariableNames:package:"]}),
  847. smalltalk.ClassBuilder);
  848. smalltalk.addMethod(
  849. "_basicAddSubclassOf_named_instanceVariableNames_package_",
  850. smalltalk.method({
  851. selector: "basicAddSubclassOf:named:instanceVariableNames:package:",
  852. fn: function (aClass,aString,aCollection,packageName){
  853. var self=this;
  854. return smalltalk.withContext(function($ctx1) {
  855. smalltalk.addClass(aString, aClass, aCollection, packageName);
  856. return smalltalk[aString]
  857. ;
  858. return self}, function($ctx1) {$ctx1.fill(self,"basicAddSubclassOf:named:instanceVariableNames:package:",{aClass:aClass,aString:aString,aCollection:aCollection,packageName:packageName},smalltalk.ClassBuilder)})},
  859. messageSends: []}),
  860. smalltalk.ClassBuilder);
  861. smalltalk.addMethod(
  862. "_basicClass_instanceVariableNames_",
  863. smalltalk.method({
  864. selector: "basicClass:instanceVariableNames:",
  865. fn: function (aClass,aString){
  866. var self=this;
  867. return smalltalk.withContext(function($ctx1) { _st(self)._basicClass_instanceVariables_(aClass,_st(self)._instanceVariableNamesFor_(aString));
  868. return self}, function($ctx1) {$ctx1.fill(self,"basicClass:instanceVariableNames:",{aClass:aClass,aString:aString},smalltalk.ClassBuilder)})},
  869. messageSends: ["basicClass:instanceVariables:", "instanceVariableNamesFor:"]}),
  870. smalltalk.ClassBuilder);
  871. smalltalk.addMethod(
  872. "_basicClass_instanceVariables_",
  873. smalltalk.method({
  874. selector: "basicClass:instanceVariables:",
  875. fn: function (aClass,aCollection){
  876. var self=this;
  877. return smalltalk.withContext(function($ctx1) { var $1;
  878. $1=_st(aClass)._isMetaclass();
  879. if(! smalltalk.assert($1)){
  880. _st(self)._error_(_st(_st(aClass)._name()).__comma(" is not a metaclass"));
  881. };
  882. _st(aClass)._basicAt_put_("iVarNames",aCollection);
  883. return self}, function($ctx1) {$ctx1.fill(self,"basicClass:instanceVariables:",{aClass:aClass,aCollection:aCollection},smalltalk.ClassBuilder)})},
  884. messageSends: ["ifFalse:", "error:", ",", "name", "isMetaclass", "basicAt:put:"]}),
  885. smalltalk.ClassBuilder);
  886. smalltalk.addMethod(
  887. "_basicRemoveClass_",
  888. smalltalk.method({
  889. selector: "basicRemoveClass:",
  890. fn: function (aClass){
  891. var self=this;
  892. return smalltalk.withContext(function($ctx1) { smalltalk.removeClass(aClass);
  893. return self}, function($ctx1) {$ctx1.fill(self,"basicRemoveClass:",{aClass:aClass},smalltalk.ClassBuilder)})},
  894. messageSends: []}),
  895. smalltalk.ClassBuilder);
  896. smalltalk.addMethod(
  897. "_basicRenameClass_to_",
  898. smalltalk.method({
  899. selector: "basicRenameClass:to:",
  900. fn: function (aClass,aString){
  901. var self=this;
  902. return smalltalk.withContext(function($ctx1) {
  903. smalltalk[aString] = aClass;
  904. delete smalltalk[aClass.className];
  905. aClass.className = aString;
  906. ;
  907. return self}, function($ctx1) {$ctx1.fill(self,"basicRenameClass:to:",{aClass:aClass,aString:aString},smalltalk.ClassBuilder)})},
  908. messageSends: []}),
  909. smalltalk.ClassBuilder);
  910. smalltalk.addMethod(
  911. "_basicSwapClassNames_with_",
  912. smalltalk.method({
  913. selector: "basicSwapClassNames:with:",
  914. fn: function (aClass,anotherClass){
  915. var self=this;
  916. return smalltalk.withContext(function($ctx1) {
  917. var tmp = aClass.className;
  918. aClass.className = anotherClass.className;
  919. anotherClass.className = tmp;
  920. ;
  921. return self}, function($ctx1) {$ctx1.fill(self,"basicSwapClassNames:with:",{aClass:aClass,anotherClass:anotherClass},smalltalk.ClassBuilder)})},
  922. messageSends: []}),
  923. smalltalk.ClassBuilder);
  924. smalltalk.addMethod(
  925. "_class_instanceVariableNames_",
  926. smalltalk.method({
  927. selector: "class:instanceVariableNames:",
  928. fn: function (aClass,aString){
  929. var self=this;
  930. return smalltalk.withContext(function($ctx1) { var $1,$2;
  931. _st(self)._basicClass_instanceVariableNames_(aClass,aString);
  932. _st(self)._setupClass_(aClass);
  933. $1=_st((smalltalk.ClassDefinitionChanged || ClassDefinitionChanged))._new();
  934. _st($1)._theClass_(aClass);
  935. $2=_st($1)._yourself();
  936. _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._announce_($2);
  937. return self}, function($ctx1) {$ctx1.fill(self,"class:instanceVariableNames:",{aClass:aClass,aString:aString},smalltalk.ClassBuilder)})},
  938. messageSends: ["basicClass:instanceVariableNames:", "setupClass:", "announce:", "theClass:", "new", "yourself", "current"]}),
  939. smalltalk.ClassBuilder);
  940. smalltalk.addMethod(
  941. "_copyClass_named_",
  942. smalltalk.method({
  943. selector: "copyClass:named:",
  944. fn: function (aClass,aString){
  945. var self=this;
  946. var newClass;
  947. return smalltalk.withContext(function($ctx1) { var $1;
  948. newClass=_st(self)._addSubclassOf_named_instanceVariableNames_package_(_st(aClass)._superclass(),aString,_st(aClass)._instanceVariableNames(),_st(_st(aClass)._package())._name());
  949. _st(self)._copyClass_to_(aClass,newClass);
  950. $1=newClass;
  951. return $1;
  952. }, function($ctx1) {$ctx1.fill(self,"copyClass:named:",{aClass:aClass,aString:aString,newClass:newClass},smalltalk.ClassBuilder)})},
  953. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "instanceVariableNames", "name", "package", "copyClass:to:"]}),
  954. smalltalk.ClassBuilder);
  955. smalltalk.addMethod(
  956. "_copyClass_to_",
  957. smalltalk.method({
  958. selector: "copyClass:to:",
  959. fn: function (aClass,anotherClass){
  960. var self=this;
  961. return smalltalk.withContext(function($ctx1) { _st(anotherClass)._comment_(_st(aClass)._comment());
  962. _st(_st(_st(aClass)._methodDictionary())._values())._do_((function(each){
  963. return smalltalk.withContext(function($ctx2) { return _st(_st((smalltalk.Compiler || Compiler))._new())._install_forClass_category_(_st(each)._source(),anotherClass,_st(each)._category());
  964. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  965. _st(self)._basicClass_instanceVariables_(_st(anotherClass)._class(),_st(_st(aClass)._class())._instanceVariableNames());
  966. _st(_st(_st(_st(aClass)._class())._methodDictionary())._values())._do_((function(each){
  967. return smalltalk.withContext(function($ctx2) { return _st(_st((smalltalk.Compiler || Compiler))._new())._install_forClass_category_(_st(each)._source(),_st(anotherClass)._class(),_st(each)._category());
  968. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  969. _st(self)._setupClass_(anotherClass);
  970. return self}, function($ctx1) {$ctx1.fill(self,"copyClass:to:",{aClass:aClass,anotherClass:anotherClass},smalltalk.ClassBuilder)})},
  971. messageSends: ["comment:", "comment", "do:", "install:forClass:category:", "source", "category", "new", "values", "methodDictionary", "basicClass:instanceVariables:", "class", "instanceVariableNames", "setupClass:"]}),
  972. smalltalk.ClassBuilder);
  973. smalltalk.addMethod(
  974. "_installMethod_forClass_category_",
  975. smalltalk.method({
  976. selector: "installMethod:forClass:category:",
  977. fn: function (aCompiledMethod,aBehavior,aString){
  978. var self=this;
  979. return smalltalk.withContext(function($ctx1) { var $1;
  980. _st(aCompiledMethod)._category_(aString);
  981. _st(aBehavior)._addCompiledMethod_(aCompiledMethod);
  982. _st(self)._setupClass_(aBehavior);
  983. $1=aCompiledMethod;
  984. return $1;
  985. }, function($ctx1) {$ctx1.fill(self,"installMethod:forClass:category:",{aCompiledMethod:aCompiledMethod,aBehavior:aBehavior,aString:aString},smalltalk.ClassBuilder)})},
  986. messageSends: ["category:", "addCompiledMethod:", "setupClass:"]}),
  987. smalltalk.ClassBuilder);
  988. smalltalk.addMethod(
  989. "_instanceVariableNamesFor_",
  990. smalltalk.method({
  991. selector: "instanceVariableNamesFor:",
  992. fn: function (aString){
  993. var self=this;
  994. return smalltalk.withContext(function($ctx1) { var $1;
  995. $1=_st(_st(aString)._tokenize_(" "))._reject_((function(each){
  996. return smalltalk.withContext(function($ctx2) { return _st(each)._isEmpty();
  997. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  998. return $1;
  999. }, function($ctx1) {$ctx1.fill(self,"instanceVariableNamesFor:",{aString:aString},smalltalk.ClassBuilder)})},
  1000. messageSends: ["reject:", "isEmpty", "tokenize:"]}),
  1001. smalltalk.ClassBuilder);
  1002. smalltalk.addMethod(
  1003. "_migrateClass_superclass_",
  1004. smalltalk.method({
  1005. selector: "migrateClass:superclass:",
  1006. fn: function (aClass,anotherClass){
  1007. var self=this;
  1008. return smalltalk.withContext(function($ctx1) { _st(console)._log_(_st(aClass)._name());
  1009. _st(self)._migrateClassNamed_superclass_instanceVariableNames_package_(_st(aClass)._name(),anotherClass,_st(aClass)._instanceVariableNames(),_st(_st(aClass)._package())._name());
  1010. return self}, function($ctx1) {$ctx1.fill(self,"migrateClass:superclass:",{aClass:aClass,anotherClass:anotherClass},smalltalk.ClassBuilder)})},
  1011. messageSends: ["log:", "name", "migrateClassNamed:superclass:instanceVariableNames:package:", "instanceVariableNames", "package"]}),
  1012. smalltalk.ClassBuilder);
  1013. smalltalk.addMethod(
  1014. "_migrateClassNamed_superclass_instanceVariableNames_package_",
  1015. smalltalk.method({
  1016. selector: "migrateClassNamed:superclass:instanceVariableNames:package:",
  1017. fn: function (aString,aClass,aCollection,packageName){
  1018. var self=this;
  1019. var oldClass,newClass,tmp;
  1020. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  1021. tmp=_st("new*").__comma(aString);
  1022. oldClass=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(aString);
  1023. newClass=_st(self)._addSubclassOf_named_instanceVariableNames_package_(aClass,tmp,aCollection,packageName);
  1024. _st(self)._basicSwapClassNames_with_(oldClass,newClass);
  1025. _st((function(){
  1026. return smalltalk.withContext(function($ctx2) { return _st(self)._copyClass_to_(oldClass,newClass);
  1027. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_((smalltalk.Error || Error),(function(exception){
  1028. return smalltalk.withContext(function($ctx2) { $1=self;
  1029. _st($1)._basicSwapClassNames_with_(oldClass,newClass);
  1030. $2=_st($1)._basicRemoveClass_(newClass);
  1031. $2;
  1032. return _st(exception)._signal();
  1033. }, function($ctx2) {$ctx2.fillBlock({exception:exception},$ctx1)})}));
  1034. $3=self;
  1035. _st($3)._rawRenameClass_to_(oldClass,tmp);
  1036. $4=_st($3)._rawRenameClass_to_(newClass,aString);
  1037. _st(_st(oldClass)._subclasses())._do_((function(each){
  1038. return smalltalk.withContext(function($ctx2) { return _st(self)._migrateClass_superclass_(each,newClass);
  1039. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1040. _st(self)._basicRemoveClass_(oldClass);
  1041. $5=newClass;
  1042. return $5;
  1043. }, 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)})},
  1044. messageSends: [",", "at:", "current", "addSubclassOf:named:instanceVariableNames:package:", "basicSwapClassNames:with:", "on:do:", "basicRemoveClass:", "signal", "copyClass:to:", "rawRenameClass:to:", "do:", "migrateClass:superclass:", "subclasses"]}),
  1045. smalltalk.ClassBuilder);
  1046. smalltalk.addMethod(
  1047. "_rawRenameClass_to_",
  1048. smalltalk.method({
  1049. selector: "rawRenameClass:to:",
  1050. fn: function (aClass,aString){
  1051. var self=this;
  1052. return smalltalk.withContext(function($ctx1) {
  1053. smalltalk[aString] = aClass;
  1054. ;
  1055. return self}, function($ctx1) {$ctx1.fill(self,"rawRenameClass:to:",{aClass:aClass,aString:aString},smalltalk.ClassBuilder)})},
  1056. messageSends: []}),
  1057. smalltalk.ClassBuilder);
  1058. smalltalk.addMethod(
  1059. "_renameClass_to_",
  1060. smalltalk.method({
  1061. selector: "renameClass:to:",
  1062. fn: function (aClass,aString){
  1063. var self=this;
  1064. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1065. _st(self)._basicRenameClass_to_(aClass,aString);
  1066. $1=_st((smalltalk.ClassRenamed || ClassRenamed))._new();
  1067. _st($1)._theClass_(aClass);
  1068. $2=_st($1)._yourself();
  1069. _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._announce_($2);
  1070. return self}, function($ctx1) {$ctx1.fill(self,"renameClass:to:",{aClass:aClass,aString:aString},smalltalk.ClassBuilder)})},
  1071. messageSends: ["basicRenameClass:to:", "announce:", "theClass:", "new", "yourself", "current"]}),
  1072. smalltalk.ClassBuilder);
  1073. smalltalk.addMethod(
  1074. "_setupClass_",
  1075. smalltalk.method({
  1076. selector: "setupClass:",
  1077. fn: function (aClass){
  1078. var self=this;
  1079. return smalltalk.withContext(function($ctx1) { smalltalk.init(aClass);;
  1080. return self}, function($ctx1) {$ctx1.fill(self,"setupClass:",{aClass:aClass},smalltalk.ClassBuilder)})},
  1081. messageSends: []}),
  1082. smalltalk.ClassBuilder);
  1083. smalltalk.addMethod(
  1084. "_superclass_subclass_",
  1085. smalltalk.method({
  1086. selector: "superclass:subclass:",
  1087. fn: function (aClass,aString){
  1088. var self=this;
  1089. return smalltalk.withContext(function($ctx1) { var $1;
  1090. $1=_st(self)._superclass_subclass_instanceVariableNames_package_(aClass,aString,"",nil);
  1091. return $1;
  1092. }, function($ctx1) {$ctx1.fill(self,"superclass:subclass:",{aClass:aClass,aString:aString},smalltalk.ClassBuilder)})},
  1093. messageSends: ["superclass:subclass:instanceVariableNames:package:"]}),
  1094. smalltalk.ClassBuilder);
  1095. smalltalk.addMethod(
  1096. "_superclass_subclass_instanceVariableNames_package_",
  1097. smalltalk.method({
  1098. selector: "superclass:subclass:instanceVariableNames:package:",
  1099. fn: function (aClass,aString,aString2,aString3){
  1100. var self=this;
  1101. var newClass;
  1102. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$6,$5,$7,$8,$9;
  1103. $1=self;
  1104. $2=aClass;
  1105. $3=aString;
  1106. $4=_st(self)._instanceVariableNamesFor_(aString2);
  1107. $6=aString3;
  1108. if(($receiver = $6) == nil || $receiver == undefined){
  1109. $5="unclassified";
  1110. } else {
  1111. $5=$6;
  1112. };
  1113. newClass=_st($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$4,$5);
  1114. _st(self)._setupClass_(newClass);
  1115. $7=_st((smalltalk.ClassAdded || ClassAdded))._new();
  1116. _st($7)._theClass_(newClass);
  1117. $8=_st($7)._yourself();
  1118. _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._announce_($8);
  1119. $9=newClass;
  1120. return $9;
  1121. }, function($ctx1) {$ctx1.fill(self,"superclass:subclass:instanceVariableNames:package:",{aClass:aClass,aString:aString,aString2:aString2,aString3:aString3,newClass:newClass},smalltalk.ClassBuilder)})},
  1122. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "instanceVariableNamesFor:", "ifNil:", "setupClass:", "announce:", "theClass:", "new", "yourself", "current"]}),
  1123. smalltalk.ClassBuilder);
  1124. smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category'], 'Kernel-Classes');
  1125. smalltalk.addMethod(
  1126. "_class_category_",
  1127. smalltalk.method({
  1128. selector: "class:category:",
  1129. fn: function (aClass,aString){
  1130. var self=this;
  1131. return smalltalk.withContext(function($ctx1) { self["@class"]=aClass;
  1132. self["@category"]=aString;
  1133. return self}, function($ctx1) {$ctx1.fill(self,"class:category:",{aClass:aClass,aString:aString},smalltalk.ClassCategoryReader)})},
  1134. messageSends: []}),
  1135. smalltalk.ClassCategoryReader);
  1136. smalltalk.addMethod(
  1137. "_compileMethod_",
  1138. smalltalk.method({
  1139. selector: "compileMethod:",
  1140. fn: function (aString){
  1141. var self=this;
  1142. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.Compiler || Compiler))._new())._install_forClass_category_(aString,self["@class"],self["@category"]);
  1143. return self}, function($ctx1) {$ctx1.fill(self,"compileMethod:",{aString:aString},smalltalk.ClassCategoryReader)})},
  1144. messageSends: ["install:forClass:category:", "new"]}),
  1145. smalltalk.ClassCategoryReader);
  1146. smalltalk.addMethod(
  1147. "_initialize",
  1148. smalltalk.method({
  1149. selector: "initialize",
  1150. fn: function (){
  1151. var self=this;
  1152. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  1153. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ClassCategoryReader)})},
  1154. messageSends: ["initialize"]}),
  1155. smalltalk.ClassCategoryReader);
  1156. smalltalk.addMethod(
  1157. "_scanFrom_",
  1158. smalltalk.method({
  1159. selector: "scanFrom:",
  1160. fn: function (aChunkParser){
  1161. var self=this;
  1162. var chunk;
  1163. return smalltalk.withContext(function($ctx1) { _st((function(){
  1164. return smalltalk.withContext(function($ctx2) { chunk=_st(aChunkParser)._nextChunk();
  1165. chunk;
  1166. return _st(chunk)._isEmpty();
  1167. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
  1168. return smalltalk.withContext(function($ctx2) { return _st(self)._compileMethod_(chunk);
  1169. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1170. _st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._setupClass_(self["@class"]);
  1171. return self}, function($ctx1) {$ctx1.fill(self,"scanFrom:",{aChunkParser:aChunkParser,chunk:chunk},smalltalk.ClassCategoryReader)})},
  1172. messageSends: ["whileFalse:", "compileMethod:", "nextChunk", "isEmpty", "setupClass:", "new"]}),
  1173. smalltalk.ClassCategoryReader);
  1174. smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class'], 'Kernel-Classes');
  1175. smalltalk.addMethod(
  1176. "_class_",
  1177. smalltalk.method({
  1178. selector: "class:",
  1179. fn: function (aClass){
  1180. var self=this;
  1181. return smalltalk.withContext(function($ctx1) { self["@class"]=aClass;
  1182. return self}, function($ctx1) {$ctx1.fill(self,"class:",{aClass:aClass},smalltalk.ClassCommentReader)})},
  1183. messageSends: []}),
  1184. smalltalk.ClassCommentReader);
  1185. smalltalk.addMethod(
  1186. "_initialize",
  1187. smalltalk.method({
  1188. selector: "initialize",
  1189. fn: function (){
  1190. var self=this;
  1191. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  1192. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ClassCommentReader)})},
  1193. messageSends: ["initialize"]}),
  1194. smalltalk.ClassCommentReader);
  1195. smalltalk.addMethod(
  1196. "_scanFrom_",
  1197. smalltalk.method({
  1198. selector: "scanFrom:",
  1199. fn: function (aChunkParser){
  1200. var self=this;
  1201. var chunk;
  1202. return smalltalk.withContext(function($ctx1) { var $1;
  1203. chunk=_st(aChunkParser)._nextChunk();
  1204. $1=_st(chunk)._isEmpty();
  1205. if(! smalltalk.assert($1)){
  1206. _st(self)._setComment_(chunk);
  1207. };
  1208. return self}, function($ctx1) {$ctx1.fill(self,"scanFrom:",{aChunkParser:aChunkParser,chunk:chunk},smalltalk.ClassCommentReader)})},
  1209. messageSends: ["nextChunk", "ifFalse:", "setComment:", "isEmpty"]}),
  1210. smalltalk.ClassCommentReader);
  1211. smalltalk.addMethod(
  1212. "_setComment_",
  1213. smalltalk.method({
  1214. selector: "setComment:",
  1215. fn: function (aString){
  1216. var self=this;
  1217. return smalltalk.withContext(function($ctx1) { _st(self["@class"])._comment_(aString);
  1218. return self}, function($ctx1) {$ctx1.fill(self,"setComment:",{aString:aString},smalltalk.ClassCommentReader)})},
  1219. messageSends: ["comment:"]}),
  1220. smalltalk.ClassCommentReader);
  1221. smalltalk.addClass('ClassSorterNode', smalltalk.Object, ['theClass', 'level', 'nodes'], 'Kernel-Classes');
  1222. smalltalk.addMethod(
  1223. "_getNodesFrom_",
  1224. smalltalk.method({
  1225. selector: "getNodesFrom:",
  1226. fn: function (aCollection){
  1227. var self=this;
  1228. var children,others;
  1229. return smalltalk.withContext(function($ctx1) { var $1;
  1230. children=[];
  1231. others=[];
  1232. _st(aCollection)._do_((function(each){
  1233. return smalltalk.withContext(function($ctx2) { $1=_st(_st(each)._superclass()).__eq(_st(self)._theClass());
  1234. if(smalltalk.assert($1)){
  1235. return _st(children)._add_(each);
  1236. } else {
  1237. return _st(others)._add_(each);
  1238. };
  1239. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1240. self["@nodes"]=_st(children)._collect_((function(each){
  1241. return smalltalk.withContext(function($ctx2) { return _st((smalltalk.ClassSorterNode || ClassSorterNode))._on_classes_level_(each,others,_st(_st(self)._level()).__plus((1)));
  1242. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1243. return self}, function($ctx1) {$ctx1.fill(self,"getNodesFrom:",{aCollection:aCollection,children:children,others:others},smalltalk.ClassSorterNode)})},
  1244. messageSends: ["do:", "ifTrue:ifFalse:", "add:", "=", "theClass", "superclass", "collect:", "on:classes:level:", "+", "level"]}),
  1245. smalltalk.ClassSorterNode);
  1246. smalltalk.addMethod(
  1247. "_level",
  1248. smalltalk.method({
  1249. selector: "level",
  1250. fn: function (){
  1251. var self=this;
  1252. return smalltalk.withContext(function($ctx1) { var $1;
  1253. $1=self["@level"];
  1254. return $1;
  1255. }, function($ctx1) {$ctx1.fill(self,"level",{},smalltalk.ClassSorterNode)})},
  1256. messageSends: []}),
  1257. smalltalk.ClassSorterNode);
  1258. smalltalk.addMethod(
  1259. "_level_",
  1260. smalltalk.method({
  1261. selector: "level:",
  1262. fn: function (anInteger){
  1263. var self=this;
  1264. return smalltalk.withContext(function($ctx1) { self["@level"]=anInteger;
  1265. return self}, function($ctx1) {$ctx1.fill(self,"level:",{anInteger:anInteger},smalltalk.ClassSorterNode)})},
  1266. messageSends: []}),
  1267. smalltalk.ClassSorterNode);
  1268. smalltalk.addMethod(
  1269. "_nodes",
  1270. smalltalk.method({
  1271. selector: "nodes",
  1272. fn: function (){
  1273. var self=this;
  1274. return smalltalk.withContext(function($ctx1) { var $1;
  1275. $1=self["@nodes"];
  1276. return $1;
  1277. }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.ClassSorterNode)})},
  1278. messageSends: []}),
  1279. smalltalk.ClassSorterNode);
  1280. smalltalk.addMethod(
  1281. "_theClass",
  1282. smalltalk.method({
  1283. selector: "theClass",
  1284. fn: function (){
  1285. var self=this;
  1286. return smalltalk.withContext(function($ctx1) { var $1;
  1287. $1=self["@theClass"];
  1288. return $1;
  1289. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassSorterNode)})},
  1290. messageSends: []}),
  1291. smalltalk.ClassSorterNode);
  1292. smalltalk.addMethod(
  1293. "_theClass_",
  1294. smalltalk.method({
  1295. selector: "theClass:",
  1296. fn: function (aClass){
  1297. var self=this;
  1298. return smalltalk.withContext(function($ctx1) { self["@theClass"]=aClass;
  1299. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ClassSorterNode)})},
  1300. messageSends: []}),
  1301. smalltalk.ClassSorterNode);
  1302. smalltalk.addMethod(
  1303. "_traverseClassesWith_",
  1304. smalltalk.method({
  1305. selector: "traverseClassesWith:",
  1306. fn: function (aCollection){
  1307. var self=this;
  1308. return smalltalk.withContext(function($ctx1) { _st(aCollection)._add_(_st(self)._theClass());
  1309. _st(_st(_st(self)._nodes())._sorted_((function(a,b){
  1310. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(a)._theClass())._name()).__lt_eq(_st(_st(b)._theClass())._name());
  1311. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})})))._do_((function(aNode){
  1312. return smalltalk.withContext(function($ctx2) { return _st(aNode)._traverseClassesWith_(aCollection);
  1313. }, function($ctx2) {$ctx2.fillBlock({aNode:aNode},$ctx1)})}));
  1314. return self}, function($ctx1) {$ctx1.fill(self,"traverseClassesWith:",{aCollection:aCollection},smalltalk.ClassSorterNode)})},
  1315. messageSends: ["add:", "theClass", "do:", "traverseClassesWith:", "sorted:", "<=", "name", "nodes"]}),
  1316. smalltalk.ClassSorterNode);
  1317. smalltalk.addMethod(
  1318. "_on_classes_level_",
  1319. smalltalk.method({
  1320. selector: "on:classes:level:",
  1321. fn: function (aClass,aCollection,anInteger){
  1322. var self=this;
  1323. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1324. $2=_st(self)._new();
  1325. _st($2)._theClass_(aClass);
  1326. _st($2)._level_(anInteger);
  1327. _st($2)._getNodesFrom_(aCollection);
  1328. $3=_st($2)._yourself();
  1329. $1=$3;
  1330. return $1;
  1331. }, function($ctx1) {$ctx1.fill(self,"on:classes:level:",{aClass:aClass,aCollection:aCollection,anInteger:anInteger},smalltalk.ClassSorterNode.klass)})},
  1332. messageSends: ["theClass:", "new", "level:", "getNodesFrom:", "yourself"]}),
  1333. smalltalk.ClassSorterNode.klass);