Kernel-Methods.deploy.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844
  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) {
  183. var interval = setInterval(self, aNumber);
  184. return smalltalk.Timeout._on_(interval);
  185. ;
  186. return self}, self, "valueWithInterval:", [aNumber], smalltalk.BlockClosure)}
  187. }),
  188. smalltalk.BlockClosure);
  189. smalltalk.addMethod(
  190. "_valueWithPossibleArguments_",
  191. smalltalk.method({
  192. selector: "valueWithPossibleArguments:",
  193. fn: function (aCollection){
  194. var self=this;
  195. return smalltalk.withContext(function($ctx1) { return self.apply(null, aCollection);;
  196. ;
  197. return self}, self, "valueWithPossibleArguments:", [aCollection], smalltalk.BlockClosure)}
  198. }),
  199. smalltalk.BlockClosure);
  200. smalltalk.addMethod(
  201. "_valueWithTimeout_",
  202. smalltalk.method({
  203. selector: "valueWithTimeout:",
  204. fn: function (aNumber){
  205. var self=this;
  206. return smalltalk.withContext(function($ctx1) {
  207. var timeout = setTimeout(self, aNumber);
  208. return smalltalk.Timeout._on_(timeout);
  209. ;
  210. return self}, self, "valueWithTimeout:", [aNumber], smalltalk.BlockClosure)}
  211. }),
  212. smalltalk.BlockClosure);
  213. smalltalk.addMethod(
  214. "_whileFalse",
  215. smalltalk.method({
  216. selector: "whileFalse",
  217. fn: function (){
  218. var self=this;
  219. return smalltalk.withContext(function($ctx1) { _st(self)._whileFalse_((function(){
  220. return smalltalk.withContext(function($ctx2) { })}));
  221. return self}, self, "whileFalse", [], smalltalk.BlockClosure)}
  222. }),
  223. smalltalk.BlockClosure);
  224. smalltalk.addMethod(
  225. "_whileFalse_",
  226. smalltalk.method({
  227. selector: "whileFalse:",
  228. fn: function (aBlock){
  229. var self=this;
  230. return smalltalk.withContext(function($ctx1) { while(!self()) {aBlock()};
  231. ;
  232. return self}, self, "whileFalse:", [aBlock], smalltalk.BlockClosure)}
  233. }),
  234. smalltalk.BlockClosure);
  235. smalltalk.addMethod(
  236. "_whileTrue",
  237. smalltalk.method({
  238. selector: "whileTrue",
  239. fn: function (){
  240. var self=this;
  241. return smalltalk.withContext(function($ctx1) { _st(self)._whileTrue_((function(){
  242. return smalltalk.withContext(function($ctx2) { })}));
  243. return self}, self, "whileTrue", [], smalltalk.BlockClosure)}
  244. }),
  245. smalltalk.BlockClosure);
  246. smalltalk.addMethod(
  247. "_whileTrue_",
  248. smalltalk.method({
  249. selector: "whileTrue:",
  250. fn: function (aBlock){
  251. var self=this;
  252. return smalltalk.withContext(function($ctx1) { while(self()) {aBlock()};
  253. ;
  254. return self}, self, "whileTrue:", [aBlock], smalltalk.BlockClosure)}
  255. }),
  256. smalltalk.BlockClosure);
  257. smalltalk.addClass('CompiledMethod', smalltalk.Object, [], 'Kernel-Methods');
  258. smalltalk.addMethod(
  259. "_arguments",
  260. smalltalk.method({
  261. selector: "arguments",
  262. fn: function (){
  263. var self=this;
  264. return smalltalk.withContext(function($ctx1) { return self.args || [];
  265. ;
  266. return self}, self, "arguments", [], smalltalk.CompiledMethod)}
  267. }),
  268. smalltalk.CompiledMethod);
  269. smalltalk.addMethod(
  270. "_category",
  271. smalltalk.method({
  272. selector: "category",
  273. fn: function (){
  274. var self=this;
  275. return smalltalk.withContext(function($ctx1) { var $2,$1;
  276. $2=_st(self)._basicAt_("category");
  277. if(($receiver = $2) == nil || $receiver == undefined){
  278. $1="";
  279. } else {
  280. $1=$2;
  281. };
  282. return $1;
  283. }, self, "category", [], smalltalk.CompiledMethod)}
  284. }),
  285. smalltalk.CompiledMethod);
  286. smalltalk.addMethod(
  287. "_category_",
  288. smalltalk.method({
  289. selector: "category:",
  290. fn: function (aString){
  291. var self=this;
  292. return smalltalk.withContext(function($ctx1) { var $1;
  293. $ctx1.locals.oldCategory=nil;
  294. $ctx1.locals.oldCategory=_st(self)._category();
  295. _st(self)._basicAt_put_("category",aString);
  296. $1=_st(self)._methodClass();
  297. if(($receiver = $1) == nil || $receiver == undefined){
  298. $1;
  299. } else {
  300. _st(_st(_st(self)._methodClass())._organization())._addElement_(aString);
  301. _st(_st(_st(_st(self)._methodClass())._methods())._select_((function(each){
  302. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._category()).__eq($ctx1.locals.oldCategory);
  303. })})))._ifEmpty_((function(){
  304. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._methodClass())._organization())._removeElement_($ctx1.locals.oldCategory);
  305. })}));
  306. };
  307. return self}, self, "category:", [aString], smalltalk.CompiledMethod)}
  308. }),
  309. smalltalk.CompiledMethod);
  310. smalltalk.addMethod(
  311. "_fn",
  312. smalltalk.method({
  313. selector: "fn",
  314. fn: function (){
  315. var self=this;
  316. return smalltalk.withContext(function($ctx1) { var $1;
  317. $1=_st(self)._basicAt_("fn");
  318. return $1;
  319. }, self, "fn", [], smalltalk.CompiledMethod)}
  320. }),
  321. smalltalk.CompiledMethod);
  322. smalltalk.addMethod(
  323. "_fn_",
  324. smalltalk.method({
  325. selector: "fn:",
  326. fn: function (aBlock){
  327. var self=this;
  328. return smalltalk.withContext(function($ctx1) { _st(self)._basicAt_put_("fn",aBlock);
  329. return self}, self, "fn:", [aBlock], smalltalk.CompiledMethod)}
  330. }),
  331. smalltalk.CompiledMethod);
  332. smalltalk.addMethod(
  333. "_messageSends",
  334. smalltalk.method({
  335. selector: "messageSends",
  336. fn: function (){
  337. var self=this;
  338. return smalltalk.withContext(function($ctx1) { var $1;
  339. $1=_st(self)._basicAt_("messageSends");
  340. return $1;
  341. }, self, "messageSends", [], smalltalk.CompiledMethod)}
  342. }),
  343. smalltalk.CompiledMethod);
  344. smalltalk.addMethod(
  345. "_methodClass",
  346. smalltalk.method({
  347. selector: "methodClass",
  348. fn: function (){
  349. var self=this;
  350. return smalltalk.withContext(function($ctx1) { var $1;
  351. $1=_st(self)._basicAt_("methodClass");
  352. return $1;
  353. }, self, "methodClass", [], smalltalk.CompiledMethod)}
  354. }),
  355. smalltalk.CompiledMethod);
  356. smalltalk.addMethod(
  357. "_protocol",
  358. smalltalk.method({
  359. selector: "protocol",
  360. fn: function (){
  361. var self=this;
  362. return smalltalk.withContext(function($ctx1) { var $1;
  363. $1=_st(self)._category();
  364. return $1;
  365. }, self, "protocol", [], smalltalk.CompiledMethod)}
  366. }),
  367. smalltalk.CompiledMethod);
  368. smalltalk.addMethod(
  369. "_referencedClasses",
  370. smalltalk.method({
  371. selector: "referencedClasses",
  372. fn: function (){
  373. var self=this;
  374. return smalltalk.withContext(function($ctx1) { var $1;
  375. $1=_st(self)._basicAt_("referencedClasses");
  376. return $1;
  377. }, self, "referencedClasses", [], smalltalk.CompiledMethod)}
  378. }),
  379. smalltalk.CompiledMethod);
  380. smalltalk.addMethod(
  381. "_selector",
  382. smalltalk.method({
  383. selector: "selector",
  384. fn: function (){
  385. var self=this;
  386. return smalltalk.withContext(function($ctx1) { var $1;
  387. $1=_st(self)._basicAt_("selector");
  388. return $1;
  389. }, self, "selector", [], smalltalk.CompiledMethod)}
  390. }),
  391. smalltalk.CompiledMethod);
  392. smalltalk.addMethod(
  393. "_selector_",
  394. smalltalk.method({
  395. selector: "selector:",
  396. fn: function (aString){
  397. var self=this;
  398. return smalltalk.withContext(function($ctx1) { _st(self)._basicAt_put_("selector",aString);
  399. return self}, self, "selector:", [aString], smalltalk.CompiledMethod)}
  400. }),
  401. smalltalk.CompiledMethod);
  402. smalltalk.addMethod(
  403. "_source",
  404. smalltalk.method({
  405. selector: "source",
  406. fn: function (){
  407. var self=this;
  408. return smalltalk.withContext(function($ctx1) { var $2,$1;
  409. $2=_st(self)._basicAt_("source");
  410. if(($receiver = $2) == nil || $receiver == undefined){
  411. $1="";
  412. } else {
  413. $1=$2;
  414. };
  415. return $1;
  416. }, self, "source", [], smalltalk.CompiledMethod)}
  417. }),
  418. smalltalk.CompiledMethod);
  419. smalltalk.addMethod(
  420. "_source_",
  421. smalltalk.method({
  422. selector: "source:",
  423. fn: function (aString){
  424. var self=this;
  425. return smalltalk.withContext(function($ctx1) { _st(self)._basicAt_put_("source",aString);
  426. return self}, self, "source:", [aString], smalltalk.CompiledMethod)}
  427. }),
  428. smalltalk.CompiledMethod);
  429. smalltalk.addClass('ForkPool', smalltalk.Object, ['poolSize', 'maxPoolSize', 'queue', 'worker'], 'Kernel-Methods');
  430. smalltalk.addMethod(
  431. "_addWorker",
  432. smalltalk.method({
  433. selector: "addWorker",
  434. fn: function (){
  435. var self=this;
  436. return smalltalk.withContext(function($ctx1) { _st(self["@worker"])._valueWithTimeout_((0));
  437. self["@poolSize"]=_st(self["@poolSize"]).__plus((1));
  438. return self}, self, "addWorker", [], smalltalk.ForkPool)}
  439. }),
  440. smalltalk.ForkPool);
  441. smalltalk.addMethod(
  442. "_defaultMaxPoolSize",
  443. smalltalk.method({
  444. selector: "defaultMaxPoolSize",
  445. fn: function (){
  446. var self=this;
  447. return smalltalk.withContext(function($ctx1) { var $1;
  448. $1=_st(_st(self)._class())._defaultMaxPoolSize();
  449. return $1;
  450. }, self, "defaultMaxPoolSize", [], smalltalk.ForkPool)}
  451. }),
  452. smalltalk.ForkPool);
  453. smalltalk.addMethod(
  454. "_fork_",
  455. smalltalk.method({
  456. selector: "fork:",
  457. fn: function (aBlock){
  458. var self=this;
  459. return smalltalk.withContext(function($ctx1) { var $1;
  460. $1=_st(self["@poolSize"]).__lt(_st(self)._maxPoolSize());
  461. if(smalltalk.assert($1)){
  462. _st(self)._addWorker();
  463. };
  464. _st(self["@queue"])._back_(aBlock);
  465. return self}, self, "fork:", [aBlock], smalltalk.ForkPool)}
  466. }),
  467. smalltalk.ForkPool);
  468. smalltalk.addMethod(
  469. "_initialize",
  470. smalltalk.method({
  471. selector: "initialize",
  472. fn: function (){
  473. var self=this;
  474. return smalltalk.withContext(function($ctx1) { smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  475. self["@poolSize"]=(0);
  476. self["@queue"]=_st((smalltalk.Queue || Queue))._new();
  477. self["@worker"]=_st(self)._makeWorker();
  478. return self}, self, "initialize", [], smalltalk.ForkPool)}
  479. }),
  480. smalltalk.ForkPool);
  481. smalltalk.addMethod(
  482. "_makeWorker",
  483. smalltalk.method({
  484. selector: "makeWorker",
  485. fn: function (){
  486. var self=this;
  487. return smalltalk.withContext(function($ctx1) { var $2,$1;
  488. $ctx1.locals.sentinel=nil;
  489. $ctx1.locals.sentinel=_st((smalltalk.Object || Object))._new();
  490. $1=(function(){
  491. return smalltalk.withContext(function($ctx2) { $ctx2.locals.block=nil;
  492. self["@poolSize"]=_st(self["@poolSize"]).__minus((1));
  493. self["@poolSize"];
  494. $ctx2.locals.block=_st(self["@queue"])._frontIfAbsent_((function(){
  495. return smalltalk.withContext(function($ctx3) { return $ctx1.locals.sentinel;
  496. })}));
  497. $ctx2.locals.block;
  498. $2=_st($ctx2.locals.block).__eq_eq($ctx1.locals.sentinel);
  499. if(! smalltalk.assert($2)){
  500. return _st((function(){
  501. return smalltalk.withContext(function($ctx3) { return _st($ctx2.locals.block)._value();
  502. })}))._ensure_((function(){
  503. return smalltalk.withContext(function($ctx3) { return _st(self)._addWorker();
  504. })}));
  505. };
  506. })});
  507. return $1;
  508. }, self, "makeWorker", [], smalltalk.ForkPool)}
  509. }),
  510. smalltalk.ForkPool);
  511. smalltalk.addMethod(
  512. "_maxPoolSize",
  513. smalltalk.method({
  514. selector: "maxPoolSize",
  515. fn: function (){
  516. var self=this;
  517. return smalltalk.withContext(function($ctx1) { var $2,$1;
  518. $2=self["@maxPoolSize"];
  519. if(($receiver = $2) == nil || $receiver == undefined){
  520. $1=_st(self)._defaultMaxPoolSize();
  521. } else {
  522. $1=$2;
  523. };
  524. return $1;
  525. }, self, "maxPoolSize", [], smalltalk.ForkPool)}
  526. }),
  527. smalltalk.ForkPool);
  528. smalltalk.addMethod(
  529. "_maxPoolSize_",
  530. smalltalk.method({
  531. selector: "maxPoolSize:",
  532. fn: function (anInteger){
  533. var self=this;
  534. return smalltalk.withContext(function($ctx1) { self["@maxPoolSize"]=anInteger;
  535. return self}, self, "maxPoolSize:", [anInteger], smalltalk.ForkPool)}
  536. }),
  537. smalltalk.ForkPool);
  538. smalltalk.ForkPool.klass.iVarNames = ['default'];
  539. smalltalk.addMethod(
  540. "_default",
  541. smalltalk.method({
  542. selector: "default",
  543. fn: function (){
  544. var self=this;
  545. return smalltalk.withContext(function($ctx1) { var $2,$1;
  546. $2=self["@default"];
  547. if(($receiver = $2) == nil || $receiver == undefined){
  548. self["@default"]=_st(self)._new();
  549. $1=self["@default"];
  550. } else {
  551. $1=$2;
  552. };
  553. return $1;
  554. }, self, "default", [], smalltalk.ForkPool.klass)}
  555. }),
  556. smalltalk.ForkPool.klass);
  557. smalltalk.addMethod(
  558. "_defaultMaxPoolSize",
  559. smalltalk.method({
  560. selector: "defaultMaxPoolSize",
  561. fn: function (){
  562. var self=this;
  563. return smalltalk.withContext(function($ctx1) { return (100);
  564. }, self, "defaultMaxPoolSize", [], smalltalk.ForkPool.klass)}
  565. }),
  566. smalltalk.ForkPool.klass);
  567. smalltalk.addMethod(
  568. "_resetDefault",
  569. smalltalk.method({
  570. selector: "resetDefault",
  571. fn: function (){
  572. var self=this;
  573. return smalltalk.withContext(function($ctx1) { self["@default"]=nil;
  574. return self}, self, "resetDefault", [], smalltalk.ForkPool.klass)}
  575. }),
  576. smalltalk.ForkPool.klass);
  577. smalltalk.addClass('Message', smalltalk.Object, ['selector', 'arguments'], 'Kernel-Methods');
  578. smalltalk.addMethod(
  579. "_arguments",
  580. smalltalk.method({
  581. selector: "arguments",
  582. fn: function (){
  583. var self=this;
  584. return smalltalk.withContext(function($ctx1) { return self["@arguments"];
  585. }, self, "arguments", [], smalltalk.Message)}
  586. }),
  587. smalltalk.Message);
  588. smalltalk.addMethod(
  589. "_arguments_",
  590. smalltalk.method({
  591. selector: "arguments:",
  592. fn: function (anArray){
  593. var self=this;
  594. return smalltalk.withContext(function($ctx1) { self["@arguments"]=anArray;
  595. return self}, self, "arguments:", [anArray], smalltalk.Message)}
  596. }),
  597. smalltalk.Message);
  598. smalltalk.addMethod(
  599. "_printString",
  600. smalltalk.method({
  601. selector: "printString",
  602. fn: function (){
  603. var self=this;
  604. return smalltalk.withContext(function($ctx1) { var $2,$1;
  605. $1=_st((smalltalk.String || String))._streamContents_((function(aStream){
  606. return smalltalk.withContext(function($ctx2) { _st(aStream)._nextPutAll_(smalltalk.Object.fn.prototype._printString.apply(_st(self), []));
  607. _st(aStream)._nextPutAll_("(");
  608. _st(aStream)._nextPutAll_(self["@selector"]);
  609. $2=_st(aStream)._nextPutAll_(")");
  610. return $2;
  611. })}));
  612. return $1;
  613. }, self, "printString", [], smalltalk.Message)}
  614. }),
  615. smalltalk.Message);
  616. smalltalk.addMethod(
  617. "_selector",
  618. smalltalk.method({
  619. selector: "selector",
  620. fn: function (){
  621. var self=this;
  622. return smalltalk.withContext(function($ctx1) { return self["@selector"];
  623. }, self, "selector", [], smalltalk.Message)}
  624. }),
  625. smalltalk.Message);
  626. smalltalk.addMethod(
  627. "_selector_",
  628. smalltalk.method({
  629. selector: "selector:",
  630. fn: function (aString){
  631. var self=this;
  632. return smalltalk.withContext(function($ctx1) { self["@selector"]=aString;
  633. return self}, self, "selector:", [aString], smalltalk.Message)}
  634. }),
  635. smalltalk.Message);
  636. smalltalk.addMethod(
  637. "_sendTo_",
  638. smalltalk.method({
  639. selector: "sendTo:",
  640. fn: function (anObject){
  641. var self=this;
  642. return smalltalk.withContext(function($ctx1) { var $1;
  643. $1=_st(anObject)._perform_withArguments_(_st(self)._selector(),_st(self)._arguments());
  644. return $1;
  645. }, self, "sendTo:", [anObject], smalltalk.Message)}
  646. }),
  647. smalltalk.Message);
  648. smalltalk.addMethod(
  649. "_selector_arguments_",
  650. smalltalk.method({
  651. selector: "selector:arguments:",
  652. fn: function (aString,anArray){
  653. var self=this;
  654. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  655. $2=_st(self)._new();
  656. _st($2)._selector_(aString);
  657. _st($2)._arguments_(anArray);
  658. $3=_st($2)._yourself();
  659. $1=$3;
  660. return $1;
  661. }, self, "selector:arguments:", [aString,anArray], smalltalk.Message.klass)}
  662. }),
  663. smalltalk.Message.klass);
  664. smalltalk.addClass('MethodContext', smalltalk.Object, [], 'Kernel-Methods');
  665. smalltalk.addMethod(
  666. "_asString",
  667. smalltalk.method({
  668. selector: "asString",
  669. fn: function (){
  670. var self=this;
  671. return smalltalk.withContext(function($ctx1) { var $1;
  672. $1=_st(_st(_st(_st(_st(self)._receiver())._class())._printString()).__comma(" >> ")).__comma(_st(self)._selector());
  673. return $1;
  674. }, self, "asString", [], smalltalk.MethodContext)}
  675. }),
  676. smalltalk.MethodContext);
  677. smalltalk.addMethod(
  678. "_home",
  679. smalltalk.method({
  680. selector: "home",
  681. fn: function (){
  682. var self=this;
  683. return smalltalk.withContext(function($ctx1) { return self.homeContext;
  684. ;
  685. return self}, self, "home", [], smalltalk.MethodContext)}
  686. }),
  687. smalltalk.MethodContext);
  688. smalltalk.addMethod(
  689. "_locals",
  690. smalltalk.method({
  691. selector: "locals",
  692. fn: function (){
  693. var self=this;
  694. return smalltalk.withContext(function($ctx1) { return self.locals;
  695. ;
  696. return self}, self, "locals", [], smalltalk.MethodContext)}
  697. }),
  698. smalltalk.MethodContext);
  699. smalltalk.addMethod(
  700. "_outerContext",
  701. smalltalk.method({
  702. selector: "outerContext",
  703. fn: function (){
  704. var self=this;
  705. return smalltalk.withContext(function($ctx1) { var $1;
  706. $1=_st(self)._home();
  707. return $1;
  708. }, self, "outerContext", [], smalltalk.MethodContext)}
  709. }),
  710. smalltalk.MethodContext);
  711. smalltalk.addMethod(
  712. "_pc",
  713. smalltalk.method({
  714. selector: "pc",
  715. fn: function (){
  716. var self=this;
  717. return smalltalk.withContext(function($ctx1) { return self.pc;
  718. ;
  719. return self}, self, "pc", [], smalltalk.MethodContext)}
  720. }),
  721. smalltalk.MethodContext);
  722. smalltalk.addMethod(
  723. "_printString",
  724. smalltalk.method({
  725. selector: "printString",
  726. fn: function (){
  727. var self=this;
  728. return smalltalk.withContext(function($ctx1) { var $1;
  729. $1=_st(_st(_st(smalltalk.Object.fn.prototype._printString.apply(_st(self), [])).__comma("(")).__comma(_st(self)._asString())).__comma(")");
  730. return $1;
  731. }, self, "printString", [], smalltalk.MethodContext)}
  732. }),
  733. smalltalk.MethodContext);
  734. smalltalk.addMethod(
  735. "_receiver",
  736. smalltalk.method({
  737. selector: "receiver",
  738. fn: function (){
  739. var self=this;
  740. return smalltalk.withContext(function($ctx1) { return self.receiver;
  741. ;
  742. return self}, self, "receiver", [], smalltalk.MethodContext)}
  743. }),
  744. smalltalk.MethodContext);
  745. smalltalk.addMethod(
  746. "_selector",
  747. smalltalk.method({
  748. selector: "selector",
  749. fn: function (){
  750. var self=this;
  751. return smalltalk.withContext(function($ctx1) {
  752. if(self.selector) {
  753. return smalltalk.convertSelector(self.selector);
  754. } else {
  755. return nil;
  756. }
  757. ;
  758. ;
  759. return self}, self, "selector", [], smalltalk.MethodContext)}
  760. }),
  761. smalltalk.MethodContext);
  762. smalltalk.addMethod(
  763. "_temps",
  764. smalltalk.method({
  765. selector: "temps",
  766. fn: function (){
  767. var self=this;
  768. return smalltalk.withContext(function($ctx1) { var $1;
  769. $1=_st(self)._locals();
  770. return $1;
  771. }, self, "temps", [], smalltalk.MethodContext)}
  772. }),
  773. smalltalk.MethodContext);