2
0

Kernel-Methods.deploy.js 38 KB

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