Kernel-Classes.deploy.js 56 KB

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