Kernel-Classes.deploy.js 57 KB

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