Kernel-Methods.deploy.js 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  1. smalltalk.addPackage('Kernel-Methods', {});
  2. smalltalk.addClass('CompiledMethod', smalltalk.Object, [], 'Kernel-Methods');
  3. smalltalk.addMethod(
  4. unescape('_source'),
  5. smalltalk.method({
  6. selector: unescape('source'),
  7. fn: function (){
  8. var self=this;
  9. return (($receiver = smalltalk.send(self, "_basicAt_", ["source"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  10. return self;}
  11. }),
  12. smalltalk.CompiledMethod);
  13. smalltalk.addMethod(
  14. unescape('_source_'),
  15. smalltalk.method({
  16. selector: unescape('source%3A'),
  17. fn: function (aString){
  18. var self=this;
  19. smalltalk.send(self, "_basicAt_put_", ["source", aString]);
  20. return self;}
  21. }),
  22. smalltalk.CompiledMethod);
  23. smalltalk.addMethod(
  24. unescape('_category'),
  25. smalltalk.method({
  26. selector: unescape('category'),
  27. fn: function (){
  28. var self=this;
  29. return (($receiver = smalltalk.send(self, "_basicAt_", ["category"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  30. return self;}
  31. }),
  32. smalltalk.CompiledMethod);
  33. smalltalk.addMethod(
  34. unescape('_category_'),
  35. smalltalk.method({
  36. selector: unescape('category%3A'),
  37. fn: function (aString){
  38. var self=this;
  39. smalltalk.send(self, "_basicAt_put_", ["category", aString]);
  40. return self;}
  41. }),
  42. smalltalk.CompiledMethod);
  43. smalltalk.addMethod(
  44. unescape('_selector'),
  45. smalltalk.method({
  46. selector: unescape('selector'),
  47. fn: function (){
  48. var self=this;
  49. return smalltalk.send(self, "_basicAt_", ["selector"]);
  50. return self;}
  51. }),
  52. smalltalk.CompiledMethod);
  53. smalltalk.addMethod(
  54. unescape('_selector_'),
  55. smalltalk.method({
  56. selector: unescape('selector%3A'),
  57. fn: function (aString){
  58. var self=this;
  59. smalltalk.send(self, "_basicAt_put_", ["selector", aString]);
  60. return self;}
  61. }),
  62. smalltalk.CompiledMethod);
  63. smalltalk.addMethod(
  64. unescape('_fn'),
  65. smalltalk.method({
  66. selector: unescape('fn'),
  67. fn: function (){
  68. var self=this;
  69. return smalltalk.send(self, "_basicAt_", ["fn"]);
  70. return self;}
  71. }),
  72. smalltalk.CompiledMethod);
  73. smalltalk.addMethod(
  74. unescape('_fn_'),
  75. smalltalk.method({
  76. selector: unescape('fn%3A'),
  77. fn: function (aBlock){
  78. var self=this;
  79. smalltalk.send(self, "_basicAt_put_", ["fn", aBlock]);
  80. return self;}
  81. }),
  82. smalltalk.CompiledMethod);
  83. smalltalk.addMethod(
  84. unescape('_messageSends'),
  85. smalltalk.method({
  86. selector: unescape('messageSends'),
  87. fn: function (){
  88. var self=this;
  89. return smalltalk.send(self, "_basicAt_", ["messageSends"]);
  90. return self;}
  91. }),
  92. smalltalk.CompiledMethod);
  93. smalltalk.addMethod(
  94. unescape('_methodClass'),
  95. smalltalk.method({
  96. selector: unescape('methodClass'),
  97. fn: function (){
  98. var self=this;
  99. return smalltalk.send(self, "_basicAt_", ["methodClass"]);
  100. return self;}
  101. }),
  102. smalltalk.CompiledMethod);
  103. smalltalk.addMethod(
  104. unescape('_referencedClasses'),
  105. smalltalk.method({
  106. selector: unescape('referencedClasses'),
  107. fn: function (){
  108. var self=this;
  109. return smalltalk.send(self, "_basicAt_", ["referencedClasses"]);
  110. return self;}
  111. }),
  112. smalltalk.CompiledMethod);
  113. smalltalk.addMethod(
  114. unescape('_arguments'),
  115. smalltalk.method({
  116. selector: unescape('arguments'),
  117. fn: function (){
  118. var self=this;
  119. return self.args || [];
  120. return self;}
  121. }),
  122. smalltalk.CompiledMethod);
  123. smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel-Methods');
  124. smalltalk.addMethod(
  125. unescape('_compiledSource'),
  126. smalltalk.method({
  127. selector: unescape('compiledSource'),
  128. fn: function (){
  129. var self=this;
  130. return self.toString();
  131. return self;}
  132. }),
  133. smalltalk.BlockClosure);
  134. smalltalk.addMethod(
  135. unescape('_whileTrue_'),
  136. smalltalk.method({
  137. selector: unescape('whileTrue%3A'),
  138. fn: function (aBlock){
  139. var self=this;
  140. while(self()) {aBlock()};
  141. return self;}
  142. }),
  143. smalltalk.BlockClosure);
  144. smalltalk.addMethod(
  145. unescape('_whileFalse_'),
  146. smalltalk.method({
  147. selector: unescape('whileFalse%3A'),
  148. fn: function (aBlock){
  149. var self=this;
  150. while(!self()) {aBlock()};
  151. return self;}
  152. }),
  153. smalltalk.BlockClosure);
  154. smalltalk.addMethod(
  155. unescape('_value'),
  156. smalltalk.method({
  157. selector: unescape('value'),
  158. fn: function (){
  159. var self=this;
  160. return self();;
  161. return self;}
  162. }),
  163. smalltalk.BlockClosure);
  164. smalltalk.addMethod(
  165. unescape('_value_'),
  166. smalltalk.method({
  167. selector: unescape('value%3A'),
  168. fn: function (anArg){
  169. var self=this;
  170. return self(anArg);;
  171. return self;}
  172. }),
  173. smalltalk.BlockClosure);
  174. smalltalk.addMethod(
  175. unescape('_value_value_'),
  176. smalltalk.method({
  177. selector: unescape('value%3Avalue%3A'),
  178. fn: function (firstArg, secondArg){
  179. var self=this;
  180. return self(firstArg, secondArg);;
  181. return self;}
  182. }),
  183. smalltalk.BlockClosure);
  184. smalltalk.addMethod(
  185. unescape('_value_value_value_'),
  186. smalltalk.method({
  187. selector: unescape('value%3Avalue%3Avalue%3A'),
  188. fn: function (firstArg, secondArg, thirdArg){
  189. var self=this;
  190. return self(firstArg, secondArg, thirdArg);;
  191. return self;}
  192. }),
  193. smalltalk.BlockClosure);
  194. smalltalk.addMethod(
  195. unescape('_valueWithPossibleArguments_'),
  196. smalltalk.method({
  197. selector: unescape('valueWithPossibleArguments%3A'),
  198. fn: function (aCollection){
  199. var self=this;
  200. return self.apply(null, aCollection);;
  201. return self;}
  202. }),
  203. smalltalk.BlockClosure);
  204. smalltalk.addMethod(
  205. unescape('_on_do_'),
  206. smalltalk.method({
  207. selector: unescape('on%3Ado%3A'),
  208. fn: function (anErrorClass, aBlock){
  209. var self=this;
  210. return smalltalk.send(self, "_try_catch_", [self, (function(error){return ((($receiver = smalltalk.send(error, "_isKindOf_", [anErrorClass])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(aBlock, "_value_", [error]);})() : (function(){return smalltalk.send(error, "_signal", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(aBlock, "_value_", [error]);}), (function(){return smalltalk.send(error, "_signal", []);})]));})]);
  211. return self;}
  212. }),
  213. smalltalk.BlockClosure);
  214. smalltalk.addMethod(
  215. unescape('_valueWithTimeout_'),
  216. smalltalk.method({
  217. selector: unescape('valueWithTimeout%3A'),
  218. fn: function (aNumber){
  219. var self=this;
  220. return setTimeout(self, aNumber);
  221. return self;}
  222. }),
  223. smalltalk.BlockClosure);
  224. smalltalk.addMethod(
  225. unescape('_valueWithInterval_'),
  226. smalltalk.method({
  227. selector: unescape('valueWithInterval%3A'),
  228. fn: function (aNumber){
  229. var self=this;
  230. return setInterval(self, aNumber);
  231. return self;}
  232. }),
  233. smalltalk.BlockClosure);
  234. smalltalk.addMethod(
  235. unescape('_whileFalse'),
  236. smalltalk.method({
  237. selector: unescape('whileFalse'),
  238. fn: function (){
  239. var self=this;
  240. smalltalk.send(self, "_whileFalse_", [(function(){return nil;})]);
  241. return self;}
  242. }),
  243. smalltalk.BlockClosure);
  244. smalltalk.addMethod(
  245. unescape('_whileTrue'),
  246. smalltalk.method({
  247. selector: unescape('whileTrue'),
  248. fn: function (){
  249. var self=this;
  250. smalltalk.send(self, "_whileTrue_", [(function(){return nil;})]);
  251. return self;}
  252. }),
  253. smalltalk.BlockClosure);
  254. smalltalk.addMethod(
  255. unescape('_new'),
  256. smalltalk.method({
  257. selector: unescape('new'),
  258. fn: function (){
  259. var self=this;
  260. return new self();
  261. return self;}
  262. }),
  263. smalltalk.BlockClosure);
  264. smalltalk.addMethod(
  265. unescape('_applyTo_arguments_'),
  266. smalltalk.method({
  267. selector: unescape('applyTo%3Aarguments%3A'),
  268. fn: function (anObject, aCollection){
  269. var self=this;
  270. return self.apply(anObject, aCollection);
  271. return self;}
  272. }),
  273. smalltalk.BlockClosure);
  274. smalltalk.addMethod(
  275. unescape('_timeToRun'),
  276. smalltalk.method({
  277. selector: unescape('timeToRun'),
  278. fn: function (){
  279. var self=this;
  280. return smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [self]);
  281. return self;}
  282. }),
  283. smalltalk.BlockClosure);
  284. smalltalk.addMethod(
  285. unescape('_numArgs'),
  286. smalltalk.method({
  287. selector: unescape('numArgs'),
  288. fn: function (){
  289. var self=this;
  290. return self.length;
  291. return self;}
  292. }),
  293. smalltalk.BlockClosure);
  294. smalltalk.addMethod(
  295. unescape('_ensure_'),
  296. smalltalk.method({
  297. selector: unescape('ensure%3A'),
  298. fn: function (aBlock){
  299. var self=this;
  300. var success=nil;
  301. (success=false);
  302. return smalltalk.send((function(){smalltalk.send(self, "_value", []);(success=true);return smalltalk.send(aBlock, "_value", []);}), "_on_do_", [(smalltalk.Error || Error), (function(ex){((($receiver = success).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(aBlock, "_value", []);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(aBlock, "_value", []);})]));return smalltalk.send(ex, "_signal", []);})]);
  303. return self;}
  304. }),
  305. smalltalk.BlockClosure);
  306. smalltalk.addMethod(
  307. unescape('_newValue_'),
  308. smalltalk.method({
  309. selector: unescape('newValue%3A'),
  310. fn: function (anObject){
  311. var self=this;
  312. return new self(anObject);
  313. return self;}
  314. }),
  315. smalltalk.BlockClosure);
  316. smalltalk.addMethod(
  317. unescape('_newValue_value_'),
  318. smalltalk.method({
  319. selector: unescape('newValue%3Avalue%3A'),
  320. fn: function (anObject, anObject2){
  321. var self=this;
  322. return new self(anObject, anObject2);
  323. return self;}
  324. }),
  325. smalltalk.BlockClosure);
  326. smalltalk.addMethod(
  327. unescape('_newValue_value_value_'),
  328. smalltalk.method({
  329. selector: unescape('newValue%3Avalue%3Avalue%3A'),
  330. fn: function (anObject, anObject2, anObject3){
  331. var self=this;
  332. return new self(anObject, anObject2);
  333. return self;}
  334. }),
  335. smalltalk.BlockClosure);
  336. smalltalk.addClass('MethodContext', smalltalk.Object, [], 'Kernel-Methods');
  337. smalltalk.addMethod(
  338. unescape('_receiver'),
  339. smalltalk.method({
  340. selector: unescape('receiver'),
  341. fn: function (){
  342. var self=this;
  343. return self.receiver;
  344. return self;}
  345. }),
  346. smalltalk.MethodContext);
  347. smalltalk.addMethod(
  348. unescape('_selector'),
  349. smalltalk.method({
  350. selector: unescape('selector'),
  351. fn: function (){
  352. var self=this;
  353. return smalltalk.convertSelector(self.selector);
  354. return self;}
  355. }),
  356. smalltalk.MethodContext);
  357. smalltalk.addMethod(
  358. unescape('_home'),
  359. smalltalk.method({
  360. selector: unescape('home'),
  361. fn: function (){
  362. var self=this;
  363. return self.homeContext;
  364. return self;}
  365. }),
  366. smalltalk.MethodContext);
  367. smalltalk.addMethod(
  368. unescape('_temps'),
  369. smalltalk.method({
  370. selector: unescape('temps'),
  371. fn: function (){
  372. var self=this;
  373. return self.temps;
  374. return self;}
  375. }),
  376. smalltalk.MethodContext);
  377. smalltalk.addMethod(
  378. unescape('_printString'),
  379. smalltalk.method({
  380. selector: unescape('printString'),
  381. fn: function (){
  382. var self=this;
  383. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.Object), "__comma", [unescape("%28")]), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [unescape("%29")]);
  384. return self;}
  385. }),
  386. smalltalk.MethodContext);
  387. smalltalk.addMethod(
  388. unescape('_asString'),
  389. smalltalk.method({
  390. selector: unescape('asString'),
  391. fn: function (){
  392. var self=this;
  393. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_class", []), "_printString", []), "__comma", [unescape("%20%3E%3E%20")]), "__comma", [smalltalk.send(self, "_selector", [])]);
  394. return self;}
  395. }),
  396. smalltalk.MethodContext);
  397. smalltalk.addClass('Message', smalltalk.Object, ['selector', 'arguments'], 'Kernel-Methods');
  398. smalltalk.addMethod(
  399. unescape('_selector'),
  400. smalltalk.method({
  401. selector: unescape('selector'),
  402. fn: function (){
  403. var self=this;
  404. return self['@selector'];
  405. return self;}
  406. }),
  407. smalltalk.Message);
  408. smalltalk.addMethod(
  409. unescape('_selector_'),
  410. smalltalk.method({
  411. selector: unescape('selector%3A'),
  412. fn: function (aString){
  413. var self=this;
  414. (self['@selector']=aString);
  415. return self;}
  416. }),
  417. smalltalk.Message);
  418. smalltalk.addMethod(
  419. unescape('_arguments_'),
  420. smalltalk.method({
  421. selector: unescape('arguments%3A'),
  422. fn: function (anArray){
  423. var self=this;
  424. (self['@arguments']=anArray);
  425. return self;}
  426. }),
  427. smalltalk.Message);
  428. smalltalk.addMethod(
  429. unescape('_arguments'),
  430. smalltalk.method({
  431. selector: unescape('arguments'),
  432. fn: function (){
  433. var self=this;
  434. return self['@arguments'];
  435. return self;}
  436. }),
  437. smalltalk.Message);
  438. smalltalk.addMethod(
  439. unescape('_printString'),
  440. smalltalk.method({
  441. selector: unescape('printString'),
  442. fn: function (){
  443. var self=this;
  444. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(aStream){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Object)]);smalltalk.send($rec, "_nextPutAll_", [unescape("%28")]);smalltalk.send($rec, "_nextPutAll_", [self['@selector']]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%29")]);})(aStream);})]);
  445. return self;}
  446. }),
  447. smalltalk.Message);
  448. smalltalk.addMethod(
  449. unescape('_selector_arguments_'),
  450. smalltalk.method({
  451. selector: unescape('selector%3Aarguments%3A'),
  452. fn: function (aString, anArray){
  453. var self=this;
  454. return (function($rec){smalltalk.send($rec, "_selector_", [aString]);smalltalk.send($rec, "_arguments_", [anArray]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  455. return self;}
  456. }),
  457. smalltalk.Message.klass);