2
0

Kernel-Methods.deploy.js 39 KB

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