Kernel-Methods.deploy.js 39 KB

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