Kernel-Classes.deploy.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. smalltalk.addPackage('Kernel-Classes', {});
  2. smalltalk.addClass('Behavior', smalltalk.Object, [], 'Kernel-Classes');
  3. smalltalk.addMethod(
  4. unescape('_addCompiledMethod_'),
  5. smalltalk.method({
  6. selector: unescape('addCompiledMethod%3A'),
  7. fn: function (aMethod){
  8. var self=this;
  9. smalltalk.addMethod(aMethod.selector._asSelector(), aMethod, self);
  10. return self;}
  11. }),
  12. smalltalk.Behavior);
  13. smalltalk.addMethod(
  14. unescape('_allInstanceVariableNames'),
  15. smalltalk.method({
  16. selector: unescape('allInstanceVariableNames'),
  17. fn: function (){
  18. var self=this;
  19. var result=nil;
  20. (result=smalltalk.send(smalltalk.send(self, "_instanceVariableNames", []), "_copy", []));
  21. (($receiver = smalltalk.send(self, "_superclass", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(result, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allInstanceVariableNames", [])]);})() : nil;
  22. return result;
  23. return self;}
  24. }),
  25. smalltalk.Behavior);
  26. smalltalk.addMethod(
  27. unescape('_allSubclasses'),
  28. smalltalk.method({
  29. selector: unescape('allSubclasses'),
  30. fn: function (){
  31. var self=this;
  32. var result=nil;
  33. (result=smalltalk.send(self, "_subclasses", []));
  34. smalltalk.send(smalltalk.send(self, "_subclasses", []), "_do_", [(function(each){return smalltalk.send(result, "_addAll_", [smalltalk.send(each, "_allSubclasses", [])]);})]);
  35. return result;
  36. return self;}
  37. }),
  38. smalltalk.Behavior);
  39. smalltalk.addMethod(
  40. unescape('_basicNew'),
  41. smalltalk.method({
  42. selector: unescape('basicNew'),
  43. fn: function (){
  44. var self=this;
  45. return new self.fn();
  46. return self;}
  47. }),
  48. smalltalk.Behavior);
  49. smalltalk.addMethod(
  50. unescape('_comment'),
  51. smalltalk.method({
  52. selector: unescape('comment'),
  53. fn: function (){
  54. var self=this;
  55. return (($receiver = smalltalk.send(self, "_basicAt_", ["comment"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  56. return self;}
  57. }),
  58. smalltalk.Behavior);
  59. smalltalk.addMethod(
  60. unescape('_comment_'),
  61. smalltalk.method({
  62. selector: unescape('comment%3A'),
  63. fn: function (aString){
  64. var self=this;
  65. smalltalk.send(self, "_basicAt_put_", ["comment", aString]);
  66. return self;}
  67. }),
  68. smalltalk.Behavior);
  69. smalltalk.addMethod(
  70. unescape('_commentStamp'),
  71. smalltalk.method({
  72. selector: unescape('commentStamp'),
  73. fn: function (){
  74. var self=this;
  75. return (function($rec){smalltalk.send($rec, "_class_", [self]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCommentReader || ClassCommentReader), "_new", []));
  76. return self;}
  77. }),
  78. smalltalk.Behavior);
  79. smalltalk.addMethod(
  80. unescape('_commentStamp_prior_'),
  81. smalltalk.method({
  82. selector: unescape('commentStamp%3Aprior%3A'),
  83. fn: function (aStamp, prior){
  84. var self=this;
  85. return smalltalk.send(self, "_commentStamp", []);
  86. return self;}
  87. }),
  88. smalltalk.Behavior);
  89. smalltalk.addMethod(
  90. unescape('_compile_'),
  91. smalltalk.method({
  92. selector: unescape('compile%3A'),
  93. fn: function (aString){
  94. var self=this;
  95. smalltalk.send(self, "_compile_category_", [aString, ""]);
  96. return self;}
  97. }),
  98. smalltalk.Behavior);
  99. smalltalk.addMethod(
  100. unescape('_compile_category_'),
  101. smalltalk.method({
  102. selector: unescape('compile%3Acategory%3A'),
  103. fn: function (aString, anotherString){
  104. var self=this;
  105. var method=nil;
  106. (method=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [aString, self]));
  107. smalltalk.send(method, "_category_", [anotherString]);
  108. smalltalk.send(self, "_addCompiledMethod_", [method]);
  109. return self;}
  110. }),
  111. smalltalk.Behavior);
  112. smalltalk.addMethod(
  113. unescape('_inheritsFrom_'),
  114. smalltalk.method({
  115. selector: unescape('inheritsFrom%3A'),
  116. fn: function (aClass){
  117. var self=this;
  118. return smalltalk.send(smalltalk.send(aClass, "_allSubclasses", []), "_includes_", [self]);
  119. return self;}
  120. }),
  121. smalltalk.Behavior);
  122. smalltalk.addMethod(
  123. unescape('_instanceVariableNames'),
  124. smalltalk.method({
  125. selector: unescape('instanceVariableNames'),
  126. fn: function (){
  127. var self=this;
  128. return self.iVarNames;
  129. return self;}
  130. }),
  131. smalltalk.Behavior);
  132. smalltalk.addMethod(
  133. unescape('_methodAt_'),
  134. smalltalk.method({
  135. selector: unescape('methodAt%3A'),
  136. fn: function (aString){
  137. var self=this;
  138. return smalltalk.methods(self)[aString];
  139. return self;}
  140. }),
  141. smalltalk.Behavior);
  142. smalltalk.addMethod(
  143. unescape('_methodDictionary'),
  144. smalltalk.method({
  145. selector: unescape('methodDictionary'),
  146. fn: function (){
  147. var self=this;
  148. var dict = smalltalk.HashedCollection._new();
  149. var methods = self.fn.prototype.methods;
  150. for(var i in methods) {
  151. if(methods[i].selector) {
  152. dict._at_put_(methods[i].selector, methods[i]);
  153. }
  154. };
  155. return dict;
  156. return self;}
  157. }),
  158. smalltalk.Behavior);
  159. smalltalk.addMethod(
  160. unescape('_methodsFor_'),
  161. smalltalk.method({
  162. selector: unescape('methodsFor%3A'),
  163. fn: function (aString){
  164. var self=this;
  165. return (function($rec){smalltalk.send($rec, "_class_category_", [self, aString]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassCategoryReader || ClassCategoryReader), "_new", []));
  166. return self;}
  167. }),
  168. smalltalk.Behavior);
  169. smalltalk.addMethod(
  170. unescape('_methodsFor_stamp_'),
  171. smalltalk.method({
  172. selector: unescape('methodsFor%3Astamp%3A'),
  173. fn: function (aString, aStamp){
  174. var self=this;
  175. return smalltalk.send(self, "_methodsFor_", [aString]);
  176. return self;}
  177. }),
  178. smalltalk.Behavior);
  179. smalltalk.addMethod(
  180. unescape('_name'),
  181. smalltalk.method({
  182. selector: unescape('name'),
  183. fn: function (){
  184. var self=this;
  185. return self.className || nil;
  186. return self;}
  187. }),
  188. smalltalk.Behavior);
  189. smalltalk.addMethod(
  190. unescape('_new'),
  191. smalltalk.method({
  192. selector: unescape('new'),
  193. fn: function (){
  194. var self=this;
  195. return smalltalk.send(smalltalk.send(self, "_basicNew", []), "_initialize", []);
  196. return self;}
  197. }),
  198. smalltalk.Behavior);
  199. smalltalk.addMethod(
  200. unescape('_protocols'),
  201. smalltalk.method({
  202. selector: unescape('protocols'),
  203. fn: function (){
  204. var self=this;
  205. var protocols=nil;
  206. (protocols=smalltalk.send((smalltalk.Array || Array), "_new", []));
  207. smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(protocols, "_includes_", [smalltalk.send(each, "_category", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(protocols, "_add_", [smalltalk.send(each, "_category", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(protocols, "_add_", [smalltalk.send(each, "_category", [])]);})]));})]);
  208. return smalltalk.send(protocols, "_sort", []);
  209. return self;}
  210. }),
  211. smalltalk.Behavior);
  212. smalltalk.addMethod(
  213. unescape('_protocolsDo_'),
  214. smalltalk.method({
  215. selector: unescape('protocolsDo%3A'),
  216. fn: function (aBlock){
  217. var self=this;
  218. var methodsByCategory=nil;
  219. (methodsByCategory=smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_new", []));
  220. smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_values", []), "_do_", [(function(m){return smalltalk.send(smalltalk.send(methodsByCategory, "_at_ifAbsentPut_", [smalltalk.send(m, "_category", []), (function(){return smalltalk.send((smalltalk.Array || Array), "_new", []);})]), "_add_", [m]);})]);
  221. smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [(function(category){return smalltalk.send(aBlock, "_value_value_", [category, smalltalk.send(methodsByCategory, "_at_", [category])]);})]);
  222. return self;}
  223. }),
  224. smalltalk.Behavior);
  225. smalltalk.addMethod(
  226. unescape('_prototype'),
  227. smalltalk.method({
  228. selector: unescape('prototype'),
  229. fn: function (){
  230. var self=this;
  231. return self.fn.prototype;
  232. return self;}
  233. }),
  234. smalltalk.Behavior);
  235. smalltalk.addMethod(
  236. unescape('_removeCompiledMethod_'),
  237. smalltalk.method({
  238. selector: unescape('removeCompiledMethod%3A'),
  239. fn: function (aMethod){
  240. var self=this;
  241. delete self.fn.prototype[aMethod.selector._asSelector()];
  242. delete self.fn.prototype.methods[aMethod.selector];
  243. smalltalk.init(self);;
  244. return self;}
  245. }),
  246. smalltalk.Behavior);
  247. smalltalk.addMethod(
  248. unescape('_subclasses'),
  249. smalltalk.method({
  250. selector: unescape('subclasses'),
  251. fn: function (){
  252. var self=this;
  253. return smalltalk.subclasses(self);
  254. return self;}
  255. }),
  256. smalltalk.Behavior);
  257. smalltalk.addMethod(
  258. unescape('_superclass'),
  259. smalltalk.method({
  260. selector: unescape('superclass'),
  261. fn: function (){
  262. var self=this;
  263. return self.superclass || nil;
  264. return self;}
  265. }),
  266. smalltalk.Behavior);
  267. smalltalk.addMethod(
  268. unescape('_withAllSubclasses'),
  269. smalltalk.method({
  270. selector: unescape('withAllSubclasses'),
  271. fn: function (){
  272. var self=this;
  273. return (function($rec){smalltalk.send($rec, "_addAll_", [smalltalk.send(self, "_allSubclasses", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Array || Array), "_with_", [self]));
  274. return self;}
  275. }),
  276. smalltalk.Behavior);
  277. smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel-Classes');
  278. smalltalk.addMethod(
  279. unescape('_category'),
  280. smalltalk.method({
  281. selector: unescape('category'),
  282. fn: function (){
  283. var self=this;
  284. return (($receiver = smalltalk.send(self, "_package", [])) == nil || $receiver == undefined) ? (function(){return "Unclassified";})() : (function(){return smalltalk.send(smalltalk.send(self, "_package", []), "_name", []);})();
  285. return self;}
  286. }),
  287. smalltalk.Class);
  288. smalltalk.addMethod(
  289. unescape('_isClass'),
  290. smalltalk.method({
  291. selector: unescape('isClass'),
  292. fn: function (){
  293. var self=this;
  294. return true;
  295. return self;}
  296. }),
  297. smalltalk.Class);
  298. smalltalk.addMethod(
  299. unescape('_package'),
  300. smalltalk.method({
  301. selector: unescape('package'),
  302. fn: function (){
  303. var self=this;
  304. return self.pkg;
  305. return self;}
  306. }),
  307. smalltalk.Class);
  308. smalltalk.addMethod(
  309. unescape('_package_'),
  310. smalltalk.method({
  311. selector: unescape('package%3A'),
  312. fn: function (aPackage){
  313. var self=this;
  314. self.pkg = aPackage;
  315. return self;}
  316. }),
  317. smalltalk.Class);
  318. smalltalk.addMethod(
  319. unescape('_printString'),
  320. smalltalk.method({
  321. selector: unescape('printString'),
  322. fn: function (){
  323. var self=this;
  324. return smalltalk.send(self, "_name", []);
  325. return self;}
  326. }),
  327. smalltalk.Class);
  328. smalltalk.addMethod(
  329. unescape('_rename_'),
  330. smalltalk.method({
  331. selector: unescape('rename%3A'),
  332. fn: function (aString){
  333. var self=this;
  334. smalltalk[aString] = self;
  335. delete smalltalk[self.className];
  336. self.className = aString;
  337. ;
  338. return self;}
  339. }),
  340. smalltalk.Class);
  341. smalltalk.addMethod(
  342. unescape('_subclass_instanceVariableNames_'),
  343. smalltalk.method({
  344. selector: unescape('subclass%3AinstanceVariableNames%3A'),
  345. fn: function (aString, anotherString){
  346. var self=this;
  347. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  348. return self;}
  349. }),
  350. smalltalk.Class);
  351. smalltalk.addMethod(
  352. unescape('_subclass_instanceVariableNames_category_'),
  353. smalltalk.method({
  354. selector: unescape('subclass%3AinstanceVariableNames%3Acategory%3A'),
  355. fn: function (aString, aString2, aString3){
  356. var self=this;
  357. smalltalk.send(self, "_deprecatedAPI", []);
  358. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  359. return self;}
  360. }),
  361. smalltalk.Class);
  362. smalltalk.addMethod(
  363. unescape('_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_'),
  364. smalltalk.method({
  365. selector: unescape('subclass%3AinstanceVariableNames%3AclassVariableNames%3ApoolDictionaries%3Acategory%3A'),
  366. fn: function (aString, aString2, classVars, pools, aString3){
  367. var self=this;
  368. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  369. return self;}
  370. }),
  371. smalltalk.Class);
  372. smalltalk.addMethod(
  373. unescape('_subclass_instanceVariableNames_package_'),
  374. smalltalk.method({
  375. selector: unescape('subclass%3AinstanceVariableNames%3Apackage%3A'),
  376. fn: function (aString, aString2, aString3){
  377. var self=this;
  378. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, smalltalk.send(aString, "_asString", []), aString2, aString3]);
  379. return self;}
  380. }),
  381. smalltalk.Class);
  382. smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel-Classes');
  383. smalltalk.addMethod(
  384. unescape('_instanceClass'),
  385. smalltalk.method({
  386. selector: unescape('instanceClass'),
  387. fn: function (){
  388. var self=this;
  389. return self.instanceClass;
  390. return self;}
  391. }),
  392. smalltalk.Metaclass);
  393. smalltalk.addMethod(
  394. unescape('_instanceVariableNames_'),
  395. smalltalk.method({
  396. selector: unescape('instanceVariableNames%3A'),
  397. fn: function (aCollection){
  398. var self=this;
  399. smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_class_instanceVariableNames_", [self, aCollection]);
  400. return self;}
  401. }),
  402. smalltalk.Metaclass);
  403. smalltalk.addMethod(
  404. unescape('_isMetaclass'),
  405. smalltalk.method({
  406. selector: unescape('isMetaclass'),
  407. fn: function (){
  408. var self=this;
  409. return true;
  410. return self;}
  411. }),
  412. smalltalk.Metaclass);
  413. smalltalk.addMethod(
  414. unescape('_printString'),
  415. smalltalk.method({
  416. selector: unescape('printString'),
  417. fn: function (){
  418. var self=this;
  419. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_instanceClass", []), "_name", []), "__comma", [" class"]);
  420. return self;}
  421. }),
  422. smalltalk.Metaclass);
  423. smalltalk.addClass('ClassBuilder', smalltalk.Object, [], 'Kernel-Classes');
  424. smalltalk.addMethod(
  425. unescape('_addSubclassOf_named_instanceVariableNames_'),
  426. smalltalk.method({
  427. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3A'),
  428. fn: function (aClass, aString, aCollection){
  429. var self=this;
  430. smalltalk.addClass(aString, aClass, aCollection);
  431. return smalltalk[aString];
  432. return self;}
  433. }),
  434. smalltalk.ClassBuilder);
  435. smalltalk.addMethod(
  436. unescape('_addSubclassOf_named_instanceVariableNames_package_'),
  437. smalltalk.method({
  438. selector: unescape('addSubclassOf%3Anamed%3AinstanceVariableNames%3Apackage%3A'),
  439. fn: function (aClass, aString, aCollection, packageName){
  440. var self=this;
  441. smalltalk.addClass(aString, aClass, aCollection, packageName);
  442. return smalltalk[aString];
  443. return self;}
  444. }),
  445. smalltalk.ClassBuilder);
  446. smalltalk.addMethod(
  447. unescape('_class_instanceVariableNames_'),
  448. smalltalk.method({
  449. selector: unescape('class%3AinstanceVariableNames%3A'),
  450. fn: function (aClass, aString){
  451. var self=this;
  452. ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_name", []), "__comma", [" is not a metaclass"])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_name", []), "__comma", [" is not a metaclass"])]);})]));
  453. smalltalk.send(aClass, "_basicAt_put_", ["iVarNames", smalltalk.send(self, "_instanceVariableNamesFor_", [aString])]);
  454. smalltalk.send(self, "_setupClass_", [aClass]);
  455. return self;}
  456. }),
  457. smalltalk.ClassBuilder);
  458. smalltalk.addMethod(
  459. unescape('_copyClass_named_'),
  460. smalltalk.method({
  461. selector: unescape('copyClass%3Anamed%3A'),
  462. fn: function (aClass, aString){
  463. var self=this;
  464. var newClass=nil;
  465. (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), aString, smalltalk.send(aClass, "_instanceVariableNames", []), smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]));
  466. smalltalk.send(self, "_setupClass_", [newClass]);
  467. smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){smalltalk.send(newClass, "_addCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [smalltalk.send(each, "_source", []), newClass])]);return smalltalk.send(smalltalk.send(smalltalk.send(newClass, "_methodDictionary", []), "_at_", [smalltalk.send(each, "_selector", [])]), "_category_", [smalltalk.send(each, "_category", [])]);})]);
  468. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){smalltalk.send(smalltalk.send(newClass, "_class", []), "_addCompiledMethod_", [smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_load_forClass_", [smalltalk.send(each, "_source", []), smalltalk.send(newClass, "_class", [])])]);return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(newClass, "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(each, "_selector", [])]), "_category_", [smalltalk.send(each, "_category", [])]);})]);
  469. smalltalk.send(self, "_setupClass_", [newClass]);
  470. return newClass;
  471. return self;}
  472. }),
  473. smalltalk.ClassBuilder);
  474. smalltalk.addMethod(
  475. unescape('_instanceVariableNamesFor_'),
  476. smalltalk.method({
  477. selector: unescape('instanceVariableNamesFor%3A'),
  478. fn: function (aString){
  479. var self=this;
  480. return smalltalk.send(smalltalk.send(aString, "_tokenize_", [" "]), "_reject_", [(function(each){return smalltalk.send(each, "_isEmpty", []);})]);
  481. return self;}
  482. }),
  483. smalltalk.ClassBuilder);
  484. smalltalk.addMethod(
  485. unescape('_setupClass_'),
  486. smalltalk.method({
  487. selector: unescape('setupClass%3A'),
  488. fn: function (aClass){
  489. var self=this;
  490. smalltalk.init(aClass);;
  491. return self;}
  492. }),
  493. smalltalk.ClassBuilder);
  494. smalltalk.addMethod(
  495. unescape('_superclass_subclass_'),
  496. smalltalk.method({
  497. selector: unescape('superclass%3Asubclass%3A'),
  498. fn: function (aClass, aString){
  499. var self=this;
  500. return smalltalk.send(self, "_superclass_subclass_instanceVariableNames_package_", [aClass, aString, "", nil]);
  501. return self;}
  502. }),
  503. smalltalk.ClassBuilder);
  504. smalltalk.addMethod(
  505. unescape('_superclass_subclass_instanceVariableNames_package_'),
  506. smalltalk.method({
  507. selector: unescape('superclass%3Asubclass%3AinstanceVariableNames%3Apackage%3A'),
  508. fn: function (aClass, aString, aString2, aString3){
  509. var self=this;
  510. var newClass=nil;
  511. (newClass=smalltalk.send(self, "_addSubclassOf_named_instanceVariableNames_package_", [aClass, aString, smalltalk.send(self, "_instanceVariableNamesFor_", [aString2]), (($receiver = aString3) == nil || $receiver == undefined) ? (function(){return "unclassified";})() : $receiver]));
  512. smalltalk.send(self, "_setupClass_", [newClass]);
  513. return newClass;
  514. return self;}
  515. }),
  516. smalltalk.ClassBuilder);
  517. smalltalk.addClass('ClassCategoryReader', smalltalk.Object, ['class', 'category', 'chunkParser'], 'Kernel-Classes');
  518. smalltalk.addMethod(
  519. unescape('_class_category_'),
  520. smalltalk.method({
  521. selector: unescape('class%3Acategory%3A'),
  522. fn: function (aClass, aString){
  523. var self=this;
  524. (self['@class']=aClass);
  525. (self['@category']=aString);
  526. return self;}
  527. }),
  528. smalltalk.ClassCategoryReader);
  529. smalltalk.addMethod(
  530. unescape('_compileMethod_'),
  531. smalltalk.method({
  532. selector: unescape('compileMethod%3A'),
  533. fn: function (aString){
  534. var self=this;
  535. var method=nil;
  536. var compiler=nil;
  537. (method=smalltalk.send((compiler=smalltalk.send((smalltalk.Compiler || Compiler), "_new", [])), "_load_forClass_", [aString, self['@class']]));
  538. smalltalk.send(method, "_category_", [self['@category']]);
  539. smalltalk.send(self['@class'], "_addCompiledMethod_", [method]);
  540. smalltalk.send(compiler, "_setupClass_", [self['@class']]);
  541. return self;}
  542. }),
  543. smalltalk.ClassCategoryReader);
  544. smalltalk.addMethod(
  545. unescape('_initialize'),
  546. smalltalk.method({
  547. selector: unescape('initialize'),
  548. fn: function (){
  549. var self=this;
  550. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  551. (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
  552. return self;}
  553. }),
  554. smalltalk.ClassCategoryReader);
  555. smalltalk.addMethod(
  556. unescape('_scanFrom_'),
  557. smalltalk.method({
  558. selector: unescape('scanFrom%3A'),
  559. fn: function (aChunkParser){
  560. var self=this;
  561. var chunk=nil;
  562. (function(){while(!(function(){(chunk=smalltalk.send(aChunkParser, "_nextChunk", []));return smalltalk.send(chunk, "_isEmpty", []);})()) {(function(){return smalltalk.send(self, "_compileMethod_", [chunk]);})()}})();
  563. return self;}
  564. }),
  565. smalltalk.ClassCategoryReader);
  566. smalltalk.addClass('ClassCommentReader', smalltalk.Object, ['class', 'chunkParser'], 'Kernel-Classes');
  567. smalltalk.addMethod(
  568. unescape('_class_'),
  569. smalltalk.method({
  570. selector: unescape('class%3A'),
  571. fn: function (aClass){
  572. var self=this;
  573. (self['@class']=aClass);
  574. return self;}
  575. }),
  576. smalltalk.ClassCommentReader);
  577. smalltalk.addMethod(
  578. unescape('_initialize'),
  579. smalltalk.method({
  580. selector: unescape('initialize'),
  581. fn: function (){
  582. var self=this;
  583. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  584. (self['@chunkParser']=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_new", []));
  585. return self;}
  586. }),
  587. smalltalk.ClassCommentReader);
  588. smalltalk.addMethod(
  589. unescape('_scanFrom_'),
  590. smalltalk.method({
  591. selector: unescape('scanFrom%3A'),
  592. fn: function (aChunkParser){
  593. var self=this;
  594. var chunk=nil;
  595. (chunk=smalltalk.send(aChunkParser, "_nextChunk", []));
  596. ((($receiver = smalltalk.send(chunk, "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_setComment_", [chunk]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_setComment_", [chunk]);})]));
  597. return self;}
  598. }),
  599. smalltalk.ClassCommentReader);
  600. smalltalk.addMethod(
  601. unescape('_setComment_'),
  602. smalltalk.method({
  603. selector: unescape('setComment%3A'),
  604. fn: function (aString){
  605. var self=this;
  606. smalltalk.send(self['@class'], "_comment_", [aString]);
  607. return self;}
  608. }),
  609. smalltalk.ClassCommentReader);