Kernel-Methods.deploy.js 20 KB

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