Kernel-Methods.deploy.js 39 KB

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