Kernel-Classes.deploy.js 56 KB

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