Kernel-Classes.deploy.js 55 KB

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