2
0

Kernel-Methods.deploy.js 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365
  1. (function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Kernel-Methods');
  3. smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel-Methods');
  4. smalltalk.addMethod(
  5. smalltalk.method({
  6. selector: "applyTo:arguments:",
  7. fn: function (anObject,aCollection){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) {
  10. return self.apply(anObject, aCollection);
  11. return self}, function($ctx1) {$ctx1.fill(self,"applyTo:arguments:",{anObject:anObject,aCollection:aCollection},smalltalk.BlockClosure)})},
  12. messageSends: []}),
  13. smalltalk.BlockClosure);
  14. smalltalk.addMethod(
  15. smalltalk.method({
  16. selector: "asCompiledMethod:",
  17. fn: function (aString){
  18. var self=this;
  19. return smalltalk.withContext(function($ctx1) {
  20. return smalltalk.method({selector:aString, fn:self});;
  21. return self}, function($ctx1) {$ctx1.fill(self,"asCompiledMethod:",{aString:aString},smalltalk.BlockClosure)})},
  22. messageSends: []}),
  23. smalltalk.BlockClosure);
  24. smalltalk.addMethod(
  25. smalltalk.method({
  26. selector: "compiledSource",
  27. fn: function (){
  28. var self=this;
  29. return smalltalk.withContext(function($ctx1) {
  30. return self.toString();
  31. return self}, function($ctx1) {$ctx1.fill(self,"compiledSource",{},smalltalk.BlockClosure)})},
  32. messageSends: []}),
  33. smalltalk.BlockClosure);
  34. smalltalk.addMethod(
  35. smalltalk.method({
  36. selector: "currySelf",
  37. fn: function (){
  38. var self=this;
  39. return smalltalk.withContext(function($ctx1) {
  40. return function () {
  41. var args = [ this ];
  42. args.push.apply(args, arguments);
  43. return self.apply(null, args);
  44. }
  45. ;
  46. return self}, function($ctx1) {$ctx1.fill(self,"currySelf",{},smalltalk.BlockClosure)})},
  47. messageSends: []}),
  48. smalltalk.BlockClosure);
  49. smalltalk.addMethod(
  50. smalltalk.method({
  51. selector: "ensure:",
  52. fn: function (aBlock){
  53. var self=this;
  54. return smalltalk.withContext(function($ctx1) {
  55. try{return self._value()}finally{aBlock._value()};
  56. return self}, function($ctx1) {$ctx1.fill(self,"ensure:",{aBlock:aBlock},smalltalk.BlockClosure)})},
  57. messageSends: []}),
  58. smalltalk.BlockClosure);
  59. smalltalk.addMethod(
  60. smalltalk.method({
  61. selector: "fork",
  62. fn: function (){
  63. var self=this;
  64. function $ForkPool(){return smalltalk.ForkPool||(typeof ForkPool=="undefined"?nil:ForkPool)}
  65. return smalltalk.withContext(function($ctx1) {
  66. _st(_st($ForkPool())._default())._fork_(self);
  67. return self}, function($ctx1) {$ctx1.fill(self,"fork",{},smalltalk.BlockClosure)})},
  68. messageSends: ["fork:", "default"]}),
  69. smalltalk.BlockClosure);
  70. smalltalk.addMethod(
  71. smalltalk.method({
  72. selector: "new",
  73. fn: function (){
  74. var self=this;
  75. return smalltalk.withContext(function($ctx1) {
  76. return new self();
  77. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.BlockClosure)})},
  78. messageSends: []}),
  79. smalltalk.BlockClosure);
  80. smalltalk.addMethod(
  81. smalltalk.method({
  82. selector: "newValue:",
  83. fn: function (anObject){
  84. var self=this;
  85. return smalltalk.withContext(function($ctx1) {
  86. var $1;
  87. $1=self._newWithValues_([anObject]);
  88. return $1;
  89. }, function($ctx1) {$ctx1.fill(self,"newValue:",{anObject:anObject},smalltalk.BlockClosure)})},
  90. messageSends: ["newWithValues:"]}),
  91. smalltalk.BlockClosure);
  92. smalltalk.addMethod(
  93. smalltalk.method({
  94. selector: "newValue:value:",
  95. fn: function (anObject,anObject2){
  96. var self=this;
  97. return smalltalk.withContext(function($ctx1) {
  98. var $1;
  99. $1=self._newWithValues_([anObject,anObject2]);
  100. return $1;
  101. }, function($ctx1) {$ctx1.fill(self,"newValue:value:",{anObject:anObject,anObject2:anObject2},smalltalk.BlockClosure)})},
  102. messageSends: ["newWithValues:"]}),
  103. smalltalk.BlockClosure);
  104. smalltalk.addMethod(
  105. smalltalk.method({
  106. selector: "newValue:value:value:",
  107. fn: function (anObject,anObject2,anObject3){
  108. var self=this;
  109. return smalltalk.withContext(function($ctx1) {
  110. var $1;
  111. $1=self._newWithValues_([anObject,anObject2,anObject3]);
  112. return $1;
  113. }, function($ctx1) {$ctx1.fill(self,"newValue:value:value:",{anObject:anObject,anObject2:anObject2,anObject3:anObject3},smalltalk.BlockClosure)})},
  114. messageSends: ["newWithValues:"]}),
  115. smalltalk.BlockClosure);
  116. smalltalk.addMethod(
  117. smalltalk.method({
  118. selector: "newWithValues:",
  119. fn: function (aCollection){
  120. var self=this;
  121. return smalltalk.withContext(function($ctx1) {
  122. var constructor = function() {};
  123. constructor.prototype = self.prototype;
  124. var object = new constructor;
  125. var result = self.apply(object, aCollection);
  126. return typeof result === "object" ? result : object;;
  127. return self}, function($ctx1) {$ctx1.fill(self,"newWithValues:",{aCollection:aCollection},smalltalk.BlockClosure)})},
  128. messageSends: []}),
  129. smalltalk.BlockClosure);
  130. smalltalk.addMethod(
  131. smalltalk.method({
  132. selector: "numArgs",
  133. fn: function (){
  134. var self=this;
  135. return smalltalk.withContext(function($ctx1) {
  136. return self.length;
  137. return self}, function($ctx1) {$ctx1.fill(self,"numArgs",{},smalltalk.BlockClosure)})},
  138. messageSends: []}),
  139. smalltalk.BlockClosure);
  140. smalltalk.addMethod(
  141. smalltalk.method({
  142. selector: "on:do:",
  143. fn: function (anErrorClass,aBlock){
  144. var self=this;
  145. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  146. return smalltalk.withContext(function($ctx1) {
  147. var $2,$1;
  148. $1=self._try_catch_(self,(function(error){
  149. var smalltalkError;
  150. return smalltalk.withContext(function($ctx2) {
  151. smalltalkError=_st(_st($Smalltalk())._current())._asSmalltalkException_(error);
  152. smalltalkError;
  153. $2=_st(smalltalkError)._isKindOf_(anErrorClass);
  154. if(smalltalk.assert($2)){
  155. return _st(aBlock)._value_(smalltalkError);
  156. } else {
  157. return _st(smalltalkError)._resignal();
  158. };
  159. }, function($ctx2) {$ctx2.fillBlock({error:error,smalltalkError:smalltalkError},$ctx1)})}));
  160. return $1;
  161. }, function($ctx1) {$ctx1.fill(self,"on:do:",{anErrorClass:anErrorClass,aBlock:aBlock},smalltalk.BlockClosure)})},
  162. messageSends: ["try:catch:", "asSmalltalkException:", "current", "ifTrue:ifFalse:", "value:", "resignal", "isKindOf:"]}),
  163. smalltalk.BlockClosure);
  164. smalltalk.addMethod(
  165. smalltalk.method({
  166. selector: "receiver",
  167. fn: function (){
  168. var self=this;
  169. return smalltalk.withContext(function($ctx1) {
  170. return nil;
  171. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.BlockClosure)})},
  172. messageSends: []}),
  173. smalltalk.BlockClosure);
  174. smalltalk.addMethod(
  175. smalltalk.method({
  176. selector: "timeToRun",
  177. fn: function (){
  178. var self=this;
  179. function $Date(){return smalltalk.Date||(typeof Date=="undefined"?nil:Date)}
  180. return smalltalk.withContext(function($ctx1) {
  181. var $1;
  182. $1=_st($Date())._millisecondsToRun_(self);
  183. return $1;
  184. }, function($ctx1) {$ctx1.fill(self,"timeToRun",{},smalltalk.BlockClosure)})},
  185. messageSends: ["millisecondsToRun:"]}),
  186. smalltalk.BlockClosure);
  187. smalltalk.addMethod(
  188. smalltalk.method({
  189. selector: "value",
  190. fn: function (){
  191. var self=this;
  192. return smalltalk.withContext(function($ctx1) {
  193. return self();;
  194. return self}, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.BlockClosure)})},
  195. messageSends: []}),
  196. smalltalk.BlockClosure);
  197. smalltalk.addMethod(
  198. smalltalk.method({
  199. selector: "value:",
  200. fn: function (anArg){
  201. var self=this;
  202. return smalltalk.withContext(function($ctx1) {
  203. return self(anArg);;
  204. return self}, function($ctx1) {$ctx1.fill(self,"value:",{anArg:anArg},smalltalk.BlockClosure)})},
  205. messageSends: []}),
  206. smalltalk.BlockClosure);
  207. smalltalk.addMethod(
  208. smalltalk.method({
  209. selector: "value:value:",
  210. fn: function (firstArg,secondArg){
  211. var self=this;
  212. return smalltalk.withContext(function($ctx1) {
  213. return self(firstArg, secondArg);;
  214. return self}, function($ctx1) {$ctx1.fill(self,"value:value:",{firstArg:firstArg,secondArg:secondArg},smalltalk.BlockClosure)})},
  215. messageSends: []}),
  216. smalltalk.BlockClosure);
  217. smalltalk.addMethod(
  218. smalltalk.method({
  219. selector: "value:value:value:",
  220. fn: function (firstArg,secondArg,thirdArg){
  221. var self=this;
  222. return smalltalk.withContext(function($ctx1) {
  223. return self(firstArg, secondArg, thirdArg);;
  224. return self}, function($ctx1) {$ctx1.fill(self,"value:value:value:",{firstArg:firstArg,secondArg:secondArg,thirdArg:thirdArg},smalltalk.BlockClosure)})},
  225. messageSends: []}),
  226. smalltalk.BlockClosure);
  227. smalltalk.addMethod(
  228. smalltalk.method({
  229. selector: "valueWithInterval:",
  230. fn: function (aNumber){
  231. var self=this;
  232. return smalltalk.withContext(function($ctx1) {
  233. var interval = setInterval(self, aNumber);
  234. return smalltalk.Timeout._on_(interval);
  235. ;
  236. return self}, function($ctx1) {$ctx1.fill(self,"valueWithInterval:",{aNumber:aNumber},smalltalk.BlockClosure)})},
  237. messageSends: []}),
  238. smalltalk.BlockClosure);
  239. smalltalk.addMethod(
  240. smalltalk.method({
  241. selector: "valueWithPossibleArguments:",
  242. fn: function (aCollection){
  243. var self=this;
  244. return smalltalk.withContext(function($ctx1) {
  245. return self.apply(null, aCollection);;
  246. return self}, function($ctx1) {$ctx1.fill(self,"valueWithPossibleArguments:",{aCollection:aCollection},smalltalk.BlockClosure)})},
  247. messageSends: []}),
  248. smalltalk.BlockClosure);
  249. smalltalk.addMethod(
  250. smalltalk.method({
  251. selector: "valueWithTimeout:",
  252. fn: function (aNumber){
  253. var self=this;
  254. return smalltalk.withContext(function($ctx1) {
  255. var timeout = setTimeout(self, aNumber);
  256. return smalltalk.Timeout._on_(timeout);
  257. ;
  258. return self}, function($ctx1) {$ctx1.fill(self,"valueWithTimeout:",{aNumber:aNumber},smalltalk.BlockClosure)})},
  259. messageSends: []}),
  260. smalltalk.BlockClosure);
  261. smalltalk.addMethod(
  262. smalltalk.method({
  263. selector: "whileFalse",
  264. fn: function (){
  265. var self=this;
  266. return smalltalk.withContext(function($ctx1) {
  267. self._whileFalse_((function(){
  268. return smalltalk.withContext(function($ctx2) {
  269. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  270. return self}, function($ctx1) {$ctx1.fill(self,"whileFalse",{},smalltalk.BlockClosure)})},
  271. messageSends: ["whileFalse:"]}),
  272. smalltalk.BlockClosure);
  273. smalltalk.addMethod(
  274. smalltalk.method({
  275. selector: "whileFalse:",
  276. fn: function (aBlock){
  277. var self=this;
  278. return smalltalk.withContext(function($ctx1) {
  279. while(!smalltalk.assert(self._value())) {aBlock._value()};
  280. return self}, function($ctx1) {$ctx1.fill(self,"whileFalse:",{aBlock:aBlock},smalltalk.BlockClosure)})},
  281. messageSends: []}),
  282. smalltalk.BlockClosure);
  283. smalltalk.addMethod(
  284. smalltalk.method({
  285. selector: "whileTrue",
  286. fn: function (){
  287. var self=this;
  288. return smalltalk.withContext(function($ctx1) {
  289. self._whileTrue_((function(){
  290. return smalltalk.withContext(function($ctx2) {
  291. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  292. return self}, function($ctx1) {$ctx1.fill(self,"whileTrue",{},smalltalk.BlockClosure)})},
  293. messageSends: ["whileTrue:"]}),
  294. smalltalk.BlockClosure);
  295. smalltalk.addMethod(
  296. smalltalk.method({
  297. selector: "whileTrue:",
  298. fn: function (aBlock){
  299. var self=this;
  300. return smalltalk.withContext(function($ctx1) {
  301. while(smalltalk.assert(self._value())) {aBlock._value()};
  302. return self}, function($ctx1) {$ctx1.fill(self,"whileTrue:",{aBlock:aBlock},smalltalk.BlockClosure)})},
  303. messageSends: []}),
  304. smalltalk.BlockClosure);
  305. smalltalk.addClass('CompiledMethod', smalltalk.Object, [], 'Kernel-Methods');
  306. smalltalk.addMethod(
  307. smalltalk.method({
  308. selector: "arguments",
  309. fn: function (){
  310. var self=this;
  311. return smalltalk.withContext(function($ctx1) {
  312. return self.args || [];
  313. return self}, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.CompiledMethod)})},
  314. messageSends: []}),
  315. smalltalk.CompiledMethod);
  316. smalltalk.addMethod(
  317. smalltalk.method({
  318. selector: "category",
  319. fn: function (){
  320. var self=this;
  321. return smalltalk.withContext(function($ctx1) {
  322. var $2,$1;
  323. $2=self._basicAt_("category");
  324. if(($receiver = $2) == nil || $receiver == undefined){
  325. $1=self._defaultCategory();
  326. } else {
  327. $1=$2;
  328. };
  329. return $1;
  330. }, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.CompiledMethod)})},
  331. messageSends: ["ifNil:", "defaultCategory", "basicAt:"]}),
  332. smalltalk.CompiledMethod);
  333. smalltalk.addMethod(
  334. smalltalk.method({
  335. selector: "category:",
  336. fn: function (aString){
  337. var self=this;
  338. var oldProtocol;
  339. function $MethodMoved(){return smalltalk.MethodMoved||(typeof MethodMoved=="undefined"?nil:MethodMoved)}
  340. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  341. return smalltalk.withContext(function($ctx1) {
  342. var $1,$2,$3;
  343. oldProtocol=self._protocol();
  344. self._basicAt_put_("category",aString);
  345. $1=_st($MethodMoved())._new();
  346. _st($1)._method_(self);
  347. _st($1)._oldProtocol_(oldProtocol);
  348. $2=_st($1)._yourself();
  349. _st(_st($SystemAnnouncer())._current())._announce_($2);
  350. $3=self._methodClass();
  351. if(($receiver = $3) == nil || $receiver == undefined){
  352. $3;
  353. } else {
  354. _st(_st(self._methodClass())._organization())._addElement_(aString);
  355. _st(_st(_st(self._methodClass())._methods())._select_((function(each){
  356. return smalltalk.withContext(function($ctx2) {
  357. return _st(_st(each)._protocol()).__eq(oldProtocol);
  358. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._ifEmpty_((function(){
  359. return smalltalk.withContext(function($ctx2) {
  360. return _st(_st(self._methodClass())._organization())._removeElement_(oldProtocol);
  361. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  362. };
  363. return self}, function($ctx1) {$ctx1.fill(self,"category:",{aString:aString,oldProtocol:oldProtocol},smalltalk.CompiledMethod)})},
  364. messageSends: ["protocol", "basicAt:put:", "announce:", "method:", "new", "oldProtocol:", "yourself", "current", "ifNotNil:", "addElement:", "organization", "methodClass", "ifEmpty:", "removeElement:", "select:", "=", "methods"]}),
  365. smalltalk.CompiledMethod);
  366. smalltalk.addMethod(
  367. smalltalk.method({
  368. selector: "defaultCategory",
  369. fn: function (){
  370. var self=this;
  371. return smalltalk.withContext(function($ctx1) {
  372. return "as yet unclassified";
  373. }, function($ctx1) {$ctx1.fill(self,"defaultCategory",{},smalltalk.CompiledMethod)})},
  374. messageSends: []}),
  375. smalltalk.CompiledMethod);
  376. smalltalk.addMethod(
  377. smalltalk.method({
  378. selector: "fn",
  379. fn: function (){
  380. var self=this;
  381. return smalltalk.withContext(function($ctx1) {
  382. var $1;
  383. $1=self._basicAt_("fn");
  384. return $1;
  385. }, function($ctx1) {$ctx1.fill(self,"fn",{},smalltalk.CompiledMethod)})},
  386. messageSends: ["basicAt:"]}),
  387. smalltalk.CompiledMethod);
  388. smalltalk.addMethod(
  389. smalltalk.method({
  390. selector: "fn:",
  391. fn: function (aBlock){
  392. var self=this;
  393. return smalltalk.withContext(function($ctx1) {
  394. self._basicAt_put_("fn",aBlock);
  395. return self}, function($ctx1) {$ctx1.fill(self,"fn:",{aBlock:aBlock},smalltalk.CompiledMethod)})},
  396. messageSends: ["basicAt:put:"]}),
  397. smalltalk.CompiledMethod);
  398. smalltalk.addMethod(
  399. smalltalk.method({
  400. selector: "isCompiledMethod",
  401. fn: function (){
  402. var self=this;
  403. return smalltalk.withContext(function($ctx1) {
  404. return true;
  405. }, function($ctx1) {$ctx1.fill(self,"isCompiledMethod",{},smalltalk.CompiledMethod)})},
  406. messageSends: []}),
  407. smalltalk.CompiledMethod);
  408. smalltalk.addMethod(
  409. smalltalk.method({
  410. selector: "isOverridden",
  411. fn: function (){
  412. var self=this;
  413. var selector;
  414. return smalltalk.withContext(function($ctx1) {
  415. var $1;
  416. var $early={};
  417. try {
  418. selector=self._selector();
  419. _st(self._methodClass())._allSubclassesDo_((function(each){
  420. return smalltalk.withContext(function($ctx2) {
  421. $1=_st(each)._includesSelector_(selector);
  422. if(smalltalk.assert($1)){
  423. throw $early=[true];
  424. };
  425. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  426. return false;
  427. }
  428. catch(e) {if(e===$early)return e[0]; throw e}
  429. }, function($ctx1) {$ctx1.fill(self,"isOverridden",{selector:selector},smalltalk.CompiledMethod)})},
  430. messageSends: ["selector", "allSubclassesDo:", "ifTrue:", "includesSelector:", "methodClass"]}),
  431. smalltalk.CompiledMethod);
  432. smalltalk.addMethod(
  433. smalltalk.method({
  434. selector: "isOverride",
  435. fn: function (){
  436. var self=this;
  437. var superclass;
  438. return smalltalk.withContext(function($ctx1) {
  439. var $1,$2;
  440. superclass=_st(self._methodClass())._superclass();
  441. $1=superclass;
  442. if(($receiver = $1) == nil || $receiver == undefined){
  443. return false;
  444. } else {
  445. $1;
  446. };
  447. $2=_st(_st(_st(self._methodClass())._superclass())._lookupSelector_(self._selector()))._notNil();
  448. return $2;
  449. }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass},smalltalk.CompiledMethod)})},
  450. messageSends: ["superclass", "methodClass", "ifNil:", "notNil", "lookupSelector:", "selector"]}),
  451. smalltalk.CompiledMethod);
  452. smalltalk.addMethod(
  453. smalltalk.method({
  454. selector: "messageSends",
  455. fn: function (){
  456. var self=this;
  457. return smalltalk.withContext(function($ctx1) {
  458. var $1;
  459. $1=self._basicAt_("messageSends");
  460. return $1;
  461. }, function($ctx1) {$ctx1.fill(self,"messageSends",{},smalltalk.CompiledMethod)})},
  462. messageSends: ["basicAt:"]}),
  463. smalltalk.CompiledMethod);
  464. smalltalk.addMethod(
  465. smalltalk.method({
  466. selector: "methodClass",
  467. fn: function (){
  468. var self=this;
  469. return smalltalk.withContext(function($ctx1) {
  470. var $1;
  471. $1=self._basicAt_("methodClass");
  472. return $1;
  473. }, function($ctx1) {$ctx1.fill(self,"methodClass",{},smalltalk.CompiledMethod)})},
  474. messageSends: ["basicAt:"]}),
  475. smalltalk.CompiledMethod);
  476. smalltalk.addMethod(
  477. smalltalk.method({
  478. selector: "protocol",
  479. fn: function (){
  480. var self=this;
  481. return smalltalk.withContext(function($ctx1) {
  482. var $1;
  483. $1=self._category();
  484. return $1;
  485. }, function($ctx1) {$ctx1.fill(self,"protocol",{},smalltalk.CompiledMethod)})},
  486. messageSends: ["category"]}),
  487. smalltalk.CompiledMethod);
  488. smalltalk.addMethod(
  489. smalltalk.method({
  490. selector: "protocol:",
  491. fn: function (aString){
  492. var self=this;
  493. return smalltalk.withContext(function($ctx1) {
  494. self._category_(aString);
  495. return self}, function($ctx1) {$ctx1.fill(self,"protocol:",{aString:aString},smalltalk.CompiledMethod)})},
  496. messageSends: ["category:"]}),
  497. smalltalk.CompiledMethod);
  498. smalltalk.addMethod(
  499. smalltalk.method({
  500. selector: "referencedClasses",
  501. fn: function (){
  502. var self=this;
  503. return smalltalk.withContext(function($ctx1) {
  504. var $1;
  505. $1=self._basicAt_("referencedClasses");
  506. return $1;
  507. }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{},smalltalk.CompiledMethod)})},
  508. messageSends: ["basicAt:"]}),
  509. smalltalk.CompiledMethod);
  510. smalltalk.addMethod(
  511. smalltalk.method({
  512. selector: "selector",
  513. fn: function (){
  514. var self=this;
  515. return smalltalk.withContext(function($ctx1) {
  516. var $1;
  517. $1=self._basicAt_("selector");
  518. return $1;
  519. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.CompiledMethod)})},
  520. messageSends: ["basicAt:"]}),
  521. smalltalk.CompiledMethod);
  522. smalltalk.addMethod(
  523. smalltalk.method({
  524. selector: "selector:",
  525. fn: function (aString){
  526. var self=this;
  527. return smalltalk.withContext(function($ctx1) {
  528. self._basicAt_put_("selector",aString);
  529. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.CompiledMethod)})},
  530. messageSends: ["basicAt:put:"]}),
  531. smalltalk.CompiledMethod);
  532. smalltalk.addMethod(
  533. smalltalk.method({
  534. selector: "source",
  535. fn: function (){
  536. var self=this;
  537. return smalltalk.withContext(function($ctx1) {
  538. var $2,$1;
  539. $2=self._basicAt_("source");
  540. if(($receiver = $2) == nil || $receiver == undefined){
  541. $1="";
  542. } else {
  543. $1=$2;
  544. };
  545. return $1;
  546. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.CompiledMethod)})},
  547. messageSends: ["ifNil:", "basicAt:"]}),
  548. smalltalk.CompiledMethod);
  549. smalltalk.addMethod(
  550. smalltalk.method({
  551. selector: "source:",
  552. fn: function (aString){
  553. var self=this;
  554. return smalltalk.withContext(function($ctx1) {
  555. self._basicAt_put_("source",aString);
  556. return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.CompiledMethod)})},
  557. messageSends: ["basicAt:put:"]}),
  558. smalltalk.CompiledMethod);
  559. smalltalk.addClass('ForkPool', smalltalk.Object, ['poolSize', 'maxPoolSize', 'queue', 'worker'], 'Kernel-Methods');
  560. smalltalk.addMethod(
  561. smalltalk.method({
  562. selector: "addWorker",
  563. fn: function (){
  564. var self=this;
  565. return smalltalk.withContext(function($ctx1) {
  566. _st(self["@worker"])._valueWithTimeout_((0));
  567. self["@poolSize"]=_st(self["@poolSize"]).__plus((1));
  568. return self}, function($ctx1) {$ctx1.fill(self,"addWorker",{},smalltalk.ForkPool)})},
  569. messageSends: ["valueWithTimeout:", "+"]}),
  570. smalltalk.ForkPool);
  571. smalltalk.addMethod(
  572. smalltalk.method({
  573. selector: "defaultMaxPoolSize",
  574. fn: function (){
  575. var self=this;
  576. return smalltalk.withContext(function($ctx1) {
  577. var $1;
  578. $1=_st(self._class())._defaultMaxPoolSize();
  579. return $1;
  580. }, function($ctx1) {$ctx1.fill(self,"defaultMaxPoolSize",{},smalltalk.ForkPool)})},
  581. messageSends: ["defaultMaxPoolSize", "class"]}),
  582. smalltalk.ForkPool);
  583. smalltalk.addMethod(
  584. smalltalk.method({
  585. selector: "fork:",
  586. fn: function (aBlock){
  587. var self=this;
  588. return smalltalk.withContext(function($ctx1) {
  589. var $1;
  590. $1=_st(self["@poolSize"]).__lt(self._maxPoolSize());
  591. if(smalltalk.assert($1)){
  592. self._addWorker();
  593. };
  594. _st(self["@queue"])._nextPut_(aBlock);
  595. return self}, function($ctx1) {$ctx1.fill(self,"fork:",{aBlock:aBlock},smalltalk.ForkPool)})},
  596. messageSends: ["ifTrue:", "addWorker", "<", "maxPoolSize", "nextPut:"]}),
  597. smalltalk.ForkPool);
  598. smalltalk.addMethod(
  599. smalltalk.method({
  600. selector: "initialize",
  601. fn: function (){
  602. var self=this;
  603. function $Queue(){return smalltalk.Queue||(typeof Queue=="undefined"?nil:Queue)}
  604. return smalltalk.withContext(function($ctx1) {
  605. smalltalk.ForkPool.superclass.fn.prototype._initialize.apply(_st(self), []);
  606. self["@poolSize"]=(0);
  607. self["@queue"]=_st($Queue())._new();
  608. self["@worker"]=self._makeWorker();
  609. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ForkPool)})},
  610. messageSends: ["initialize", "new", "makeWorker"]}),
  611. smalltalk.ForkPool);
  612. smalltalk.addMethod(
  613. smalltalk.method({
  614. selector: "makeWorker",
  615. fn: function (){
  616. var self=this;
  617. var sentinel;
  618. function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Object)}
  619. return smalltalk.withContext(function($ctx1) {
  620. var $2,$1;
  621. sentinel=_st($Object())._new();
  622. $1=(function(){
  623. var block;
  624. return smalltalk.withContext(function($ctx2) {
  625. self["@poolSize"]=_st(self["@poolSize"]).__minus((1));
  626. self["@poolSize"];
  627. block=_st(self["@queue"])._nextIfAbsent_((function(){
  628. return smalltalk.withContext(function($ctx3) {
  629. return sentinel;
  630. }, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
  631. block;
  632. $2=_st(block).__eq_eq(sentinel);
  633. if(! smalltalk.assert($2)){
  634. return _st((function(){
  635. return smalltalk.withContext(function($ctx3) {
  636. return _st(block)._value();
  637. }, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}))._ensure_((function(){
  638. return smalltalk.withContext(function($ctx3) {
  639. return self._addWorker();
  640. }, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
  641. };
  642. }, function($ctx2) {$ctx2.fillBlock({block:block},$ctx1)})});
  643. return $1;
  644. }, function($ctx1) {$ctx1.fill(self,"makeWorker",{sentinel:sentinel},smalltalk.ForkPool)})},
  645. messageSends: ["new", "-", "nextIfAbsent:", "ifFalse:", "ensure:", "addWorker", "value", "=="]}),
  646. smalltalk.ForkPool);
  647. smalltalk.addMethod(
  648. smalltalk.method({
  649. selector: "maxPoolSize",
  650. fn: function (){
  651. var self=this;
  652. return smalltalk.withContext(function($ctx1) {
  653. var $2,$1;
  654. $2=self["@maxPoolSize"];
  655. if(($receiver = $2) == nil || $receiver == undefined){
  656. $1=self._defaultMaxPoolSize();
  657. } else {
  658. $1=$2;
  659. };
  660. return $1;
  661. }, function($ctx1) {$ctx1.fill(self,"maxPoolSize",{},smalltalk.ForkPool)})},
  662. messageSends: ["ifNil:", "defaultMaxPoolSize"]}),
  663. smalltalk.ForkPool);
  664. smalltalk.addMethod(
  665. smalltalk.method({
  666. selector: "maxPoolSize:",
  667. fn: function (anInteger){
  668. var self=this;
  669. return smalltalk.withContext(function($ctx1) {
  670. self["@maxPoolSize"]=anInteger;
  671. return self}, function($ctx1) {$ctx1.fill(self,"maxPoolSize:",{anInteger:anInteger},smalltalk.ForkPool)})},
  672. messageSends: []}),
  673. smalltalk.ForkPool);
  674. smalltalk.ForkPool.klass.iVarNames = ['default'];
  675. smalltalk.addMethod(
  676. smalltalk.method({
  677. selector: "default",
  678. fn: function (){
  679. var self=this;
  680. return smalltalk.withContext(function($ctx1) {
  681. var $2,$1;
  682. $2=self["@default"];
  683. if(($receiver = $2) == nil || $receiver == undefined){
  684. self["@default"]=self._new();
  685. $1=self["@default"];
  686. } else {
  687. $1=$2;
  688. };
  689. return $1;
  690. }, function($ctx1) {$ctx1.fill(self,"default",{},smalltalk.ForkPool.klass)})},
  691. messageSends: ["ifNil:", "new"]}),
  692. smalltalk.ForkPool.klass);
  693. smalltalk.addMethod(
  694. smalltalk.method({
  695. selector: "defaultMaxPoolSize",
  696. fn: function (){
  697. var self=this;
  698. return smalltalk.withContext(function($ctx1) {
  699. return (100);
  700. }, function($ctx1) {$ctx1.fill(self,"defaultMaxPoolSize",{},smalltalk.ForkPool.klass)})},
  701. messageSends: []}),
  702. smalltalk.ForkPool.klass);
  703. smalltalk.addMethod(
  704. smalltalk.method({
  705. selector: "resetDefault",
  706. fn: function (){
  707. var self=this;
  708. return smalltalk.withContext(function($ctx1) {
  709. self["@default"]=nil;
  710. return self}, function($ctx1) {$ctx1.fill(self,"resetDefault",{},smalltalk.ForkPool.klass)})},
  711. messageSends: []}),
  712. smalltalk.ForkPool.klass);
  713. smalltalk.addClass('Message', smalltalk.Object, ['selector', 'arguments'], 'Kernel-Methods');
  714. smalltalk.addMethod(
  715. smalltalk.method({
  716. selector: "arguments",
  717. fn: function (){
  718. var self=this;
  719. return smalltalk.withContext(function($ctx1) {
  720. var $1;
  721. $1=self["@arguments"];
  722. return $1;
  723. }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.Message)})},
  724. messageSends: []}),
  725. smalltalk.Message);
  726. smalltalk.addMethod(
  727. smalltalk.method({
  728. selector: "arguments:",
  729. fn: function (anArray){
  730. var self=this;
  731. return smalltalk.withContext(function($ctx1) {
  732. self["@arguments"]=anArray;
  733. return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{anArray:anArray},smalltalk.Message)})},
  734. messageSends: []}),
  735. smalltalk.Message);
  736. smalltalk.addMethod(
  737. smalltalk.method({
  738. selector: "printOn:",
  739. fn: function (aStream){
  740. var self=this;
  741. return smalltalk.withContext(function($ctx1) {
  742. var $1,$2;
  743. smalltalk.Message.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
  744. $1=aStream;
  745. _st($1)._nextPutAll_("(");
  746. _st($1)._nextPutAll_(self._selector());
  747. $2=_st($1)._nextPutAll_(")");
  748. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Message)})},
  749. messageSends: ["printOn:", "nextPutAll:", "selector"]}),
  750. smalltalk.Message);
  751. smalltalk.addMethod(
  752. smalltalk.method({
  753. selector: "selector",
  754. fn: function (){
  755. var self=this;
  756. return smalltalk.withContext(function($ctx1) {
  757. var $1;
  758. $1=self["@selector"];
  759. return $1;
  760. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.Message)})},
  761. messageSends: []}),
  762. smalltalk.Message);
  763. smalltalk.addMethod(
  764. smalltalk.method({
  765. selector: "selector:",
  766. fn: function (aString){
  767. var self=this;
  768. return smalltalk.withContext(function($ctx1) {
  769. self["@selector"]=aString;
  770. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.Message)})},
  771. messageSends: []}),
  772. smalltalk.Message);
  773. smalltalk.addMethod(
  774. smalltalk.method({
  775. selector: "sendTo:",
  776. fn: function (anObject){
  777. var self=this;
  778. return smalltalk.withContext(function($ctx1) {
  779. var $1;
  780. $1=_st(anObject)._perform_withArguments_(self._selector(),self._arguments());
  781. return $1;
  782. }, function($ctx1) {$ctx1.fill(self,"sendTo:",{anObject:anObject},smalltalk.Message)})},
  783. messageSends: ["perform:withArguments:", "selector", "arguments"]}),
  784. smalltalk.Message);
  785. smalltalk.addMethod(
  786. smalltalk.method({
  787. selector: "selector:arguments:",
  788. fn: function (aString,anArray){
  789. var self=this;
  790. return smalltalk.withContext(function($ctx1) {
  791. var $2,$3,$1;
  792. $2=self._new();
  793. _st($2)._selector_(aString);
  794. _st($2)._arguments_(anArray);
  795. $3=_st($2)._yourself();
  796. $1=$3;
  797. return $1;
  798. }, function($ctx1) {$ctx1.fill(self,"selector:arguments:",{aString:aString,anArray:anArray},smalltalk.Message.klass)})},
  799. messageSends: ["selector:", "new", "arguments:", "yourself"]}),
  800. smalltalk.Message.klass);
  801. smalltalk.addClass('MessageSend', smalltalk.Object, ['receiver', 'message'], 'Kernel-Methods');
  802. smalltalk.addMethod(
  803. smalltalk.method({
  804. selector: "arguments",
  805. fn: function (){
  806. var self=this;
  807. return smalltalk.withContext(function($ctx1) {
  808. var $1;
  809. $1=_st(self["@message"])._arguments();
  810. return $1;
  811. }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.MessageSend)})},
  812. messageSends: ["arguments"]}),
  813. smalltalk.MessageSend);
  814. smalltalk.addMethod(
  815. smalltalk.method({
  816. selector: "arguments:",
  817. fn: function (aCollection){
  818. var self=this;
  819. return smalltalk.withContext(function($ctx1) {
  820. _st(self["@message"])._arguments_(aCollection);
  821. return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection},smalltalk.MessageSend)})},
  822. messageSends: ["arguments:"]}),
  823. smalltalk.MessageSend);
  824. smalltalk.addMethod(
  825. smalltalk.method({
  826. selector: "initialize",
  827. fn: function (){
  828. var self=this;
  829. function $Message(){return smalltalk.Message||(typeof Message=="undefined"?nil:Message)}
  830. return smalltalk.withContext(function($ctx1) {
  831. smalltalk.MessageSend.superclass.fn.prototype._initialize.apply(_st(self), []);
  832. self["@message"]=_st($Message())._new();
  833. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.MessageSend)})},
  834. messageSends: ["initialize", "new"]}),
  835. smalltalk.MessageSend);
  836. smalltalk.addMethod(
  837. smalltalk.method({
  838. selector: "printOn:",
  839. fn: function (aStream){
  840. var self=this;
  841. return smalltalk.withContext(function($ctx1) {
  842. var $1,$2;
  843. smalltalk.MessageSend.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
  844. $1=aStream;
  845. _st($1)._nextPutAll_("(");
  846. _st($1)._nextPutAll_(self._receiver());
  847. _st($1)._nextPutAll_(" >> ");
  848. _st($1)._nextPutAll_(self._selector());
  849. $2=_st($1)._nextPutAll_(")");
  850. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.MessageSend)})},
  851. messageSends: ["printOn:", "nextPutAll:", "receiver", "selector"]}),
  852. smalltalk.MessageSend);
  853. smalltalk.addMethod(
  854. smalltalk.method({
  855. selector: "receiver",
  856. fn: function (){
  857. var self=this;
  858. return smalltalk.withContext(function($ctx1) {
  859. var $1;
  860. $1=self["@receiver"];
  861. return $1;
  862. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.MessageSend)})},
  863. messageSends: []}),
  864. smalltalk.MessageSend);
  865. smalltalk.addMethod(
  866. smalltalk.method({
  867. selector: "receiver:",
  868. fn: function (anObject){
  869. var self=this;
  870. return smalltalk.withContext(function($ctx1) {
  871. self["@receiver"]=anObject;
  872. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject},smalltalk.MessageSend)})},
  873. messageSends: []}),
  874. smalltalk.MessageSend);
  875. smalltalk.addMethod(
  876. smalltalk.method({
  877. selector: "selector",
  878. fn: function (){
  879. var self=this;
  880. return smalltalk.withContext(function($ctx1) {
  881. var $1;
  882. $1=_st(self["@message"])._selector();
  883. return $1;
  884. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.MessageSend)})},
  885. messageSends: ["selector"]}),
  886. smalltalk.MessageSend);
  887. smalltalk.addMethod(
  888. smalltalk.method({
  889. selector: "selector:",
  890. fn: function (aString){
  891. var self=this;
  892. return smalltalk.withContext(function($ctx1) {
  893. _st(self["@message"])._selector_(aString);
  894. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.MessageSend)})},
  895. messageSends: ["selector:"]}),
  896. smalltalk.MessageSend);
  897. smalltalk.addMethod(
  898. smalltalk.method({
  899. selector: "value",
  900. fn: function (){
  901. var self=this;
  902. return smalltalk.withContext(function($ctx1) {
  903. var $1;
  904. $1=_st(self["@message"])._sendTo_(self._receiver());
  905. return $1;
  906. }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.MessageSend)})},
  907. messageSends: ["sendTo:", "receiver"]}),
  908. smalltalk.MessageSend);
  909. smalltalk.addMethod(
  910. smalltalk.method({
  911. selector: "value:",
  912. fn: function (anObject){
  913. var self=this;
  914. return smalltalk.withContext(function($ctx1) {
  915. var $2,$3,$1;
  916. $2=self["@message"];
  917. _st($2)._arguments_([anObject]);
  918. $3=_st($2)._sendTo_(self._receiver());
  919. $1=$3;
  920. return $1;
  921. }, function($ctx1) {$ctx1.fill(self,"value:",{anObject:anObject},smalltalk.MessageSend)})},
  922. messageSends: ["arguments:", "sendTo:", "receiver"]}),
  923. smalltalk.MessageSend);
  924. smalltalk.addMethod(
  925. smalltalk.method({
  926. selector: "value:value:",
  927. fn: function (firstArgument,secondArgument){
  928. var self=this;
  929. return smalltalk.withContext(function($ctx1) {
  930. var $2,$3,$1;
  931. $2=self["@message"];
  932. _st($2)._arguments_([firstArgument,secondArgument]);
  933. $3=_st($2)._sendTo_(self._receiver());
  934. $1=$3;
  935. return $1;
  936. }, function($ctx1) {$ctx1.fill(self,"value:value:",{firstArgument:firstArgument,secondArgument:secondArgument},smalltalk.MessageSend)})},
  937. messageSends: ["arguments:", "sendTo:", "receiver"]}),
  938. smalltalk.MessageSend);
  939. smalltalk.addMethod(
  940. smalltalk.method({
  941. selector: "value:value:value:",
  942. fn: function (firstArgument,secondArgument,thirdArgument){
  943. var self=this;
  944. return smalltalk.withContext(function($ctx1) {
  945. var $2,$3,$1;
  946. $2=self["@message"];
  947. _st($2)._arguments_([firstArgument,secondArgument,thirdArgument]);
  948. $3=_st($2)._sendTo_(self._receiver());
  949. $1=$3;
  950. return $1;
  951. }, function($ctx1) {$ctx1.fill(self,"value:value:value:",{firstArgument:firstArgument,secondArgument:secondArgument,thirdArgument:thirdArgument},smalltalk.MessageSend)})},
  952. messageSends: ["arguments:", "sendTo:", "receiver"]}),
  953. smalltalk.MessageSend);
  954. smalltalk.addMethod(
  955. smalltalk.method({
  956. selector: "valueWithPossibleArguments:",
  957. fn: function (aCollection){
  958. var self=this;
  959. return smalltalk.withContext(function($ctx1) {
  960. var $1;
  961. self._arguments_(aCollection);
  962. $1=self._value();
  963. return $1;
  964. }, function($ctx1) {$ctx1.fill(self,"valueWithPossibleArguments:",{aCollection:aCollection},smalltalk.MessageSend)})},
  965. messageSends: ["arguments:", "value"]}),
  966. smalltalk.MessageSend);
  967. smalltalk.addClass('MethodContext', smalltalk.Object, [], 'Kernel-Methods');
  968. smalltalk.addMethod(
  969. smalltalk.method({
  970. selector: "asString",
  971. fn: function (){
  972. var self=this;
  973. return smalltalk.withContext(function($ctx1) {
  974. var $2,$1;
  975. $2=self._isBlockContext();
  976. if(smalltalk.assert($2)){
  977. $1=_st("a block (in ".__comma(_st(self._methodContext())._asString())).__comma(")");
  978. } else {
  979. $1=_st(_st(_st(_st(self._receiver())._class())._name()).__comma(" >> ")).__comma(self._selector());
  980. };
  981. return $1;
  982. }, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.MethodContext)})},
  983. messageSends: ["ifTrue:ifFalse:", ",", "asString", "methodContext", "selector", "name", "class", "receiver", "isBlockContext"]}),
  984. smalltalk.MethodContext);
  985. smalltalk.addMethod(
  986. smalltalk.method({
  987. selector: "home",
  988. fn: function (){
  989. var self=this;
  990. return smalltalk.withContext(function($ctx1) {
  991. return self.homeContext;
  992. return self}, function($ctx1) {$ctx1.fill(self,"home",{},smalltalk.MethodContext)})},
  993. messageSends: []}),
  994. smalltalk.MethodContext);
  995. smalltalk.addMethod(
  996. smalltalk.method({
  997. selector: "isBlockContext",
  998. fn: function (){
  999. var self=this;
  1000. return smalltalk.withContext(function($ctx1) {
  1001. var $1;
  1002. $1=_st(self._selector())._isNil();
  1003. return $1;
  1004. }, function($ctx1) {$ctx1.fill(self,"isBlockContext",{},smalltalk.MethodContext)})},
  1005. messageSends: ["isNil", "selector"]}),
  1006. smalltalk.MethodContext);
  1007. smalltalk.addMethod(
  1008. smalltalk.method({
  1009. selector: "locals",
  1010. fn: function (){
  1011. var self=this;
  1012. return smalltalk.withContext(function($ctx1) {
  1013. return self.locals || {};
  1014. return self}, function($ctx1) {$ctx1.fill(self,"locals",{},smalltalk.MethodContext)})},
  1015. messageSends: []}),
  1016. smalltalk.MethodContext);
  1017. smalltalk.addMethod(
  1018. smalltalk.method({
  1019. selector: "method",
  1020. fn: function (){
  1021. var self=this;
  1022. return smalltalk.withContext(function($ctx1) {
  1023. var $2,$1;
  1024. $2=self._methodContext();
  1025. if(($receiver = $2) == nil || $receiver == undefined){
  1026. $1=$2;
  1027. } else {
  1028. $1=_st(_st(_st(self._methodContext())._receiver())._class())._lookupSelector_(_st(self._methodContext())._selector());
  1029. };
  1030. return $1;
  1031. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.MethodContext)})},
  1032. messageSends: ["ifNotNil:", "lookupSelector:", "selector", "methodContext", "class", "receiver"]}),
  1033. smalltalk.MethodContext);
  1034. smalltalk.addMethod(
  1035. smalltalk.method({
  1036. selector: "methodContext",
  1037. fn: function (){
  1038. var self=this;
  1039. return smalltalk.withContext(function($ctx1) {
  1040. var $1,$2,$4,$3;
  1041. $1=self._isBlockContext();
  1042. if(! smalltalk.assert($1)){
  1043. $2=self;
  1044. return $2;
  1045. };
  1046. $4=self._home();
  1047. if(($receiver = $4) == nil || $receiver == undefined){
  1048. $3=$4;
  1049. } else {
  1050. var home;
  1051. home=$receiver;
  1052. $3=_st(home)._methodContext();
  1053. };
  1054. return $3;
  1055. }, function($ctx1) {$ctx1.fill(self,"methodContext",{},smalltalk.MethodContext)})},
  1056. messageSends: ["ifFalse:", "isBlockContext", "ifNotNil:", "methodContext", "home"]}),
  1057. smalltalk.MethodContext);
  1058. smalltalk.addMethod(
  1059. smalltalk.method({
  1060. selector: "outerContext",
  1061. fn: function (){
  1062. var self=this;
  1063. return smalltalk.withContext(function($ctx1) {
  1064. return self.outerContext || self.homeContext;
  1065. return self}, function($ctx1) {$ctx1.fill(self,"outerContext",{},smalltalk.MethodContext)})},
  1066. messageSends: []}),
  1067. smalltalk.MethodContext);
  1068. smalltalk.addMethod(
  1069. smalltalk.method({
  1070. selector: "pc",
  1071. fn: function (){
  1072. var self=this;
  1073. return smalltalk.withContext(function($ctx1) {
  1074. return self.pc;
  1075. return self}, function($ctx1) {$ctx1.fill(self,"pc",{},smalltalk.MethodContext)})},
  1076. messageSends: []}),
  1077. smalltalk.MethodContext);
  1078. smalltalk.addMethod(
  1079. smalltalk.method({
  1080. selector: "printOn:",
  1081. fn: function (aStream){
  1082. var self=this;
  1083. return smalltalk.withContext(function($ctx1) {
  1084. var $1,$2;
  1085. smalltalk.MethodContext.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
  1086. $1=aStream;
  1087. _st($1)._nextPutAll_("(");
  1088. _st($1)._nextPutAll_(self._asString());
  1089. $2=_st($1)._nextPutAll_(")");
  1090. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.MethodContext)})},
  1091. messageSends: ["printOn:", "nextPutAll:", "asString"]}),
  1092. smalltalk.MethodContext);
  1093. smalltalk.addMethod(
  1094. smalltalk.method({
  1095. selector: "receiver",
  1096. fn: function (){
  1097. var self=this;
  1098. return smalltalk.withContext(function($ctx1) {
  1099. return self.receiver;
  1100. return self}, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.MethodContext)})},
  1101. messageSends: []}),
  1102. smalltalk.MethodContext);
  1103. smalltalk.addMethod(
  1104. smalltalk.method({
  1105. selector: "selector",
  1106. fn: function (){
  1107. var self=this;
  1108. return smalltalk.withContext(function($ctx1) {
  1109. if(self.selector) {
  1110. return smalltalk.convertSelector(self.selector);
  1111. } else {
  1112. return nil;
  1113. }
  1114. ;
  1115. return self}, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.MethodContext)})},
  1116. messageSends: []}),
  1117. smalltalk.MethodContext);
  1118. smalltalk.addMethod(
  1119. smalltalk.method({
  1120. selector: "temps",
  1121. fn: function (){
  1122. var self=this;
  1123. return smalltalk.withContext(function($ctx1) {
  1124. var $1;
  1125. self._deprecatedAPI();
  1126. $1=self._locals();
  1127. return $1;
  1128. }, function($ctx1) {$ctx1.fill(self,"temps",{},smalltalk.MethodContext)})},
  1129. messageSends: ["deprecatedAPI", "locals"]}),
  1130. smalltalk.MethodContext);
  1131. smalltalk.addClass('NativeFunction', smalltalk.Object, [], 'Kernel-Methods');
  1132. smalltalk.addMethod(
  1133. smalltalk.method({
  1134. selector: "constructor:",
  1135. fn: function (aString){
  1136. var self=this;
  1137. return smalltalk.withContext(function($ctx1) {
  1138. var native=eval(aString);
  1139. return new native();
  1140. ;
  1141. return self}, function($ctx1) {$ctx1.fill(self,"constructor:",{aString:aString},smalltalk.NativeFunction.klass)})},
  1142. messageSends: []}),
  1143. smalltalk.NativeFunction.klass);
  1144. smalltalk.addMethod(
  1145. smalltalk.method({
  1146. selector: "constructor:value:",
  1147. fn: function (aString,anObject){
  1148. var self=this;
  1149. return smalltalk.withContext(function($ctx1) {
  1150. var native=eval(aString);
  1151. return new native(anObject);
  1152. ;
  1153. return self}, function($ctx1) {$ctx1.fill(self,"constructor:value:",{aString:aString,anObject:anObject},smalltalk.NativeFunction.klass)})},
  1154. messageSends: []}),
  1155. smalltalk.NativeFunction.klass);
  1156. smalltalk.addMethod(
  1157. smalltalk.method({
  1158. selector: "constructor:value:value:",
  1159. fn: function (aString,anObject,anObject2){
  1160. var self=this;
  1161. return smalltalk.withContext(function($ctx1) {
  1162. var native=eval(aString);
  1163. return new native(anObject,anObject2);
  1164. ;
  1165. return self}, function($ctx1) {$ctx1.fill(self,"constructor:value:value:",{aString:aString,anObject:anObject,anObject2:anObject2},smalltalk.NativeFunction.klass)})},
  1166. messageSends: []}),
  1167. smalltalk.NativeFunction.klass);
  1168. smalltalk.addMethod(
  1169. smalltalk.method({
  1170. selector: "constructor:value:value:value:",
  1171. fn: function (aString,anObject,anObject2,anObject3){
  1172. var self=this;
  1173. return smalltalk.withContext(function($ctx1) {
  1174. var native=eval(aString);
  1175. return new native(anObject,anObject2, anObject3);
  1176. ;
  1177. return self}, function($ctx1) {$ctx1.fill(self,"constructor:value:value:value:",{aString:aString,anObject:anObject,anObject2:anObject2,anObject3:anObject3},smalltalk.NativeFunction.klass)})},
  1178. messageSends: []}),
  1179. smalltalk.NativeFunction.klass);
  1180. smalltalk.addMethod(
  1181. smalltalk.method({
  1182. selector: "exists:",
  1183. fn: function (aString){
  1184. var self=this;
  1185. function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
  1186. return smalltalk.withContext(function($ctx1) {
  1187. var $1;
  1188. $1=_st($PlatformInterface())._existsGlobal_(aString);
  1189. return $1;
  1190. }, function($ctx1) {$ctx1.fill(self,"exists:",{aString:aString},smalltalk.NativeFunction.klass)})},
  1191. messageSends: ["existsGlobal:"]}),
  1192. smalltalk.NativeFunction.klass);
  1193. smalltalk.addClass('Timeout', smalltalk.Object, ['rawTimeout'], 'Kernel-Methods');
  1194. smalltalk.addMethod(
  1195. smalltalk.method({
  1196. selector: "clearInterval",
  1197. fn: function (){
  1198. var self=this;
  1199. return smalltalk.withContext(function($ctx1) {
  1200. var interval = self["@rawTimeout"];
  1201. clearInterval(interval);
  1202. ;
  1203. return self}, function($ctx1) {$ctx1.fill(self,"clearInterval",{},smalltalk.Timeout)})},
  1204. messageSends: []}),
  1205. smalltalk.Timeout);
  1206. smalltalk.addMethod(
  1207. smalltalk.method({
  1208. selector: "clearTimeout",
  1209. fn: function (){
  1210. var self=this;
  1211. return smalltalk.withContext(function($ctx1) {
  1212. var timeout = self["@rawTimeout"];
  1213. clearTimeout(timeout);
  1214. ;
  1215. return self}, function($ctx1) {$ctx1.fill(self,"clearTimeout",{},smalltalk.Timeout)})},
  1216. messageSends: []}),
  1217. smalltalk.Timeout);
  1218. smalltalk.addMethod(
  1219. smalltalk.method({
  1220. selector: "rawTimeout:",
  1221. fn: function (anObject){
  1222. var self=this;
  1223. return smalltalk.withContext(function($ctx1) {
  1224. self["@rawTimeout"]=anObject;
  1225. return self}, function($ctx1) {$ctx1.fill(self,"rawTimeout:",{anObject:anObject},smalltalk.Timeout)})},
  1226. messageSends: []}),
  1227. smalltalk.Timeout);
  1228. smalltalk.addMethod(
  1229. smalltalk.method({
  1230. selector: "on:",
  1231. fn: function (anObject){
  1232. var self=this;
  1233. return smalltalk.withContext(function($ctx1) {
  1234. var $2,$3,$1;
  1235. $2=self._new();
  1236. _st($2)._rawTimeout_(anObject);
  1237. $3=_st($2)._yourself();
  1238. $1=$3;
  1239. return $1;
  1240. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Timeout.klass)})},
  1241. messageSends: ["rawTimeout:", "new", "yourself"]}),
  1242. smalltalk.Timeout.klass);
  1243. })(global_smalltalk,global_nil,global__st);