Kernel-Methods.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  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. category: 'accessing',
  8. fn: function (){
  9. var self=this;
  10. return (($receiver = smalltalk.send(self, "_basicAt_", ["source"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  11. return self;},
  12. args: [],
  13. source: unescape('source%0A%09%5E%28self%20basicAt%3A%20%27source%27%29%20ifNil%3A%20%5B%27%27%5D'),
  14. messageSends: ["ifNil:", "basicAt:"],
  15. referencedClasses: []
  16. }),
  17. smalltalk.CompiledMethod);
  18. smalltalk.addMethod(
  19. unescape('_source_'),
  20. smalltalk.method({
  21. selector: unescape('source%3A'),
  22. category: 'accessing',
  23. fn: function (aString){
  24. var self=this;
  25. smalltalk.send(self, "_basicAt_put_", ["source", aString]);
  26. return self;},
  27. args: ["aString"],
  28. source: unescape('source%3A%20aString%0A%09self%20basicAt%3A%20%27source%27%20put%3A%20aString'),
  29. messageSends: ["basicAt:put:"],
  30. referencedClasses: []
  31. }),
  32. smalltalk.CompiledMethod);
  33. smalltalk.addMethod(
  34. unescape('_category'),
  35. smalltalk.method({
  36. selector: unescape('category'),
  37. category: 'accessing',
  38. fn: function (){
  39. var self=this;
  40. return (($receiver = smalltalk.send(self, "_basicAt_", ["category"])) == nil || $receiver == undefined) ? (function(){return "";})() : $receiver;
  41. return self;},
  42. args: [],
  43. source: unescape('category%0A%09%5E%28self%20basicAt%3A%20%27category%27%29%20ifNil%3A%20%5B%27%27%5D'),
  44. messageSends: ["ifNil:", "basicAt:"],
  45. referencedClasses: []
  46. }),
  47. smalltalk.CompiledMethod);
  48. smalltalk.addMethod(
  49. unescape('_category_'),
  50. smalltalk.method({
  51. selector: unescape('category%3A'),
  52. category: 'accessing',
  53. fn: function (aString){
  54. var self=this;
  55. smalltalk.send(self, "_basicAt_put_", ["category", aString]);
  56. return self;},
  57. args: ["aString"],
  58. source: unescape('category%3A%20aString%0A%09self%20basicAt%3A%20%27category%27%20put%3A%20aString'),
  59. messageSends: ["basicAt:put:"],
  60. referencedClasses: []
  61. }),
  62. smalltalk.CompiledMethod);
  63. smalltalk.addMethod(
  64. unescape('_selector'),
  65. smalltalk.method({
  66. selector: unescape('selector'),
  67. category: 'accessing',
  68. fn: function (){
  69. var self=this;
  70. return smalltalk.send(self, "_basicAt_", ["selector"]);
  71. return self;},
  72. args: [],
  73. source: unescape('selector%0A%09%5Eself%20basicAt%3A%20%27selector%27'),
  74. messageSends: ["basicAt:"],
  75. referencedClasses: []
  76. }),
  77. smalltalk.CompiledMethod);
  78. smalltalk.addMethod(
  79. unescape('_selector_'),
  80. smalltalk.method({
  81. selector: unescape('selector%3A'),
  82. category: 'accessing',
  83. fn: function (aString){
  84. var self=this;
  85. smalltalk.send(self, "_basicAt_put_", ["selector", aString]);
  86. return self;},
  87. args: ["aString"],
  88. source: unescape('selector%3A%20aString%0A%09self%20basicAt%3A%20%27selector%27%20put%3A%20aString'),
  89. messageSends: ["basicAt:put:"],
  90. referencedClasses: []
  91. }),
  92. smalltalk.CompiledMethod);
  93. smalltalk.addMethod(
  94. unescape('_fn'),
  95. smalltalk.method({
  96. selector: unescape('fn'),
  97. category: 'accessing',
  98. fn: function (){
  99. var self=this;
  100. return smalltalk.send(self, "_basicAt_", ["fn"]);
  101. return self;},
  102. args: [],
  103. source: unescape('fn%0A%09%5Eself%20basicAt%3A%20%27fn%27'),
  104. messageSends: ["basicAt:"],
  105. referencedClasses: []
  106. }),
  107. smalltalk.CompiledMethod);
  108. smalltalk.addMethod(
  109. unescape('_fn_'),
  110. smalltalk.method({
  111. selector: unescape('fn%3A'),
  112. category: 'accessing',
  113. fn: function (aBlock){
  114. var self=this;
  115. smalltalk.send(self, "_basicAt_put_", ["fn", aBlock]);
  116. return self;},
  117. args: ["aBlock"],
  118. source: unescape('fn%3A%20aBlock%0A%09self%20basicAt%3A%20%27fn%27%20put%3A%20aBlock'),
  119. messageSends: ["basicAt:put:"],
  120. referencedClasses: []
  121. }),
  122. smalltalk.CompiledMethod);
  123. smalltalk.addMethod(
  124. unescape('_messageSends'),
  125. smalltalk.method({
  126. selector: unescape('messageSends'),
  127. category: 'accessing',
  128. fn: function (){
  129. var self=this;
  130. return smalltalk.send(self, "_basicAt_", ["messageSends"]);
  131. return self;},
  132. args: [],
  133. source: unescape('messageSends%0A%09%5Eself%20basicAt%3A%20%27messageSends%27'),
  134. messageSends: ["basicAt:"],
  135. referencedClasses: []
  136. }),
  137. smalltalk.CompiledMethod);
  138. smalltalk.addMethod(
  139. unescape('_methodClass'),
  140. smalltalk.method({
  141. selector: unescape('methodClass'),
  142. category: 'accessing',
  143. fn: function (){
  144. var self=this;
  145. return smalltalk.send(self, "_basicAt_", ["methodClass"]);
  146. return self;},
  147. args: [],
  148. source: unescape('methodClass%0A%09%5Eself%20basicAt%3A%20%27methodClass%27'),
  149. messageSends: ["basicAt:"],
  150. referencedClasses: []
  151. }),
  152. smalltalk.CompiledMethod);
  153. smalltalk.addMethod(
  154. unescape('_referencedClasses'),
  155. smalltalk.method({
  156. selector: unescape('referencedClasses'),
  157. category: 'accessing',
  158. fn: function (){
  159. var self=this;
  160. return smalltalk.send(self, "_basicAt_", ["referencedClasses"]);
  161. return self;},
  162. args: [],
  163. source: unescape('referencedClasses%0A%09%5Eself%20basicAt%3A%20%27referencedClasses%27'),
  164. messageSends: ["basicAt:"],
  165. referencedClasses: []
  166. }),
  167. smalltalk.CompiledMethod);
  168. smalltalk.addMethod(
  169. unescape('_arguments'),
  170. smalltalk.method({
  171. selector: unescape('arguments'),
  172. category: 'accessing',
  173. fn: function (){
  174. var self=this;
  175. return self.args || [];
  176. return self;},
  177. args: [],
  178. source: unescape('arguments%0A%09%3Creturn%20self.args%20%7C%7C%20%5B%5D%3E'),
  179. messageSends: [],
  180. referencedClasses: []
  181. }),
  182. smalltalk.CompiledMethod);
  183. smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel-Methods');
  184. smalltalk.BlockClosure.comment=unescape('A%20BlockClosure%20is%20a%20lexical%20closure.%0AThe%20JavaScript%20representation%20is%20a%20function.%0A%0AA%20BlockClosure%20is%20evaluated%20with%20the%20%23value*%20methods%20in%20the%20%27evaluating%27%20protocol.')
  185. smalltalk.addMethod(
  186. unescape('_compiledSource'),
  187. smalltalk.method({
  188. selector: unescape('compiledSource'),
  189. category: 'accessing',
  190. fn: function (){
  191. var self=this;
  192. return self.toString();
  193. return self;},
  194. args: [],
  195. source: unescape('compiledSource%0A%09%3Creturn%20self.toString%28%29%3E'),
  196. messageSends: [],
  197. referencedClasses: []
  198. }),
  199. smalltalk.BlockClosure);
  200. smalltalk.addMethod(
  201. unescape('_whileTrue_'),
  202. smalltalk.method({
  203. selector: unescape('whileTrue%3A'),
  204. category: 'controlling',
  205. fn: function (aBlock){
  206. var self=this;
  207. while(self()) {aBlock()};
  208. return self;},
  209. args: ["aBlock"],
  210. source: unescape('whileTrue%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Cwhile%28self%28%29%29%20%7BaBlock%28%29%7D%3E'),
  211. messageSends: [],
  212. referencedClasses: []
  213. }),
  214. smalltalk.BlockClosure);
  215. smalltalk.addMethod(
  216. unescape('_whileFalse_'),
  217. smalltalk.method({
  218. selector: unescape('whileFalse%3A'),
  219. category: 'controlling',
  220. fn: function (aBlock){
  221. var self=this;
  222. while(!self()) {aBlock()};
  223. return self;},
  224. args: ["aBlock"],
  225. source: unescape('whileFalse%3A%20aBlock%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Cwhile%28%21self%28%29%29%20%7BaBlock%28%29%7D%3E'),
  226. messageSends: [],
  227. referencedClasses: []
  228. }),
  229. smalltalk.BlockClosure);
  230. smalltalk.addMethod(
  231. unescape('_value'),
  232. smalltalk.method({
  233. selector: unescape('value'),
  234. category: 'evaluating',
  235. fn: function (){
  236. var self=this;
  237. return self();;
  238. return self;},
  239. args: [],
  240. source: unescape('value%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28%29%3B%3E'),
  241. messageSends: [],
  242. referencedClasses: []
  243. }),
  244. smalltalk.BlockClosure);
  245. smalltalk.addMethod(
  246. unescape('_value_'),
  247. smalltalk.method({
  248. selector: unescape('value%3A'),
  249. category: 'evaluating',
  250. fn: function (anArg){
  251. var self=this;
  252. return self(anArg);;
  253. return self;},
  254. args: ["anArg"],
  255. source: unescape('value%3A%20anArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28anArg%29%3B%3E'),
  256. messageSends: [],
  257. referencedClasses: []
  258. }),
  259. smalltalk.BlockClosure);
  260. smalltalk.addMethod(
  261. unescape('_value_value_'),
  262. smalltalk.method({
  263. selector: unescape('value%3Avalue%3A'),
  264. category: 'evaluating',
  265. fn: function (firstArg, secondArg){
  266. var self=this;
  267. return self(firstArg, secondArg);;
  268. return self;},
  269. args: ["firstArg", "secondArg"],
  270. source: unescape('value%3A%20firstArg%20value%3A%20secondArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28firstArg%2C%20secondArg%29%3B%3E'),
  271. messageSends: [],
  272. referencedClasses: []
  273. }),
  274. smalltalk.BlockClosure);
  275. smalltalk.addMethod(
  276. unescape('_value_value_value_'),
  277. smalltalk.method({
  278. selector: unescape('value%3Avalue%3Avalue%3A'),
  279. category: 'evaluating',
  280. fn: function (firstArg, secondArg, thirdArg){
  281. var self=this;
  282. return self(firstArg, secondArg, thirdArg);;
  283. return self;},
  284. args: ["firstArg", "secondArg", "thirdArg"],
  285. source: unescape('value%3A%20firstArg%20value%3A%20secondArg%20value%3A%20thirdArg%0A%09%22inlined%20in%20the%20Compiler%22%0A%09%3Creturn%20self%28firstArg%2C%20secondArg%2C%20thirdArg%29%3B%3E'),
  286. messageSends: [],
  287. referencedClasses: []
  288. }),
  289. smalltalk.BlockClosure);
  290. smalltalk.addMethod(
  291. unescape('_valueWithPossibleArguments_'),
  292. smalltalk.method({
  293. selector: unescape('valueWithPossibleArguments%3A'),
  294. category: 'evaluating',
  295. fn: function (aCollection){
  296. var self=this;
  297. return self.apply(null, aCollection);;
  298. return self;},
  299. args: ["aCollection"],
  300. source: unescape('valueWithPossibleArguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28null%2C%20aCollection%29%3B%3E'),
  301. messageSends: [],
  302. referencedClasses: []
  303. }),
  304. smalltalk.BlockClosure);
  305. smalltalk.addMethod(
  306. unescape('_on_do_'),
  307. smalltalk.method({
  308. selector: unescape('on%3Ado%3A'),
  309. category: 'error handling',
  310. fn: function (anErrorClass, aBlock){
  311. var self=this;
  312. 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", []);})]));})]);
  313. return self;},
  314. args: ["anErrorClass", "aBlock"],
  315. source: unescape('on%3A%20anErrorClass%20do%3A%20aBlock%0A%09%5Eself%20try%3A%20self%20catch%3A%20%5B%3Aerror%20%7C%0A%09%20%20%20%20%28error%20isKindOf%3A%20anErrorClass%29%20%0A%09%20%20%20%20%20ifTrue%3A%20%5BaBlock%20value%3A%20error%5D%0A%09%20%20%20%20%20ifFalse%3A%20%5Berror%20signal%5D%5D'),
  316. messageSends: ["try:catch:", "ifTrue:ifFalse:", "isKindOf:", "value:", "signal"],
  317. referencedClasses: []
  318. }),
  319. smalltalk.BlockClosure);
  320. smalltalk.addMethod(
  321. unescape('_valueWithTimeout_'),
  322. smalltalk.method({
  323. selector: unescape('valueWithTimeout%3A'),
  324. category: 'timeout/interval',
  325. fn: function (aNumber){
  326. var self=this;
  327. return setTimeout(self, aNumber);
  328. return self;},
  329. args: ["aNumber"],
  330. source: unescape('valueWithTimeout%3A%20aNumber%0A%09%3Creturn%20setTimeout%28self%2C%20aNumber%29%3E'),
  331. messageSends: [],
  332. referencedClasses: []
  333. }),
  334. smalltalk.BlockClosure);
  335. smalltalk.addMethod(
  336. unescape('_valueWithInterval_'),
  337. smalltalk.method({
  338. selector: unescape('valueWithInterval%3A'),
  339. category: 'timeout/interval',
  340. fn: function (aNumber){
  341. var self=this;
  342. return setInterval(self, aNumber);
  343. return self;},
  344. args: ["aNumber"],
  345. source: unescape('valueWithInterval%3A%20aNumber%0A%09%3Creturn%20setInterval%28self%2C%20aNumber%29%3E'),
  346. messageSends: [],
  347. referencedClasses: []
  348. }),
  349. smalltalk.BlockClosure);
  350. smalltalk.addMethod(
  351. unescape('_whileFalse'),
  352. smalltalk.method({
  353. selector: unescape('whileFalse'),
  354. category: 'controlling',
  355. fn: function (){
  356. var self=this;
  357. smalltalk.send(self, "_whileFalse_", [(function(){return nil;})]);
  358. return self;},
  359. args: [],
  360. source: unescape('whileFalse%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileFalse%3A%20%5B%5D'),
  361. messageSends: ["whileFalse:"],
  362. referencedClasses: []
  363. }),
  364. smalltalk.BlockClosure);
  365. smalltalk.addMethod(
  366. unescape('_whileTrue'),
  367. smalltalk.method({
  368. selector: unescape('whileTrue'),
  369. category: 'controlling',
  370. fn: function (){
  371. var self=this;
  372. smalltalk.send(self, "_whileTrue_", [(function(){return nil;})]);
  373. return self;},
  374. args: [],
  375. source: unescape('whileTrue%0A%09%22inlined%20in%20the%20Compiler%22%0A%09self%20whileTrue%3A%20%5B%5D'),
  376. messageSends: ["whileTrue:"],
  377. referencedClasses: []
  378. }),
  379. smalltalk.BlockClosure);
  380. smalltalk.addMethod(
  381. unescape('_new'),
  382. smalltalk.method({
  383. selector: unescape('new'),
  384. category: 'evaluating',
  385. fn: function (){
  386. var self=this;
  387. return new self();
  388. return self;},
  389. args: [],
  390. source: unescape('new%0A%09%22Use%20the%20receiver%20as%20a%20JS%20constructor.%20%0A%09*Do%20not*%20use%20this%20method%20to%20instanciate%20Smalltalk%20objects%21%22%0A%09%3Creturn%20new%20self%28%29%3E'),
  391. messageSends: [],
  392. referencedClasses: []
  393. }),
  394. smalltalk.BlockClosure);
  395. smalltalk.addMethod(
  396. unescape('_applyTo_arguments_'),
  397. smalltalk.method({
  398. selector: unescape('applyTo%3Aarguments%3A'),
  399. category: 'evaluating',
  400. fn: function (anObject, aCollection){
  401. var self=this;
  402. return self.apply(anObject, aCollection);
  403. return self;},
  404. args: ["anObject", "aCollection"],
  405. source: unescape('applyTo%3A%20anObject%20arguments%3A%20aCollection%0A%09%3Creturn%20self.apply%28anObject%2C%20aCollection%29%3E'),
  406. messageSends: [],
  407. referencedClasses: []
  408. }),
  409. smalltalk.BlockClosure);
  410. smalltalk.addMethod(
  411. unescape('_timeToRun'),
  412. smalltalk.method({
  413. selector: unescape('timeToRun'),
  414. category: 'evaluating',
  415. fn: function (){
  416. var self=this;
  417. return smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [self]);
  418. return self;},
  419. args: [],
  420. source: unescape('timeToRun%0A%09%22Answer%20the%20number%20of%20milliseconds%20taken%20to%20execute%20this%20block.%22%0A%0A%09%5E%20Date%20millisecondsToRun%3A%20self'),
  421. messageSends: ["millisecondsToRun:"],
  422. referencedClasses: ["Date"]
  423. }),
  424. smalltalk.BlockClosure);
  425. smalltalk.addMethod(
  426. unescape('_numArgs'),
  427. smalltalk.method({
  428. selector: unescape('numArgs'),
  429. category: 'accessing',
  430. fn: function (){
  431. var self=this;
  432. return self.length;
  433. return self;},
  434. args: [],
  435. source: unescape('numArgs%0A%09%3Creturn%20self.length%3E'),
  436. messageSends: [],
  437. referencedClasses: []
  438. }),
  439. smalltalk.BlockClosure);
  440. smalltalk.addMethod(
  441. unescape('_ensure_'),
  442. smalltalk.method({
  443. selector: unescape('ensure%3A'),
  444. category: 'evaluating',
  445. fn: function (aBlock){
  446. var self=this;
  447. var success=nil;
  448. success=false;
  449. 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", []);})]);
  450. return self;},
  451. args: ["aBlock"],
  452. source: unescape('ensure%3A%20aBlock%0A%09%7C%20success%20%7C%0A%09success%20%3A%3D%20false.%0A%09%5E%5Bself%20value.%20success%20%3A%3D%20true.%20aBlock%20value%5D%0A%09%09on%3A%20Error%0A%09%09do%3A%20%5B%3Aex%20%7C%0A%09%09%09success%20ifFalse%3A%20%5BaBlock%20value%5D.%0A%09%09%09ex%20signal%5D'),
  453. messageSends: ["on:do:", "value", "ifFalse:", "signal"],
  454. referencedClasses: ["Error"]
  455. }),
  456. smalltalk.BlockClosure);
  457. smalltalk.addMethod(
  458. unescape('_newValue_'),
  459. smalltalk.method({
  460. selector: unescape('newValue%3A'),
  461. category: 'evaluating',
  462. fn: function (anObject){
  463. var self=this;
  464. return new self(anObject);
  465. return self;},
  466. args: ["anObject"],
  467. source: unescape('newValue%3A%20anObject%0A%09%22Use%20the%20receiver%20as%20a%20JS%20constructor.%20%0A%09*Do%20not*%20use%20this%20method%20to%20instanciate%20Smalltalk%20objects%21%22%0A%09%3Creturn%20new%20self%28anObject%29%3E'),
  468. messageSends: [],
  469. referencedClasses: []
  470. }),
  471. smalltalk.BlockClosure);
  472. smalltalk.addMethod(
  473. unescape('_newValue_value_'),
  474. smalltalk.method({
  475. selector: unescape('newValue%3Avalue%3A'),
  476. category: 'evaluating',
  477. fn: function (anObject, anObject2){
  478. var self=this;
  479. return new self(anObject, anObject2);
  480. return self;},
  481. args: ["anObject", "anObject2"],
  482. source: unescape('newValue%3A%20%20anObject%20value%3A%20anObject2%0A%09%22Use%20the%20receiver%20as%20a%20JS%20constructor.%20%0A%09*Do%20not*%20use%20this%20method%20to%20instanciate%20Smalltalk%20objects%21%22%0A%09%3Creturn%20new%20self%28anObject%2C%20anObject2%29%3E'),
  483. messageSends: [],
  484. referencedClasses: []
  485. }),
  486. smalltalk.BlockClosure);
  487. smalltalk.addMethod(
  488. unescape('_newValue_value_value_'),
  489. smalltalk.method({
  490. selector: unescape('newValue%3Avalue%3Avalue%3A'),
  491. category: 'evaluating',
  492. fn: function (anObject, anObject2, anObject3){
  493. var self=this;
  494. return new self(anObject, anObject2);
  495. return self;},
  496. args: ["anObject", "anObject2", "anObject3"],
  497. source: unescape('newValue%3A%20%20anObject%20value%3A%20anObject2%20value%3A%20anObject3%0A%09%22Use%20the%20receiver%20as%20a%20JS%20constructor.%20%0A%09*Do%20not*%20use%20this%20method%20to%20instanciate%20Smalltalk%20objects%21%22%0A%09%3Creturn%20new%20self%28anObject%2C%20anObject2%29%3E'),
  498. messageSends: [],
  499. referencedClasses: []
  500. }),
  501. smalltalk.BlockClosure);
  502. smalltalk.addClass('MethodContext', smalltalk.Object, [], 'Kernel-Methods');
  503. smalltalk.addMethod(
  504. unescape('_receiver'),
  505. smalltalk.method({
  506. selector: unescape('receiver'),
  507. category: 'accessing',
  508. fn: function (){
  509. var self=this;
  510. return self.receiver;
  511. return self;},
  512. args: [],
  513. source: unescape('receiver%0A%09%3Creturn%20self.receiver%3E'),
  514. messageSends: [],
  515. referencedClasses: []
  516. }),
  517. smalltalk.MethodContext);
  518. smalltalk.addMethod(
  519. unescape('_selector'),
  520. smalltalk.method({
  521. selector: unescape('selector'),
  522. category: 'accessing',
  523. fn: function (){
  524. var self=this;
  525. return smalltalk.convertSelector(self.selector);
  526. return self;},
  527. args: [],
  528. source: unescape('selector%0A%09%3Creturn%20smalltalk.convertSelector%28self.selector%29%3E'),
  529. messageSends: [],
  530. referencedClasses: []
  531. }),
  532. smalltalk.MethodContext);
  533. smalltalk.addMethod(
  534. unescape('_home'),
  535. smalltalk.method({
  536. selector: unescape('home'),
  537. category: 'accessing',
  538. fn: function (){
  539. var self=this;
  540. return self.homeContext;
  541. return self;},
  542. args: [],
  543. source: unescape('home%0A%09%3Creturn%20self.homeContext%3E'),
  544. messageSends: [],
  545. referencedClasses: []
  546. }),
  547. smalltalk.MethodContext);
  548. smalltalk.addMethod(
  549. unescape('_temps'),
  550. smalltalk.method({
  551. selector: unescape('temps'),
  552. category: 'accessing',
  553. fn: function (){
  554. var self=this;
  555. return self.temps;
  556. return self;},
  557. args: [],
  558. source: unescape('temps%0A%09%3Creturn%20self.temps%3E'),
  559. messageSends: [],
  560. referencedClasses: []
  561. }),
  562. smalltalk.MethodContext);
  563. smalltalk.addMethod(
  564. unescape('_printString'),
  565. smalltalk.method({
  566. selector: unescape('printString'),
  567. category: 'accessing',
  568. fn: function (){
  569. var self=this;
  570. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.Object), "__comma", [unescape("%28")]), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [unescape("%29")]);
  571. return self;},
  572. args: [],
  573. source: unescape('printString%0A%09%5Esuper%20printString%2C%20%27%28%27%2C%20self%20asString%2C%20%27%29%27'),
  574. messageSends: [unescape("%2C"), "printString", "asString"],
  575. referencedClasses: []
  576. }),
  577. smalltalk.MethodContext);
  578. smalltalk.addMethod(
  579. unescape('_asString'),
  580. smalltalk.method({
  581. selector: unescape('asString'),
  582. category: 'accessing',
  583. fn: function (){
  584. var self=this;
  585. 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", [])]);
  586. return self;},
  587. args: [],
  588. source: unescape('asString%0A%09%5Eself%20receiver%20class%20printString%2C%20%27%20%3E%3E%20%27%2C%20self%20selector'),
  589. messageSends: [unescape("%2C"), "printString", "class", "receiver", "selector"],
  590. referencedClasses: []
  591. }),
  592. smalltalk.MethodContext);
  593. smalltalk.addClass('Message', smalltalk.Object, ['selector', 'arguments'], 'Kernel-Methods');
  594. smalltalk.addMethod(
  595. unescape('_selector'),
  596. smalltalk.method({
  597. selector: unescape('selector'),
  598. category: 'accessing',
  599. fn: function (){
  600. var self=this;
  601. return self['@selector'];
  602. return self;},
  603. args: [],
  604. source: unescape('selector%0A%09%5Eselector'),
  605. messageSends: [],
  606. referencedClasses: []
  607. }),
  608. smalltalk.Message);
  609. smalltalk.addMethod(
  610. unescape('_selector_'),
  611. smalltalk.method({
  612. selector: unescape('selector%3A'),
  613. category: 'accessing',
  614. fn: function (aString){
  615. var self=this;
  616. self['@selector']=aString;
  617. return self;},
  618. args: ["aString"],
  619. source: unescape('selector%3A%20aString%0A%09selector%20%3A%3D%20aString'),
  620. messageSends: [],
  621. referencedClasses: []
  622. }),
  623. smalltalk.Message);
  624. smalltalk.addMethod(
  625. unescape('_arguments_'),
  626. smalltalk.method({
  627. selector: unescape('arguments%3A'),
  628. category: 'accessing',
  629. fn: function (anArray){
  630. var self=this;
  631. self['@arguments']=anArray;
  632. return self;},
  633. args: ["anArray"],
  634. source: unescape('arguments%3A%20anArray%0A%09arguments%20%3A%3D%20anArray'),
  635. messageSends: [],
  636. referencedClasses: []
  637. }),
  638. smalltalk.Message);
  639. smalltalk.addMethod(
  640. unescape('_arguments'),
  641. smalltalk.method({
  642. selector: unescape('arguments'),
  643. category: 'accessing',
  644. fn: function (){
  645. var self=this;
  646. return self['@arguments'];
  647. return self;},
  648. args: [],
  649. source: unescape('arguments%0A%09%5Earguments'),
  650. messageSends: [],
  651. referencedClasses: []
  652. }),
  653. smalltalk.Message);
  654. smalltalk.addMethod(
  655. unescape('_printString'),
  656. smalltalk.method({
  657. selector: unescape('printString'),
  658. category: 'printing',
  659. fn: function (){
  660. var self=this;
  661. 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);})]);
  662. return self;},
  663. args: [],
  664. source: unescape('printString%0A%09%5E%20String%20streamContents%3A%20%5B%3AaStream%7C%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09aStream%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20super%20printString%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20%27%28%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20selector%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20%27%29%27%20%09%09%09%09%5D'),
  665. messageSends: ["streamContents:", "nextPutAll:", "printString"],
  666. referencedClasses: ["String"]
  667. }),
  668. smalltalk.Message);
  669. smalltalk.addMethod(
  670. unescape('_selector_arguments_'),
  671. smalltalk.method({
  672. selector: unescape('selector%3Aarguments%3A'),
  673. category: 'instance creation',
  674. fn: function (aString, anArray){
  675. var self=this;
  676. return (function($rec){smalltalk.send($rec, "_selector_", [aString]);smalltalk.send($rec, "_arguments_", [anArray]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  677. return self;},
  678. args: ["aString", "anArray"],
  679. source: unescape('selector%3A%20aString%20arguments%3A%20anArray%0A%09%5Eself%20new%0A%09%09selector%3A%20aString%3B%0A%09%09arguments%3A%20anArray%3B%0A%09%09yourself'),
  680. messageSends: ["selector:", "arguments:", "yourself", "new"],
  681. referencedClasses: []
  682. }),
  683. smalltalk.Message.klass);