Kernel-Classes.deploy.js 59 KB

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