Kernel-Methods.deploy.js 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333
  1. smalltalk.addPackage('Kernel-Methods');
  2. smalltalk.addClass('BlockClosure', smalltalk.Object, [], 'Kernel-Methods');
  3. smalltalk.addMethod(
  4. smalltalk.method({
  5. selector: "applyTo:arguments:",
  6. fn: function (anObject,aCollection){
  7. var self=this;
  8. return smalltalk.withContext(function($ctx1) {
  9. return self.apply(anObject, aCollection);
  10. return self}, function($ctx1) {$ctx1.fill(self,"applyTo:arguments:",{anObject:anObject,aCollection:aCollection},smalltalk.BlockClosure)})},
  11. messageSends: []}),
  12. smalltalk.BlockClosure);
  13. smalltalk.addMethod(
  14. smalltalk.method({
  15. selector: "asCompiledMethod:",
  16. fn: function (aString){
  17. var self=this;
  18. return smalltalk.withContext(function($ctx1) {
  19. return smalltalk.method({selector:aString, fn:self});;
  20. return self}, function($ctx1) {$ctx1.fill(self,"asCompiledMethod:",{aString:aString},smalltalk.BlockClosure)})},
  21. messageSends: []}),
  22. smalltalk.BlockClosure);
  23. smalltalk.addMethod(
  24. smalltalk.method({
  25. selector: "compiledSource",
  26. fn: function (){
  27. var self=this;
  28. return smalltalk.withContext(function($ctx1) {
  29. return self.toString();
  30. return self}, function($ctx1) {$ctx1.fill(self,"compiledSource",{},smalltalk.BlockClosure)})},
  31. messageSends: []}),
  32. smalltalk.BlockClosure);
  33. smalltalk.addMethod(
  34. smalltalk.method({
  35. selector: "currySelf",
  36. fn: function (){
  37. var self=this;
  38. return smalltalk.withContext(function($ctx1) {
  39. return function () {
  40. var args = [ this ];
  41. args.push.apply(args, arguments);
  42. return self.apply(null, args);
  43. }
  44. ;
  45. return self}, function($ctx1) {$ctx1.fill(self,"currySelf",{},smalltalk.BlockClosure)})},
  46. messageSends: []}),
  47. smalltalk.BlockClosure);
  48. smalltalk.addMethod(
  49. smalltalk.method({
  50. selector: "ensure:",
  51. fn: function (aBlock){
  52. var self=this;
  53. return smalltalk.withContext(function($ctx1) {
  54. try{return self._value()}finally{aBlock._value()};
  55. return self}, function($ctx1) {$ctx1.fill(self,"ensure:",{aBlock:aBlock},smalltalk.BlockClosure)})},
  56. messageSends: []}),
  57. smalltalk.BlockClosure);
  58. smalltalk.addMethod(
  59. smalltalk.method({
  60. selector: "fork",
  61. fn: function (){
  62. var self=this;
  63. function $ForkPool(){return smalltalk.ForkPool||(typeof ForkPool=="undefined"?nil:ForkPool)}
  64. return smalltalk.withContext(function($ctx1) {
  65. _st(_st($ForkPool())._default())._fork_(self);
  66. return self}, function($ctx1) {$ctx1.fill(self,"fork",{},smalltalk.BlockClosure)})},
  67. messageSends: ["fork:", "default"]}),
  68. smalltalk.BlockClosure);
  69. smalltalk.addMethod(
  70. smalltalk.method({
  71. selector: "new",
  72. fn: function (){
  73. var self=this;
  74. return smalltalk.withContext(function($ctx1) {
  75. return new self();
  76. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.BlockClosure)})},
  77. messageSends: []}),
  78. smalltalk.BlockClosure);
  79. smalltalk.addMethod(
  80. smalltalk.method({
  81. selector: "newValue:",
  82. fn: function (anObject){
  83. var self=this;
  84. return smalltalk.withContext(function($ctx1) {
  85. var $1;
  86. $1=self._newWithValues_([anObject]);
  87. return $1;
  88. }, function($ctx1) {$ctx1.fill(self,"newValue:",{anObject:anObject},smalltalk.BlockClosure)})},
  89. messageSends: ["newWithValues:"]}),
  90. smalltalk.BlockClosure);
  91. smalltalk.addMethod(
  92. smalltalk.method({
  93. selector: "newValue:value:",
  94. fn: function (anObject,anObject2){
  95. var self=this;
  96. return smalltalk.withContext(function($ctx1) {
  97. var $1;
  98. $1=self._newWithValues_([anObject,anObject2]);
  99. return $1;
  100. }, function($ctx1) {$ctx1.fill(self,"newValue:value:",{anObject:anObject,anObject2:anObject2},smalltalk.BlockClosure)})},
  101. messageSends: ["newWithValues:"]}),
  102. smalltalk.BlockClosure);
  103. smalltalk.addMethod(
  104. smalltalk.method({
  105. selector: "newValue:value:value:",
  106. fn: function (anObject,anObject2,anObject3){
  107. var self=this;
  108. return smalltalk.withContext(function($ctx1) {
  109. var $1;
  110. $1=self._newWithValues_([anObject,anObject2,anObject3]);
  111. return $1;
  112. }, function($ctx1) {$ctx1.fill(self,"newValue:value:value:",{anObject:anObject,anObject2:anObject2,anObject3:anObject3},smalltalk.BlockClosure)})},
  113. messageSends: ["newWithValues:"]}),
  114. smalltalk.BlockClosure);
  115. smalltalk.addMethod(
  116. smalltalk.method({
  117. selector: "newWithValues:",
  118. fn: function (aCollection){
  119. var self=this;
  120. return smalltalk.withContext(function($ctx1) {
  121. var constructor = function() {};
  122. constructor.prototype = self.prototype;
  123. var object = new constructor;
  124. var result = self.apply(object, aCollection);
  125. return typeof result === "object" ? result : object;
  126. ;
  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,1)})}));
  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:", "isKindOf:", "value:", "resignal"]}),
  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,1)})}));
  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,1)})}));
  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:", "basicAt:", "defaultCategory"]}),
  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 $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  340. function $MethodMoved(){return smalltalk.MethodMoved||(typeof MethodMoved=="undefined"?nil:MethodMoved)}
  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,2)})})))._ifEmpty_((function(){
  359. return smalltalk.withContext(function($ctx2) {
  360. return _st(_st(self._methodClass())._organization())._removeElement_(oldProtocol);
  361. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  362. };
  363. return self}, function($ctx1) {$ctx1.fill(self,"category:",{aString:aString,oldProtocol:oldProtocol},smalltalk.CompiledMethod)})},
  364. messageSends: ["protocol", "basicAt:put:", "announce:", "current", "method:", "new", "oldProtocol:", "yourself", "ifNotNil:", "methodClass", "addElement:", "organization", "ifEmpty:", "select:", "methods", "=", "removeElement:"]}),
  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,1)})}));
  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:", "methodClass", "ifTrue:", "includesSelector:"]}),
  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: "sendTo:arguments:",
  535. fn: function (anObject,aCollection){
  536. var self=this;
  537. return smalltalk.withContext(function($ctx1) {
  538. var $1;
  539. $1=_st(self._fn())._applyTo_arguments_(anObject,aCollection);
  540. return $1;
  541. }, function($ctx1) {$ctx1.fill(self,"sendTo:arguments:",{anObject:anObject,aCollection:aCollection},smalltalk.CompiledMethod)})},
  542. messageSends: ["applyTo:arguments:", "fn"]}),
  543. smalltalk.CompiledMethod);
  544. smalltalk.addMethod(
  545. smalltalk.method({
  546. selector: "source",
  547. fn: function (){
  548. var self=this;
  549. return smalltalk.withContext(function($ctx1) {
  550. var $2,$1;
  551. $2=self._basicAt_("source");
  552. if(($receiver = $2) == nil || $receiver == undefined){
  553. $1="";
  554. } else {
  555. $1=$2;
  556. };
  557. return $1;
  558. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.CompiledMethod)})},
  559. messageSends: ["ifNil:", "basicAt:"]}),
  560. smalltalk.CompiledMethod);
  561. smalltalk.addMethod(
  562. smalltalk.method({
  563. selector: "source:",
  564. fn: function (aString){
  565. var self=this;
  566. return smalltalk.withContext(function($ctx1) {
  567. self._basicAt_put_("source",aString);
  568. return self}, function($ctx1) {$ctx1.fill(self,"source:",{aString:aString},smalltalk.CompiledMethod)})},
  569. messageSends: ["basicAt:put:"]}),
  570. smalltalk.CompiledMethod);
  571. smalltalk.addClass('ForkPool', smalltalk.Object, ['poolSize', 'maxPoolSize', 'queue', 'worker'], 'Kernel-Methods');
  572. smalltalk.addMethod(
  573. smalltalk.method({
  574. selector: "addWorker",
  575. fn: function (){
  576. var self=this;
  577. return smalltalk.withContext(function($ctx1) {
  578. _st(self["@worker"])._valueWithTimeout_((0));
  579. self["@poolSize"]=_st(self["@poolSize"]).__plus((1));
  580. return self}, function($ctx1) {$ctx1.fill(self,"addWorker",{},smalltalk.ForkPool)})},
  581. messageSends: ["valueWithTimeout:", "+"]}),
  582. smalltalk.ForkPool);
  583. smalltalk.addMethod(
  584. smalltalk.method({
  585. selector: "defaultMaxPoolSize",
  586. fn: function (){
  587. var self=this;
  588. return smalltalk.withContext(function($ctx1) {
  589. var $1;
  590. $1=_st(self._class())._defaultMaxPoolSize();
  591. return $1;
  592. }, function($ctx1) {$ctx1.fill(self,"defaultMaxPoolSize",{},smalltalk.ForkPool)})},
  593. messageSends: ["defaultMaxPoolSize", "class"]}),
  594. smalltalk.ForkPool);
  595. smalltalk.addMethod(
  596. smalltalk.method({
  597. selector: "fork:",
  598. fn: function (aBlock){
  599. var self=this;
  600. return smalltalk.withContext(function($ctx1) {
  601. var $1;
  602. $1=_st(self["@poolSize"]).__lt(self._maxPoolSize());
  603. if(smalltalk.assert($1)){
  604. self._addWorker();
  605. };
  606. _st(self["@queue"])._nextPut_(aBlock);
  607. return self}, function($ctx1) {$ctx1.fill(self,"fork:",{aBlock:aBlock},smalltalk.ForkPool)})},
  608. messageSends: ["ifTrue:", "<", "maxPoolSize", "addWorker", "nextPut:"]}),
  609. smalltalk.ForkPool);
  610. smalltalk.addMethod(
  611. smalltalk.method({
  612. selector: "initialize",
  613. fn: function (){
  614. var self=this;
  615. function $Queue(){return smalltalk.Queue||(typeof Queue=="undefined"?nil:Queue)}
  616. return smalltalk.withContext(function($ctx1) {
  617. smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  618. self["@poolSize"]=(0);
  619. self["@queue"]=_st($Queue())._new();
  620. self["@worker"]=self._makeWorker();
  621. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ForkPool)})},
  622. messageSends: ["initialize", "new", "makeWorker"]}),
  623. smalltalk.ForkPool);
  624. smalltalk.addMethod(
  625. smalltalk.method({
  626. selector: "makeWorker",
  627. fn: function (){
  628. var self=this;
  629. var sentinel;
  630. function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Object)}
  631. return smalltalk.withContext(function($ctx1) {
  632. var $2,$1;
  633. sentinel=_st($Object())._new();
  634. $1=(function(){
  635. var block;
  636. return smalltalk.withContext(function($ctx2) {
  637. self["@poolSize"]=_st(self["@poolSize"]).__minus((1));
  638. self["@poolSize"];
  639. block=_st(self["@queue"])._nextIfAbsent_((function(){
  640. return smalltalk.withContext(function($ctx3) {
  641. return sentinel;
  642. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  643. block;
  644. $2=_st(block).__eq_eq(sentinel);
  645. if(! smalltalk.assert($2)){
  646. return _st((function(){
  647. return smalltalk.withContext(function($ctx3) {
  648. return _st(block)._value();
  649. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}))._ensure_((function(){
  650. return smalltalk.withContext(function($ctx3) {
  651. return self._addWorker();
  652. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
  653. };
  654. }, function($ctx2) {$ctx2.fillBlock({block:block},$ctx1,1)})});
  655. return $1;
  656. }, function($ctx1) {$ctx1.fill(self,"makeWorker",{sentinel:sentinel},smalltalk.ForkPool)})},
  657. messageSends: ["new", "-", "nextIfAbsent:", "ifFalse:", "==", "ensure:", "value", "addWorker"]}),
  658. smalltalk.ForkPool);
  659. smalltalk.addMethod(
  660. smalltalk.method({
  661. selector: "maxPoolSize",
  662. fn: function (){
  663. var self=this;
  664. return smalltalk.withContext(function($ctx1) {
  665. var $2,$1;
  666. $2=self["@maxPoolSize"];
  667. if(($receiver = $2) == nil || $receiver == undefined){
  668. $1=self._defaultMaxPoolSize();
  669. } else {
  670. $1=$2;
  671. };
  672. return $1;
  673. }, function($ctx1) {$ctx1.fill(self,"maxPoolSize",{},smalltalk.ForkPool)})},
  674. messageSends: ["ifNil:", "defaultMaxPoolSize"]}),
  675. smalltalk.ForkPool);
  676. smalltalk.addMethod(
  677. smalltalk.method({
  678. selector: "maxPoolSize:",
  679. fn: function (anInteger){
  680. var self=this;
  681. return smalltalk.withContext(function($ctx1) {
  682. self["@maxPoolSize"]=anInteger;
  683. return self}, function($ctx1) {$ctx1.fill(self,"maxPoolSize:",{anInteger:anInteger},smalltalk.ForkPool)})},
  684. messageSends: []}),
  685. smalltalk.ForkPool);
  686. smalltalk.ForkPool.klass.iVarNames = ['default'];
  687. smalltalk.addMethod(
  688. smalltalk.method({
  689. selector: "default",
  690. fn: function (){
  691. var self=this;
  692. return smalltalk.withContext(function($ctx1) {
  693. var $2,$1;
  694. $2=self["@default"];
  695. if(($receiver = $2) == nil || $receiver == undefined){
  696. self["@default"]=self._new();
  697. $1=self["@default"];
  698. } else {
  699. $1=$2;
  700. };
  701. return $1;
  702. }, function($ctx1) {$ctx1.fill(self,"default",{},smalltalk.ForkPool.klass)})},
  703. messageSends: ["ifNil:", "new"]}),
  704. smalltalk.ForkPool.klass);
  705. smalltalk.addMethod(
  706. smalltalk.method({
  707. selector: "defaultMaxPoolSize",
  708. fn: function (){
  709. var self=this;
  710. return smalltalk.withContext(function($ctx1) {
  711. return (100);
  712. }, function($ctx1) {$ctx1.fill(self,"defaultMaxPoolSize",{},smalltalk.ForkPool.klass)})},
  713. messageSends: []}),
  714. smalltalk.ForkPool.klass);
  715. smalltalk.addMethod(
  716. smalltalk.method({
  717. selector: "resetDefault",
  718. fn: function (){
  719. var self=this;
  720. return smalltalk.withContext(function($ctx1) {
  721. self["@default"]=nil;
  722. return self}, function($ctx1) {$ctx1.fill(self,"resetDefault",{},smalltalk.ForkPool.klass)})},
  723. messageSends: []}),
  724. smalltalk.ForkPool.klass);
  725. smalltalk.addClass('Message', smalltalk.Object, ['selector', 'arguments'], 'Kernel-Methods');
  726. smalltalk.addMethod(
  727. smalltalk.method({
  728. selector: "arguments",
  729. fn: function (){
  730. var self=this;
  731. return smalltalk.withContext(function($ctx1) {
  732. var $1;
  733. $1=self["@arguments"];
  734. return $1;
  735. }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.Message)})},
  736. messageSends: []}),
  737. smalltalk.Message);
  738. smalltalk.addMethod(
  739. smalltalk.method({
  740. selector: "arguments:",
  741. fn: function (anArray){
  742. var self=this;
  743. return smalltalk.withContext(function($ctx1) {
  744. self["@arguments"]=anArray;
  745. return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{anArray:anArray},smalltalk.Message)})},
  746. messageSends: []}),
  747. smalltalk.Message);
  748. smalltalk.addMethod(
  749. smalltalk.method({
  750. selector: "printOn:",
  751. fn: function (aStream){
  752. var self=this;
  753. return smalltalk.withContext(function($ctx1) {
  754. var $1,$2;
  755. smalltalk.Object.fn.prototype._printOn_.apply(_st(self), [aStream]);
  756. $1=aStream;
  757. _st($1)._nextPutAll_("(");
  758. _st($1)._nextPutAll_(self._selector());
  759. $2=_st($1)._nextPutAll_(")");
  760. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Message)})},
  761. messageSends: ["printOn:", "nextPutAll:", "selector"]}),
  762. smalltalk.Message);
  763. smalltalk.addMethod(
  764. smalltalk.method({
  765. selector: "selector",
  766. fn: function (){
  767. var self=this;
  768. return smalltalk.withContext(function($ctx1) {
  769. var $1;
  770. $1=self["@selector"];
  771. return $1;
  772. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.Message)})},
  773. messageSends: []}),
  774. smalltalk.Message);
  775. smalltalk.addMethod(
  776. smalltalk.method({
  777. selector: "selector:",
  778. fn: function (aString){
  779. var self=this;
  780. return smalltalk.withContext(function($ctx1) {
  781. self["@selector"]=aString;
  782. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.Message)})},
  783. messageSends: []}),
  784. smalltalk.Message);
  785. smalltalk.addMethod(
  786. smalltalk.method({
  787. selector: "sendTo:",
  788. fn: function (anObject){
  789. var self=this;
  790. return smalltalk.withContext(function($ctx1) {
  791. var $1;
  792. $1=_st(anObject)._perform_withArguments_(self._selector(),self._arguments());
  793. return $1;
  794. }, function($ctx1) {$ctx1.fill(self,"sendTo:",{anObject:anObject},smalltalk.Message)})},
  795. messageSends: ["perform:withArguments:", "selector", "arguments"]}),
  796. smalltalk.Message);
  797. smalltalk.addMethod(
  798. smalltalk.method({
  799. selector: "selector:arguments:",
  800. fn: function (aString,anArray){
  801. var self=this;
  802. return smalltalk.withContext(function($ctx1) {
  803. var $2,$3,$1;
  804. $2=self._new();
  805. _st($2)._selector_(aString);
  806. _st($2)._arguments_(anArray);
  807. $3=_st($2)._yourself();
  808. $1=$3;
  809. return $1;
  810. }, function($ctx1) {$ctx1.fill(self,"selector:arguments:",{aString:aString,anArray:anArray},smalltalk.Message.klass)})},
  811. messageSends: ["selector:", "new", "arguments:", "yourself"]}),
  812. smalltalk.Message.klass);
  813. smalltalk.addClass('MessageSend', smalltalk.Object, ['receiver', 'message'], 'Kernel-Methods');
  814. smalltalk.addMethod(
  815. smalltalk.method({
  816. selector: "arguments",
  817. fn: function (){
  818. var self=this;
  819. return smalltalk.withContext(function($ctx1) {
  820. var $1;
  821. $1=_st(self["@message"])._arguments();
  822. return $1;
  823. }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.MessageSend)})},
  824. messageSends: ["arguments"]}),
  825. smalltalk.MessageSend);
  826. smalltalk.addMethod(
  827. smalltalk.method({
  828. selector: "arguments:",
  829. fn: function (aCollection){
  830. var self=this;
  831. return smalltalk.withContext(function($ctx1) {
  832. _st(self["@message"])._arguments_(aCollection);
  833. return self}, function($ctx1) {$ctx1.fill(self,"arguments:",{aCollection:aCollection},smalltalk.MessageSend)})},
  834. messageSends: ["arguments:"]}),
  835. smalltalk.MessageSend);
  836. smalltalk.addMethod(
  837. smalltalk.method({
  838. selector: "initialize",
  839. fn: function (){
  840. var self=this;
  841. function $Message(){return smalltalk.Message||(typeof Message=="undefined"?nil:Message)}
  842. return smalltalk.withContext(function($ctx1) {
  843. smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  844. self["@message"]=_st($Message())._new();
  845. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.MessageSend)})},
  846. messageSends: ["initialize", "new"]}),
  847. smalltalk.MessageSend);
  848. smalltalk.addMethod(
  849. smalltalk.method({
  850. selector: "printOn:",
  851. fn: function (aStream){
  852. var self=this;
  853. return smalltalk.withContext(function($ctx1) {
  854. var $1,$2;
  855. smalltalk.Object.fn.prototype._printOn_.apply(_st(self), [aStream]);
  856. $1=aStream;
  857. _st($1)._nextPutAll_("(");
  858. _st($1)._nextPutAll_(self._receiver());
  859. _st($1)._nextPutAll_(" >> ");
  860. _st($1)._nextPutAll_(self._selector());
  861. $2=_st($1)._nextPutAll_(")");
  862. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.MessageSend)})},
  863. messageSends: ["printOn:", "nextPutAll:", "receiver", "selector"]}),
  864. smalltalk.MessageSend);
  865. smalltalk.addMethod(
  866. smalltalk.method({
  867. selector: "receiver",
  868. fn: function (){
  869. var self=this;
  870. return smalltalk.withContext(function($ctx1) {
  871. var $1;
  872. $1=self["@receiver"];
  873. return $1;
  874. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.MessageSend)})},
  875. messageSends: []}),
  876. smalltalk.MessageSend);
  877. smalltalk.addMethod(
  878. smalltalk.method({
  879. selector: "receiver:",
  880. fn: function (anObject){
  881. var self=this;
  882. return smalltalk.withContext(function($ctx1) {
  883. self["@receiver"]=anObject;
  884. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject},smalltalk.MessageSend)})},
  885. messageSends: []}),
  886. smalltalk.MessageSend);
  887. smalltalk.addMethod(
  888. smalltalk.method({
  889. selector: "selector",
  890. fn: function (){
  891. var self=this;
  892. return smalltalk.withContext(function($ctx1) {
  893. var $1;
  894. $1=_st(self["@message"])._selector();
  895. return $1;
  896. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.MessageSend)})},
  897. messageSends: ["selector"]}),
  898. smalltalk.MessageSend);
  899. smalltalk.addMethod(
  900. smalltalk.method({
  901. selector: "selector:",
  902. fn: function (aString){
  903. var self=this;
  904. return smalltalk.withContext(function($ctx1) {
  905. _st(self["@message"])._selector_(aString);
  906. return self}, function($ctx1) {$ctx1.fill(self,"selector:",{aString:aString},smalltalk.MessageSend)})},
  907. messageSends: ["selector:"]}),
  908. smalltalk.MessageSend);
  909. smalltalk.addMethod(
  910. smalltalk.method({
  911. selector: "value",
  912. fn: function (){
  913. var self=this;
  914. return smalltalk.withContext(function($ctx1) {
  915. var $1;
  916. $1=_st(self["@message"])._sendTo_(self._receiver());
  917. return $1;
  918. }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.MessageSend)})},
  919. messageSends: ["sendTo:", "receiver"]}),
  920. smalltalk.MessageSend);
  921. smalltalk.addMethod(
  922. smalltalk.method({
  923. selector: "value:",
  924. fn: function (anObject){
  925. var self=this;
  926. return smalltalk.withContext(function($ctx1) {
  927. var $2,$3,$1;
  928. $2=self["@message"];
  929. _st($2)._arguments_([anObject]);
  930. $3=_st($2)._sendTo_(self._receiver());
  931. $1=$3;
  932. return $1;
  933. }, function($ctx1) {$ctx1.fill(self,"value:",{anObject:anObject},smalltalk.MessageSend)})},
  934. messageSends: ["arguments:", "sendTo:", "receiver"]}),
  935. smalltalk.MessageSend);
  936. smalltalk.addMethod(
  937. smalltalk.method({
  938. selector: "value:value:",
  939. fn: function (firstArgument,secondArgument){
  940. var self=this;
  941. return smalltalk.withContext(function($ctx1) {
  942. var $2,$3,$1;
  943. $2=self["@message"];
  944. _st($2)._arguments_([firstArgument,secondArgument]);
  945. $3=_st($2)._sendTo_(self._receiver());
  946. $1=$3;
  947. return $1;
  948. }, function($ctx1) {$ctx1.fill(self,"value:value:",{firstArgument:firstArgument,secondArgument:secondArgument},smalltalk.MessageSend)})},
  949. messageSends: ["arguments:", "sendTo:", "receiver"]}),
  950. smalltalk.MessageSend);
  951. smalltalk.addMethod(
  952. smalltalk.method({
  953. selector: "value:value:value:",
  954. fn: function (firstArgument,secondArgument,thirdArgument){
  955. var self=this;
  956. return smalltalk.withContext(function($ctx1) {
  957. var $2,$3,$1;
  958. $2=self["@message"];
  959. _st($2)._arguments_([firstArgument,secondArgument,thirdArgument]);
  960. $3=_st($2)._sendTo_(self._receiver());
  961. $1=$3;
  962. return $1;
  963. }, function($ctx1) {$ctx1.fill(self,"value:value:value:",{firstArgument:firstArgument,secondArgument:secondArgument,thirdArgument:thirdArgument},smalltalk.MessageSend)})},
  964. messageSends: ["arguments:", "sendTo:", "receiver"]}),
  965. smalltalk.MessageSend);
  966. smalltalk.addMethod(
  967. smalltalk.method({
  968. selector: "valueWithPossibleArguments:",
  969. fn: function (aCollection){
  970. var self=this;
  971. return smalltalk.withContext(function($ctx1) {
  972. var $1;
  973. self._arguments_(aCollection);
  974. $1=self._value();
  975. return $1;
  976. }, function($ctx1) {$ctx1.fill(self,"valueWithPossibleArguments:",{aCollection:aCollection},smalltalk.MessageSend)})},
  977. messageSends: ["arguments:", "value"]}),
  978. smalltalk.MessageSend);
  979. smalltalk.addClass('MethodContext', smalltalk.Object, [], 'Kernel-Methods');
  980. smalltalk.addMethod(
  981. smalltalk.method({
  982. selector: "asString",
  983. fn: function (){
  984. var self=this;
  985. return smalltalk.withContext(function($ctx1) {
  986. var $2,$1;
  987. $2=self._isBlockContext();
  988. if(smalltalk.assert($2)){
  989. $1=_st("a block (in ".__comma(_st(self._methodContext())._asString())).__comma(")");
  990. } else {
  991. $1=_st(_st(_st(_st(self._receiver())._class())._name()).__comma(" >> ")).__comma(self._selector());
  992. };
  993. return $1;
  994. }, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.MethodContext)})},
  995. messageSends: ["ifTrue:ifFalse:", "isBlockContext", ",", "asString", "methodContext", "name", "class", "receiver", "selector"]}),
  996. smalltalk.MethodContext);
  997. smalltalk.addMethod(
  998. smalltalk.method({
  999. selector: "home",
  1000. fn: function (){
  1001. var self=this;
  1002. return smalltalk.withContext(function($ctx1) {
  1003. return self.homeContext;
  1004. return self}, function($ctx1) {$ctx1.fill(self,"home",{},smalltalk.MethodContext)})},
  1005. messageSends: []}),
  1006. smalltalk.MethodContext);
  1007. smalltalk.addMethod(
  1008. smalltalk.method({
  1009. selector: "index",
  1010. fn: function (){
  1011. var self=this;
  1012. return smalltalk.withContext(function($ctx1) {
  1013. return self.index || 0;
  1014. return self}, function($ctx1) {$ctx1.fill(self,"index",{},smalltalk.MethodContext)})},
  1015. messageSends: []}),
  1016. smalltalk.MethodContext);
  1017. smalltalk.addMethod(
  1018. smalltalk.method({
  1019. selector: "isBlockContext",
  1020. fn: function (){
  1021. var self=this;
  1022. return smalltalk.withContext(function($ctx1) {
  1023. var $1;
  1024. $1=_st(self._selector())._isNil();
  1025. return $1;
  1026. }, function($ctx1) {$ctx1.fill(self,"isBlockContext",{},smalltalk.MethodContext)})},
  1027. messageSends: ["isNil", "selector"]}),
  1028. smalltalk.MethodContext);
  1029. smalltalk.addMethod(
  1030. smalltalk.method({
  1031. selector: "locals",
  1032. fn: function (){
  1033. var self=this;
  1034. return smalltalk.withContext(function($ctx1) {
  1035. return self.locals || {};
  1036. return self}, function($ctx1) {$ctx1.fill(self,"locals",{},smalltalk.MethodContext)})},
  1037. messageSends: []}),
  1038. smalltalk.MethodContext);
  1039. smalltalk.addMethod(
  1040. smalltalk.method({
  1041. selector: "method",
  1042. fn: function (){
  1043. var self=this;
  1044. return smalltalk.withContext(function($ctx1) {
  1045. var $2,$1;
  1046. $2=self._methodContext();
  1047. if(($receiver = $2) == nil || $receiver == undefined){
  1048. $1=$2;
  1049. } else {
  1050. $1=_st(_st(_st(self._methodContext())._receiver())._class())._lookupSelector_(_st(self._methodContext())._selector());
  1051. };
  1052. return $1;
  1053. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.MethodContext)})},
  1054. messageSends: ["ifNotNil:", "methodContext", "lookupSelector:", "class", "receiver", "selector"]}),
  1055. smalltalk.MethodContext);
  1056. smalltalk.addMethod(
  1057. smalltalk.method({
  1058. selector: "methodContext",
  1059. fn: function (){
  1060. var self=this;
  1061. return smalltalk.withContext(function($ctx1) {
  1062. var $1,$2,$4,$3;
  1063. $1=self._isBlockContext();
  1064. if(! smalltalk.assert($1)){
  1065. $2=self;
  1066. return $2;
  1067. };
  1068. $4=self._outerContext();
  1069. if(($receiver = $4) == nil || $receiver == undefined){
  1070. $3=$4;
  1071. } else {
  1072. var outer;
  1073. outer=$receiver;
  1074. $3=_st(outer)._methodContext();
  1075. };
  1076. return $3;
  1077. }, function($ctx1) {$ctx1.fill(self,"methodContext",{},smalltalk.MethodContext)})},
  1078. messageSends: ["ifFalse:", "isBlockContext", "ifNotNil:", "outerContext", "methodContext"]}),
  1079. smalltalk.MethodContext);
  1080. smalltalk.addMethod(
  1081. smalltalk.method({
  1082. selector: "outerContext",
  1083. fn: function (){
  1084. var self=this;
  1085. return smalltalk.withContext(function($ctx1) {
  1086. return self.outerContext || self.homeContext;
  1087. return self}, function($ctx1) {$ctx1.fill(self,"outerContext",{},smalltalk.MethodContext)})},
  1088. messageSends: []}),
  1089. smalltalk.MethodContext);
  1090. smalltalk.addMethod(
  1091. smalltalk.method({
  1092. selector: "pc",
  1093. fn: function (){
  1094. var self=this;
  1095. return smalltalk.withContext(function($ctx1) {
  1096. return self.pc;
  1097. return self}, function($ctx1) {$ctx1.fill(self,"pc",{},smalltalk.MethodContext)})},
  1098. messageSends: []}),
  1099. smalltalk.MethodContext);
  1100. smalltalk.addMethod(
  1101. smalltalk.method({
  1102. selector: "printOn:",
  1103. fn: function (aStream){
  1104. var self=this;
  1105. return smalltalk.withContext(function($ctx1) {
  1106. var $1,$2;
  1107. smalltalk.Object.fn.prototype._printOn_.apply(_st(self), [aStream]);
  1108. $1=aStream;
  1109. _st($1)._nextPutAll_("(");
  1110. _st($1)._nextPutAll_(self._asString());
  1111. $2=_st($1)._nextPutAll_(")");
  1112. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.MethodContext)})},
  1113. messageSends: ["printOn:", "nextPutAll:", "asString"]}),
  1114. smalltalk.MethodContext);
  1115. smalltalk.addMethod(
  1116. smalltalk.method({
  1117. selector: "receiver",
  1118. fn: function (){
  1119. var self=this;
  1120. return smalltalk.withContext(function($ctx1) {
  1121. return self.receiver;
  1122. return self}, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.MethodContext)})},
  1123. messageSends: []}),
  1124. smalltalk.MethodContext);
  1125. smalltalk.addMethod(
  1126. smalltalk.method({
  1127. selector: "selector",
  1128. fn: function (){
  1129. var self=this;
  1130. return smalltalk.withContext(function($ctx1) {
  1131. if(self.selector) {
  1132. return smalltalk.convertSelector(self.selector);
  1133. } else {
  1134. return nil;
  1135. }
  1136. ;
  1137. return self}, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.MethodContext)})},
  1138. messageSends: []}),
  1139. smalltalk.MethodContext);
  1140. smalltalk.addMethod(
  1141. smalltalk.method({
  1142. selector: "temps",
  1143. fn: function (){
  1144. var self=this;
  1145. return smalltalk.withContext(function($ctx1) {
  1146. var $1;
  1147. self._deprecatedAPI();
  1148. $1=self._locals();
  1149. return $1;
  1150. }, function($ctx1) {$ctx1.fill(self,"temps",{},smalltalk.MethodContext)})},
  1151. messageSends: ["deprecatedAPI", "locals"]}),
  1152. smalltalk.MethodContext);
  1153. smalltalk.addClass('NativeFunction', smalltalk.Object, [], 'Kernel-Methods');
  1154. smalltalk.addMethod(
  1155. smalltalk.method({
  1156. selector: "constructor:",
  1157. fn: function (aString){
  1158. var self=this;
  1159. return smalltalk.withContext(function($ctx1) {
  1160. var native=eval(aString);
  1161. return new native();
  1162. ;
  1163. return self}, function($ctx1) {$ctx1.fill(self,"constructor:",{aString:aString},smalltalk.NativeFunction.klass)})},
  1164. messageSends: []}),
  1165. smalltalk.NativeFunction.klass);
  1166. smalltalk.addMethod(
  1167. smalltalk.method({
  1168. selector: "constructor:value:",
  1169. fn: function (aString,anObject){
  1170. var self=this;
  1171. return smalltalk.withContext(function($ctx1) {
  1172. var native=eval(aString);
  1173. return new native(anObject);
  1174. ;
  1175. return self}, function($ctx1) {$ctx1.fill(self,"constructor:value:",{aString:aString,anObject:anObject},smalltalk.NativeFunction.klass)})},
  1176. messageSends: []}),
  1177. smalltalk.NativeFunction.klass);
  1178. smalltalk.addMethod(
  1179. smalltalk.method({
  1180. selector: "constructor:value:value:",
  1181. fn: function (aString,anObject,anObject2){
  1182. var self=this;
  1183. return smalltalk.withContext(function($ctx1) {
  1184. var native=eval(aString);
  1185. return new native(anObject,anObject2);
  1186. ;
  1187. return self}, function($ctx1) {$ctx1.fill(self,"constructor:value:value:",{aString:aString,anObject:anObject,anObject2:anObject2},smalltalk.NativeFunction.klass)})},
  1188. messageSends: []}),
  1189. smalltalk.NativeFunction.klass);
  1190. smalltalk.addMethod(
  1191. smalltalk.method({
  1192. selector: "constructor:value:value:value:",
  1193. fn: function (aString,anObject,anObject2,anObject3){
  1194. var self=this;
  1195. return smalltalk.withContext(function($ctx1) {
  1196. var native=eval(aString);
  1197. return new native(anObject,anObject2, anObject3);
  1198. ;
  1199. return self}, function($ctx1) {$ctx1.fill(self,"constructor:value:value:value:",{aString:aString,anObject:anObject,anObject2:anObject2,anObject3:anObject3},smalltalk.NativeFunction.klass)})},
  1200. messageSends: []}),
  1201. smalltalk.NativeFunction.klass);
  1202. smalltalk.addMethod(
  1203. smalltalk.method({
  1204. selector: "exists:",
  1205. fn: function (aString){
  1206. var self=this;
  1207. return smalltalk.withContext(function($ctx1) {
  1208. if(aString in window) {
  1209. return true
  1210. } else {
  1211. return false
  1212. }
  1213. ;
  1214. return self}, function($ctx1) {$ctx1.fill(self,"exists:",{aString:aString},smalltalk.NativeFunction.klass)})},
  1215. messageSends: []}),
  1216. smalltalk.NativeFunction.klass);