2
0

Kernel-Objects.deploy.js 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606
  1. smalltalk.addPackage('Kernel-Objects', {});
  2. smalltalk.addClass('Object', smalltalk.nil, [], 'Kernel-Objects');
  3. smalltalk.addMethod(
  4. '__eq',
  5. smalltalk.method({
  6. selector: '=',
  7. fn: function (anObject){
  8. var self=this;
  9. return smalltalk.send(self, "__eq_eq", [anObject]);
  10. return self;}
  11. }),
  12. smalltalk.Object);
  13. smalltalk.addMethod(
  14. '_~_eq',
  15. smalltalk.method({
  16. selector: '~=',
  17. fn: function (anObject){
  18. var self=this;
  19. return smalltalk.send(smalltalk.send(self, "__eq", [anObject]), "__eq", [false]);
  20. return self;}
  21. }),
  22. smalltalk.Object);
  23. smalltalk.addMethod(
  24. '_initialize',
  25. smalltalk.method({
  26. selector: 'initialize',
  27. fn: function (){
  28. var self=this;
  29. return self;}
  30. }),
  31. smalltalk.Object);
  32. smalltalk.addMethod(
  33. '_yourself',
  34. smalltalk.method({
  35. selector: 'yourself',
  36. fn: function (){
  37. var self=this;
  38. return self;
  39. return self;}
  40. }),
  41. smalltalk.Object);
  42. smalltalk.addMethod(
  43. '_class',
  44. smalltalk.method({
  45. selector: 'class',
  46. fn: function (){
  47. var self=this;
  48. return self.klass;
  49. return self;}
  50. }),
  51. smalltalk.Object);
  52. smalltalk.addMethod(
  53. '_size',
  54. smalltalk.method({
  55. selector: 'size',
  56. fn: function (){
  57. var self=this;
  58. smalltalk.send(self, "_error_", ["Object not indexable"]);
  59. return self;}
  60. }),
  61. smalltalk.Object);
  62. smalltalk.addMethod(
  63. '_copy',
  64. smalltalk.method({
  65. selector: 'copy',
  66. fn: function (){
  67. var self=this;
  68. return smalltalk.send(smalltalk.send(self, "_shallowCopy", []), "_postCopy", []);
  69. return self;}
  70. }),
  71. smalltalk.Object);
  72. smalltalk.addMethod(
  73. '_shallowCopy',
  74. smalltalk.method({
  75. selector: 'shallowCopy',
  76. fn: function (){
  77. var self=this;
  78. var copy = self.klass._new();
  79. for(var i in self) {
  80. if(/^@.+/.test(i)) {
  81. copy[i] = self[i];
  82. }
  83. }
  84. return copy;
  85. ;
  86. return self;}
  87. }),
  88. smalltalk.Object);
  89. smalltalk.addMethod(
  90. '_deepCopy',
  91. smalltalk.method({
  92. selector: 'deepCopy',
  93. fn: function (){
  94. var self=this;
  95. var copy = self.klass._new();
  96. for(var i in self) {
  97. if(/^@.+/.test(i)) {
  98. copy[i] = self[i]._deepCopy();
  99. }
  100. }
  101. return copy;
  102. ;
  103. return self;}
  104. }),
  105. smalltalk.Object);
  106. smalltalk.addMethod(
  107. '_postCopy',
  108. smalltalk.method({
  109. selector: 'postCopy',
  110. fn: function (){
  111. var self=this;
  112. return self;}
  113. }),
  114. smalltalk.Object);
  115. smalltalk.addMethod(
  116. '__minus_gt',
  117. smalltalk.method({
  118. selector: '->',
  119. fn: function (anObject){
  120. var self=this;
  121. return smalltalk.send((smalltalk.Association || Association), "_key_value_", [self, anObject]);
  122. return self;}
  123. }),
  124. smalltalk.Object);
  125. smalltalk.addMethod(
  126. '_asString',
  127. smalltalk.method({
  128. selector: 'asString',
  129. fn: function (){
  130. var self=this;
  131. return smalltalk.send(self, "_printString", []);
  132. return self;}
  133. }),
  134. smalltalk.Object);
  135. smalltalk.addMethod(
  136. '_asJavascript',
  137. smalltalk.method({
  138. selector: 'asJavascript',
  139. fn: function (){
  140. var self=this;
  141. return smalltalk.send(self, "_asString", []);
  142. return self;}
  143. }),
  144. smalltalk.Object);
  145. smalltalk.addMethod(
  146. '_perform_',
  147. smalltalk.method({
  148. selector: 'perform:',
  149. fn: function (aSymbol){
  150. var self=this;
  151. return smalltalk.send(self, "_perform_withArguments_", [aSymbol, []]);
  152. return self;}
  153. }),
  154. smalltalk.Object);
  155. smalltalk.addMethod(
  156. '_perform_withArguments_',
  157. smalltalk.method({
  158. selector: 'perform:withArguments:',
  159. fn: function (aSymbol, aCollection){
  160. var self=this;
  161. return smalltalk.send(self, "_basicPerform_withArguments_", [smalltalk.send(aSymbol, "_asSelector", []), aCollection]);
  162. return self;}
  163. }),
  164. smalltalk.Object);
  165. smalltalk.addMethod(
  166. '_instVarAt_',
  167. smalltalk.method({
  168. selector: 'instVarAt:',
  169. fn: function (aSymbol){
  170. var self=this;
  171. var varname=nil;
  172. varname=smalltalk.send(aSymbol, "_asString", []);
  173. return self['@'+varname];
  174. return self;}
  175. }),
  176. smalltalk.Object);
  177. smalltalk.addMethod(
  178. '_instVarAt_put_',
  179. smalltalk.method({
  180. selector: 'instVarAt:put:',
  181. fn: function (aSymbol, anObject){
  182. var self=this;
  183. var varname=nil;
  184. varname=smalltalk.send(aSymbol, "_asString", []);
  185. self['@' + varname] = anObject;
  186. return self;}
  187. }),
  188. smalltalk.Object);
  189. smalltalk.addMethod(
  190. '_basicAt_',
  191. smalltalk.method({
  192. selector: 'basicAt:',
  193. fn: function (aString){
  194. var self=this;
  195. return self[aString];
  196. return self;}
  197. }),
  198. smalltalk.Object);
  199. smalltalk.addMethod(
  200. '_basicAt_put_',
  201. smalltalk.method({
  202. selector: 'basicAt:put:',
  203. fn: function (aString, anObject){
  204. var self=this;
  205. return self[aString] = anObject;
  206. return self;}
  207. }),
  208. smalltalk.Object);
  209. smalltalk.addMethod(
  210. '_error_',
  211. smalltalk.method({
  212. selector: 'error:',
  213. fn: function (aString){
  214. var self=this;
  215. smalltalk.send((smalltalk.Error || Error), "_signal_", [aString]);
  216. return self;}
  217. }),
  218. smalltalk.Object);
  219. smalltalk.addMethod(
  220. '_subclassResponsibility',
  221. smalltalk.method({
  222. selector: 'subclassResponsibility',
  223. fn: function (){
  224. var self=this;
  225. smalltalk.send(self, "_error_", ["This method is a responsibility of a subclass"]);
  226. return self;}
  227. }),
  228. smalltalk.Object);
  229. smalltalk.addMethod(
  230. '_shouldNotImplement',
  231. smalltalk.method({
  232. selector: 'shouldNotImplement',
  233. fn: function (){
  234. var self=this;
  235. smalltalk.send(self, "_error_", [smalltalk.send("This method should not be implemented in ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])])]);
  236. return self;}
  237. }),
  238. smalltalk.Object);
  239. smalltalk.addMethod(
  240. '_try_catch_',
  241. smalltalk.method({
  242. selector: 'try:catch:',
  243. fn: function (aBlock, anotherBlock){
  244. var self=this;
  245. try{result = aBlock()} catch(e) {result = anotherBlock(e)};
  246. return result;;
  247. return self;}
  248. }),
  249. smalltalk.Object);
  250. smalltalk.addMethod(
  251. '_printString',
  252. smalltalk.method({
  253. selector: 'printString',
  254. fn: function (){
  255. var self=this;
  256. return smalltalk.send("a ", "__comma", [smalltalk.send(smalltalk.send(self, "_class", []), "_name", [])]);
  257. return self;}
  258. }),
  259. smalltalk.Object);
  260. smalltalk.addMethod(
  261. '_printNl',
  262. smalltalk.method({
  263. selector: 'printNl',
  264. fn: function (){
  265. var self=this;
  266. console.log(self);
  267. return self;}
  268. }),
  269. smalltalk.Object);
  270. smalltalk.addMethod(
  271. '_isKindOf_',
  272. smalltalk.method({
  273. selector: 'isKindOf:',
  274. fn: function (aClass){
  275. var self=this;
  276. return ((($receiver = smalltalk.send(self, "_isMemberOf_", [aClass])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return true;})() : (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return true;}), (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_inheritsFrom_", [aClass]);})]));
  277. return self;}
  278. }),
  279. smalltalk.Object);
  280. smalltalk.addMethod(
  281. '_isMemberOf_',
  282. smalltalk.method({
  283. selector: 'isMemberOf:',
  284. fn: function (aClass){
  285. var self=this;
  286. return smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [aClass]);
  287. return self;}
  288. }),
  289. smalltalk.Object);
  290. smalltalk.addMethod(
  291. '_ifNil_',
  292. smalltalk.method({
  293. selector: 'ifNil:',
  294. fn: function (aBlock){
  295. var self=this;
  296. return self;
  297. return self;}
  298. }),
  299. smalltalk.Object);
  300. smalltalk.addMethod(
  301. '_ifNil_ifNotNil_',
  302. smalltalk.method({
  303. selector: 'ifNil:ifNotNil:',
  304. fn: function (aBlock, anotherBlock){
  305. var self=this;
  306. return smalltalk.send(anotherBlock, "_value", []);
  307. return self;}
  308. }),
  309. smalltalk.Object);
  310. smalltalk.addMethod(
  311. '_ifNotNil_',
  312. smalltalk.method({
  313. selector: 'ifNotNil:',
  314. fn: function (aBlock){
  315. var self=this;
  316. return smalltalk.send(aBlock, "_value", []);
  317. return self;}
  318. }),
  319. smalltalk.Object);
  320. smalltalk.addMethod(
  321. '_ifNotNil_ifNil_',
  322. smalltalk.method({
  323. selector: 'ifNotNil:ifNil:',
  324. fn: function (aBlock, anotherBlock){
  325. var self=this;
  326. return smalltalk.send(aBlock, "_value", []);
  327. return self;}
  328. }),
  329. smalltalk.Object);
  330. smalltalk.addMethod(
  331. '_isNil',
  332. smalltalk.method({
  333. selector: 'isNil',
  334. fn: function (){
  335. var self=this;
  336. return false;
  337. return self;}
  338. }),
  339. smalltalk.Object);
  340. smalltalk.addMethod(
  341. '_notNil',
  342. smalltalk.method({
  343. selector: 'notNil',
  344. fn: function (){
  345. var self=this;
  346. return smalltalk.send(smalltalk.send(self, "_isNil", []), "_not", []);
  347. return self;}
  348. }),
  349. smalltalk.Object);
  350. smalltalk.addMethod(
  351. '_isClass',
  352. smalltalk.method({
  353. selector: 'isClass',
  354. fn: function (){
  355. var self=this;
  356. return false;
  357. return self;}
  358. }),
  359. smalltalk.Object);
  360. smalltalk.addMethod(
  361. '_isMetaclass',
  362. smalltalk.method({
  363. selector: 'isMetaclass',
  364. fn: function (){
  365. var self=this;
  366. return false;
  367. return self;}
  368. }),
  369. smalltalk.Object);
  370. smalltalk.addMethod(
  371. '_isNumber',
  372. smalltalk.method({
  373. selector: 'isNumber',
  374. fn: function (){
  375. var self=this;
  376. return false;
  377. return self;}
  378. }),
  379. smalltalk.Object);
  380. smalltalk.addMethod(
  381. '_isString',
  382. smalltalk.method({
  383. selector: 'isString',
  384. fn: function (){
  385. var self=this;
  386. return false;
  387. return self;}
  388. }),
  389. smalltalk.Object);
  390. smalltalk.addMethod(
  391. '_isParseFailure',
  392. smalltalk.method({
  393. selector: 'isParseFailure',
  394. fn: function (){
  395. var self=this;
  396. return false;
  397. return self;}
  398. }),
  399. smalltalk.Object);
  400. smalltalk.addMethod(
  401. '_basicPerform_',
  402. smalltalk.method({
  403. selector: 'basicPerform:',
  404. fn: function (aSymbol){
  405. var self=this;
  406. return smalltalk.send(self, "_basicPerform_withArguments_", [aSymbol, []]);
  407. return self;}
  408. }),
  409. smalltalk.Object);
  410. smalltalk.addMethod(
  411. '_basicPerform_withArguments_',
  412. smalltalk.method({
  413. selector: 'basicPerform:withArguments:',
  414. fn: function (aSymbol, aCollection){
  415. var self=this;
  416. return self[aSymbol].apply(self, aCollection);;
  417. return self;}
  418. }),
  419. smalltalk.Object);
  420. smalltalk.addMethod(
  421. '_basicDelete_',
  422. smalltalk.method({
  423. selector: 'basicDelete:',
  424. fn: function (aString){
  425. var self=this;
  426. delete self[aString]; return aString;
  427. return self;}
  428. }),
  429. smalltalk.Object);
  430. smalltalk.addMethod(
  431. '_doesNotUnderstand_',
  432. smalltalk.method({
  433. selector: 'doesNotUnderstand:',
  434. fn: function (aMessage){
  435. var self=this;
  436. (function($rec){smalltalk.send($rec, "_receiver_", [self]);smalltalk.send($rec, "_message_", [aMessage]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send((smalltalk.MessageNotUnderstood || MessageNotUnderstood), "_new", []));
  437. return self;}
  438. }),
  439. smalltalk.Object);
  440. smalltalk.addMethod(
  441. '_asJSON',
  442. smalltalk.method({
  443. selector: 'asJSON',
  444. fn: function (){
  445. var self=this;
  446. return smalltalk.send((smalltalk.JSON || JSON), "_parse_", [smalltalk.send(self, "_asJSONString", [])]);
  447. return self;}
  448. }),
  449. smalltalk.Object);
  450. smalltalk.addMethod(
  451. '_halt',
  452. smalltalk.method({
  453. selector: 'halt',
  454. fn: function (){
  455. var self=this;
  456. smalltalk.send(self, "_error_", ["Halt encountered"]);
  457. return self;}
  458. }),
  459. smalltalk.Object);
  460. smalltalk.addMethod(
  461. '_log_block_',
  462. smalltalk.method({
  463. selector: 'log:block:',
  464. fn: function (aString, aBlock){
  465. var self=this;
  466. var result=nil;
  467. smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [smalltalk.send(smalltalk.send(aString, "__comma", [" time: "]), "__comma", [smalltalk.send(smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return result=smalltalk.send(aBlock, "_value", []);})]), "_printString", [])])]);
  468. return result;
  469. return self;}
  470. }),
  471. smalltalk.Object);
  472. smalltalk.addMethod(
  473. '__eq_eq',
  474. smalltalk.method({
  475. selector: '==',
  476. fn: function (anObject){
  477. var self=this;
  478. return smalltalk.send(smalltalk.send(self, "_identityHash", []), "__eq", [smalltalk.send(anObject, "_identityHash", [])]);
  479. return self;}
  480. }),
  481. smalltalk.Object);
  482. smalltalk.addMethod(
  483. '_~~',
  484. smalltalk.method({
  485. selector: '~~',
  486. fn: function (anObject){
  487. var self=this;
  488. return smalltalk.send(smalltalk.send(self, "__eq_eq", [anObject]), "__eq", [false]);
  489. return self;}
  490. }),
  491. smalltalk.Object);
  492. smalltalk.addMethod(
  493. '_deprecatedAPI',
  494. smalltalk.method({
  495. selector: 'deprecatedAPI',
  496. fn: function (){
  497. var self=this;
  498. smalltalk.send((typeof console == 'undefined' ? nil : console), "_warn_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.getThisContext()), "_home", []), "_asString", []), "__comma", [unescape("%20is%20deprecated%21%20%28in%20")]), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.getThisContext()), "_home", []), "_home", []), "_asString", [])]), "__comma", [unescape("%29")])]);
  499. return self;}
  500. }),
  501. smalltalk.Object);
  502. smalltalk.addMethod(
  503. '_storeString',
  504. smalltalk.method({
  505. selector: 'storeString',
  506. fn: function (){
  507. var self=this;
  508. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(s){return smalltalk.send(self, "_storeOn_", [s]);})]);
  509. return self;}
  510. }),
  511. smalltalk.Object);
  512. smalltalk.addMethod(
  513. '_storeOn_',
  514. smalltalk.method({
  515. selector: 'storeOn:',
  516. fn: function (aStream){
  517. var self=this;
  518. smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(self, "_printString", [])]);
  519. return self;}
  520. }),
  521. smalltalk.Object);
  522. smalltalk.addMethod(
  523. '_asJSONString',
  524. smalltalk.method({
  525. selector: 'asJSONString',
  526. fn: function (){
  527. var self=this;
  528. return smalltalk.send((smalltalk.JSON || JSON), "_stringify_", [self]);
  529. return self;}
  530. }),
  531. smalltalk.Object);
  532. smalltalk.addMethod(
  533. '_identityHash',
  534. smalltalk.method({
  535. selector: 'identityHash',
  536. fn: function (){
  537. var self=this;
  538. return self.identityHash || (self.identityHash = smalltalk.nextId());;
  539. return self;}
  540. }),
  541. smalltalk.Object);
  542. smalltalk.addMethod(
  543. '_isSymbol',
  544. smalltalk.method({
  545. selector: 'isSymbol',
  546. fn: function (){
  547. var self=this;
  548. return false;
  549. return self;}
  550. }),
  551. smalltalk.Object);
  552. smalltalk.addMethod(
  553. '_initialize',
  554. smalltalk.method({
  555. selector: 'initialize',
  556. fn: function (){
  557. var self=this;
  558. return self;}
  559. }),
  560. smalltalk.Object.klass);
  561. smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel-Objects');
  562. smalltalk.addMethod(
  563. '_classes',
  564. smalltalk.method({
  565. selector: 'classes',
  566. fn: function (){
  567. var self=this;
  568. return self.classes();
  569. return self;}
  570. }),
  571. smalltalk.Smalltalk);
  572. smalltalk.addMethod(
  573. '_at_',
  574. smalltalk.method({
  575. selector: 'at:',
  576. fn: function (aString){
  577. var self=this;
  578. return self[aString];
  579. return self;}
  580. }),
  581. smalltalk.Smalltalk);
  582. smalltalk.addMethod(
  583. '_removeClass_',
  584. smalltalk.method({
  585. selector: 'removeClass:',
  586. fn: function (aClass){
  587. var self=this;
  588. ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [unescape("%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21")])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [smalltalk.send(smalltalk.send(aClass, "_asString", []), "__comma", [unescape("%20is%20a%20Metaclass%20and%20cannot%20be%20removed%21")])]);})]));
  589. smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(aClass, "_removeCompiledMethod_", [each]);})]);
  590. smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_methodDictionary", []), "_values", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(aClass, "_class", []), "_removeCompiledMethod_", [each]);})]);
  591. smalltalk.send(self, "_basicDelete_", [smalltalk.send(aClass, "_name", [])]);
  592. return self;}
  593. }),
  594. smalltalk.Smalltalk);
  595. smalltalk.addMethod(
  596. '_basicParse_',
  597. smalltalk.method({
  598. selector: 'basicParse:',
  599. fn: function (aString){
  600. var self=this;
  601. return smalltalk.parser.parse(aString);
  602. return self;}
  603. }),
  604. smalltalk.Smalltalk);
  605. smalltalk.addMethod(
  606. '_parse_',
  607. smalltalk.method({
  608. selector: 'parse:',
  609. fn: function (aString){
  610. var self=this;
  611. var result=nil;
  612. smalltalk.send(self, "_try_catch_", [(function(){return result=smalltalk.send(self, "_basicParse_", [aString]);}), (function(ex){return smalltalk.send(smalltalk.send(self, "_parseError_parsing_", [ex, aString]), "_signal", []);})]);
  613. return result;
  614. return self;}
  615. }),
  616. smalltalk.Smalltalk);
  617. smalltalk.addMethod(
  618. '_parseError_parsing_',
  619. smalltalk.method({
  620. selector: 'parseError:parsing:',
  621. fn: function (anException, aString){
  622. var self=this;
  623. var row=nil;
  624. var col=nil;
  625. var message=nil;
  626. var lines=nil;
  627. var badLine=nil;
  628. var code=nil;
  629. row = anException.line;
  630. col = anException.column;
  631. message = anException.message;;
  632. lines=smalltalk.send(aString, "_lines", []);
  633. badLine=smalltalk.send(lines, "_at_", [row]);
  634. badLine=smalltalk.send(smalltalk.send(smalltalk.send(badLine, "_copyFrom_to_", [(1), ((($receiver = col).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]), "__comma", [unescape("%20%3D%3D%3D%3E")]), "__comma", [smalltalk.send(badLine, "_copyFrom_to_", [col, smalltalk.send(badLine, "_size", [])])]);
  635. smalltalk.send(lines, "_at_put_", [row, badLine]);
  636. code=smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(s){return smalltalk.send(lines, "_withIndexDo_", [(function(l, i){return smalltalk.send(s, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(i, "_asString", []), "__comma", [": "]), "__comma", [l]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})]);})]);
  637. return smalltalk.send(smalltalk.send((smalltalk.Error || Error), "_new", []), "_messageText_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Parse error on line ", "__comma", [row]), "__comma", [" column "]), "__comma", [col]), "__comma", [" : "]), "__comma", [message]), "__comma", [unescape("%20Below%20is%20code%20with%20line%20numbers%20and%20%3D%3D%3D%3E%20marker%20inserted%3A")]), "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])]), "__comma", [code])]);
  638. return self;}
  639. }),
  640. smalltalk.Smalltalk);
  641. smalltalk.addMethod(
  642. '_packages',
  643. smalltalk.method({
  644. selector: 'packages',
  645. fn: function (){
  646. var self=this;
  647. return self.packages.all();
  648. return self;}
  649. }),
  650. smalltalk.Smalltalk);
  651. smalltalk.addMethod(
  652. '_packageAt_',
  653. smalltalk.method({
  654. selector: 'packageAt:',
  655. fn: function (packageName){
  656. var self=this;
  657. return self.packages[packageName];
  658. return self;}
  659. }),
  660. smalltalk.Smalltalk);
  661. smalltalk.addMethod(
  662. '_packageAt_ifAbsent_',
  663. smalltalk.method({
  664. selector: 'packageAt:ifAbsent:',
  665. fn: function (packageName, aBlock){
  666. var self=this;
  667. return smalltalk.send(smalltalk.send(self, "_packageAt_", [packageName]), "_ifNil_", [aBlock]);
  668. return self;}
  669. }),
  670. smalltalk.Smalltalk);
  671. smalltalk.addMethod(
  672. '_createPackage_',
  673. smalltalk.method({
  674. selector: 'createPackage:',
  675. fn: function (packageName){
  676. var self=this;
  677. return smalltalk.addPackage(packageName, nil);
  678. return self;}
  679. }),
  680. smalltalk.Smalltalk);
  681. smalltalk.addMethod(
  682. '_deletePackage_',
  683. smalltalk.method({
  684. selector: 'deletePackage:',
  685. fn: function (packageName){
  686. var self=this;
  687. delete smalltalk.packages[packageName];
  688. return self;}
  689. }),
  690. smalltalk.Smalltalk);
  691. smalltalk.addMethod(
  692. '_removePackage_',
  693. smalltalk.method({
  694. selector: 'removePackage:',
  695. fn: function (packageName){
  696. var self=this;
  697. var pkg=nil;
  698. pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]);
  699. smalltalk.send(smalltalk.send(pkg, "_classes", []), "_do_", [(function(each){return smalltalk.send(self, "_removeClass_", [each]);})]);
  700. smalltalk.send(self, "_deletePackage_", [packageName]);
  701. return self;}
  702. }),
  703. smalltalk.Smalltalk);
  704. smalltalk.addMethod(
  705. '_renamePackage_to_',
  706. smalltalk.method({
  707. selector: 'renamePackage:to:',
  708. fn: function (packageName, newName){
  709. var self=this;
  710. var pkg=nil;
  711. pkg=smalltalk.send(self, "_packageAt_ifAbsent_", [packageName, (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Missing package: ", "__comma", [packageName])]);})]);
  712. (($receiver = smalltalk.send(self, "_packageAt_", [newName])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_error_", [smalltalk.send("Already exists a package called: ", "__comma", [newName])]);})() : nil;
  713. smalltalk.packages[newName] = smalltalk.packages[packageName];
  714. smalltalk.send(pkg, "_name_", [newName]);
  715. smalltalk.send(self, "_deletePackage_", [packageName]);
  716. return self;}
  717. }),
  718. smalltalk.Smalltalk);
  719. smalltalk.addMethod(
  720. '_reservedWords',
  721. smalltalk.method({
  722. selector: 'reservedWords',
  723. fn: function (){
  724. var self=this;
  725. return self.reservedWords;
  726. return self;}
  727. }),
  728. smalltalk.Smalltalk);
  729. smalltalk.addMethod(
  730. '_createPackage_properties_',
  731. smalltalk.method({
  732. selector: 'createPackage:properties:',
  733. fn: function (packageName, aDict){
  734. var self=this;
  735. var object=nil;
  736. object = {};;
  737. smalltalk.send(aDict, "_keysAndValuesDo_", [(function(key, value){return object[key] = value;})]);
  738. return smalltalk.addPackage(packageName, object);
  739. return self;}
  740. }),
  741. smalltalk.Smalltalk);
  742. smalltalk.addMethod(
  743. '_readJSObject_',
  744. smalltalk.method({
  745. selector: 'readJSObject:',
  746. fn: function (anObject){
  747. var self=this;
  748. return self.readJSObject(anObject);
  749. return self;}
  750. }),
  751. smalltalk.Smalltalk);
  752. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  753. smalltalk.addMethod(
  754. '_current',
  755. smalltalk.method({
  756. selector: 'current',
  757. fn: function (){
  758. var self=this;
  759. return smalltalk;
  760. return self;}
  761. }),
  762. smalltalk.Smalltalk.klass);
  763. smalltalk.addClass('Package', smalltalk.Object, ['commitPathJs', 'commitPathSt'], 'Kernel-Objects');
  764. smalltalk.addMethod(
  765. '_name',
  766. smalltalk.method({
  767. selector: 'name',
  768. fn: function (){
  769. var self=this;
  770. return self.pkgName;
  771. return self;}
  772. }),
  773. smalltalk.Package);
  774. smalltalk.addMethod(
  775. '_name_',
  776. smalltalk.method({
  777. selector: 'name:',
  778. fn: function (aString){
  779. var self=this;
  780. self.pkgName = aString;
  781. return self;}
  782. }),
  783. smalltalk.Package);
  784. smalltalk.addMethod(
  785. '_classes',
  786. smalltalk.method({
  787. selector: 'classes',
  788. fn: function (){
  789. var self=this;
  790. return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", []), "_select_", [(function(c){return smalltalk.send(smalltalk.send(c, "_package", []), "__eq_eq", [self]);})]);
  791. return self;}
  792. }),
  793. smalltalk.Package);
  794. smalltalk.addMethod(
  795. '_printString',
  796. smalltalk.method({
  797. selector: 'printString',
  798. fn: function (){
  799. var self=this;
  800. return smalltalk.send(self, "_name", []);
  801. return self;}
  802. }),
  803. smalltalk.Package);
  804. smalltalk.addMethod(
  805. '_dependencies',
  806. smalltalk.method({
  807. selector: 'dependencies',
  808. fn: function (){
  809. var self=this;
  810. return smalltalk.send(self, "_propertyAt_ifAbsent_", ["dependencies", (function(){return [];})]);
  811. return self;}
  812. }),
  813. smalltalk.Package);
  814. smalltalk.addMethod(
  815. '_dependencies_',
  816. smalltalk.method({
  817. selector: 'dependencies:',
  818. fn: function (anArray){
  819. var self=this;
  820. return smalltalk.send(self, "_propertyAt_put_", ["dependencies", anArray]);
  821. return self;}
  822. }),
  823. smalltalk.Package);
  824. smalltalk.addMethod(
  825. '_properties',
  826. smalltalk.method({
  827. selector: 'properties',
  828. fn: function (){
  829. var self=this;
  830. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_readJSObject_", [smalltalk.send(self, "_basicAt_", ["properties"])]);
  831. return self;}
  832. }),
  833. smalltalk.Package);
  834. smalltalk.addMethod(
  835. '_propertiesAsJSON',
  836. smalltalk.method({
  837. selector: 'propertiesAsJSON',
  838. fn: function (){
  839. var self=this;
  840. return JSON.stringify(self.properties);
  841. return self;}
  842. }),
  843. smalltalk.Package);
  844. smalltalk.addMethod(
  845. '_properties_',
  846. smalltalk.method({
  847. selector: 'properties:',
  848. fn: function (aDict){
  849. var self=this;
  850. var object=nil;
  851. object = {};;
  852. smalltalk.send(aDict, "_keysAndValuesDo_", [(function(key, value){return object[key] = value;})]);
  853. return self.properties = object;
  854. return self;}
  855. }),
  856. smalltalk.Package);
  857. smalltalk.addMethod(
  858. '_jsProperties',
  859. smalltalk.method({
  860. selector: 'jsProperties',
  861. fn: function (){
  862. var self=this;
  863. return self.properties;
  864. return self;}
  865. }),
  866. smalltalk.Package);
  867. smalltalk.addMethod(
  868. '_jsProperties_',
  869. smalltalk.method({
  870. selector: 'jsProperties:',
  871. fn: function (aJSObject){
  872. var self=this;
  873. return self.properties = aJSObject;
  874. return self;}
  875. }),
  876. smalltalk.Package);
  877. smalltalk.addMethod(
  878. '_propertyAt_',
  879. smalltalk.method({
  880. selector: 'propertyAt:',
  881. fn: function (key){
  882. var self=this;
  883. return self.properties[key];
  884. return self;}
  885. }),
  886. smalltalk.Package);
  887. smalltalk.addMethod(
  888. '_propertyAt_put_',
  889. smalltalk.method({
  890. selector: 'propertyAt:put:',
  891. fn: function (key, value){
  892. var self=this;
  893. return self.properties[key] = value;
  894. return self;}
  895. }),
  896. smalltalk.Package);
  897. smalltalk.addMethod(
  898. '_propertyAt_ifAbsent_',
  899. smalltalk.method({
  900. selector: 'propertyAt:ifAbsent:',
  901. fn: function (key, block){
  902. var self=this;
  903. return (($receiver = smalltalk.send(self, "_propertyAt_", [key])) == nil || $receiver == undefined) ? (function(){return smalltalk.send(block, "_value", []);})() : $receiver;
  904. return self;}
  905. }),
  906. smalltalk.Package);
  907. smalltalk.addMethod(
  908. '_commitPathJs',
  909. smalltalk.method({
  910. selector: 'commitPathJs',
  911. fn: function (){
  912. var self=this;
  913. return (($receiver = self['@commitPathJs']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_defaultCommitPathJs", []);})() : $receiver;
  914. return self;}
  915. }),
  916. smalltalk.Package);
  917. smalltalk.addMethod(
  918. '_commitPathJs_',
  919. smalltalk.method({
  920. selector: 'commitPathJs:',
  921. fn: function (aString){
  922. var self=this;
  923. self['@commitPathJs']=aString;
  924. return self;}
  925. }),
  926. smalltalk.Package);
  927. smalltalk.addMethod(
  928. '_commitPathSt',
  929. smalltalk.method({
  930. selector: 'commitPathSt',
  931. fn: function (){
  932. var self=this;
  933. return (($receiver = self['@commitPathSt']) == nil || $receiver == undefined) ? (function(){return smalltalk.send(smalltalk.send(self, "_class", []), "_defaultCommitPathSt", []);})() : $receiver;
  934. return self;}
  935. }),
  936. smalltalk.Package);
  937. smalltalk.addMethod(
  938. '_commitPathSt_',
  939. smalltalk.method({
  940. selector: 'commitPathSt:',
  941. fn: function (aString){
  942. var self=this;
  943. self['@commitPathSt']=aString;
  944. return self;}
  945. }),
  946. smalltalk.Package);
  947. smalltalk.Package.klass.iVarNames = ['defaultCommitPathJs','defaultCommitPathSt'];
  948. smalltalk.addMethod(
  949. '_named_',
  950. smalltalk.method({
  951. selector: 'named:',
  952. fn: function (aPackageName){
  953. var self=this;
  954. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_", [aPackageName]);
  955. return self;}
  956. }),
  957. smalltalk.Package.klass);
  958. smalltalk.addMethod(
  959. '_named_ifAbsent_',
  960. smalltalk.method({
  961. selector: 'named:ifAbsent:',
  962. fn: function (aPackageName, aBlock){
  963. var self=this;
  964. return smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_ifAbsent_", [aPackageName, aBlock]);
  965. return self;}
  966. }),
  967. smalltalk.Package.klass);
  968. smalltalk.addMethod(
  969. '_defaultCommitPathJs',
  970. smalltalk.method({
  971. selector: 'defaultCommitPathJs',
  972. fn: function (){
  973. var self=this;
  974. return (($receiver = self['@defaultCommitPathJs']) == nil || $receiver == undefined) ? (function(){return self['@defaultCommitPathJs']="js";})() : $receiver;
  975. return self;}
  976. }),
  977. smalltalk.Package.klass);
  978. smalltalk.addMethod(
  979. '_defaultCommitPathJs_',
  980. smalltalk.method({
  981. selector: 'defaultCommitPathJs:',
  982. fn: function (aString){
  983. var self=this;
  984. self['@defaultCommitPathJs']=aString;
  985. return self;}
  986. }),
  987. smalltalk.Package.klass);
  988. smalltalk.addMethod(
  989. '_defaultCommitPathSt',
  990. smalltalk.method({
  991. selector: 'defaultCommitPathSt',
  992. fn: function (){
  993. var self=this;
  994. return (($receiver = self['@defaultCommitPathSt']) == nil || $receiver == undefined) ? (function(){return self['@defaultCommitPathSt']="st";})() : $receiver;
  995. return self;}
  996. }),
  997. smalltalk.Package.klass);
  998. smalltalk.addMethod(
  999. '_defaultCommitPathSt_',
  1000. smalltalk.method({
  1001. selector: 'defaultCommitPathSt:',
  1002. fn: function (aString){
  1003. var self=this;
  1004. self['@defaultCommitPathSt']=aString;
  1005. return self;}
  1006. }),
  1007. smalltalk.Package.klass);
  1008. smalltalk.addMethod(
  1009. '_resetCommitPaths',
  1010. smalltalk.method({
  1011. selector: 'resetCommitPaths',
  1012. fn: function (){
  1013. var self=this;
  1014. self['@defaultCommitPathJs']=nil;
  1015. self['@defaultCommitPathSt']=nil;
  1016. return self;}
  1017. }),
  1018. smalltalk.Package.klass);
  1019. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel-Objects');
  1020. smalltalk.addMethod(
  1021. '__eq',
  1022. smalltalk.method({
  1023. selector: '=',
  1024. fn: function (aNumber){
  1025. var self=this;
  1026. try{((($receiver = smalltalk.send(aNumber, "_isNumber", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  1027. return Number(self) == aNumber;
  1028. return self;
  1029. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}}
  1030. }),
  1031. smalltalk.Number);
  1032. smalltalk.addMethod(
  1033. '__gt',
  1034. smalltalk.method({
  1035. selector: '>',
  1036. fn: function (aNumber){
  1037. var self=this;
  1038. return self > aNumber;
  1039. return self;}
  1040. }),
  1041. smalltalk.Number);
  1042. smalltalk.addMethod(
  1043. '__lt',
  1044. smalltalk.method({
  1045. selector: '<',
  1046. fn: function (aNumber){
  1047. var self=this;
  1048. return self < aNumber;
  1049. return self;}
  1050. }),
  1051. smalltalk.Number);
  1052. smalltalk.addMethod(
  1053. '__gt_eq',
  1054. smalltalk.method({
  1055. selector: '>=',
  1056. fn: function (aNumber){
  1057. var self=this;
  1058. return self >= aNumber;
  1059. return self;}
  1060. }),
  1061. smalltalk.Number);
  1062. smalltalk.addMethod(
  1063. '__lt_eq',
  1064. smalltalk.method({
  1065. selector: '<=',
  1066. fn: function (aNumber){
  1067. var self=this;
  1068. return self <= aNumber;
  1069. return self;}
  1070. }),
  1071. smalltalk.Number);
  1072. smalltalk.addMethod(
  1073. '__plus',
  1074. smalltalk.method({
  1075. selector: '+',
  1076. fn: function (aNumber){
  1077. var self=this;
  1078. return self + aNumber;
  1079. return self;}
  1080. }),
  1081. smalltalk.Number);
  1082. smalltalk.addMethod(
  1083. '__minus',
  1084. smalltalk.method({
  1085. selector: '-',
  1086. fn: function (aNumber){
  1087. var self=this;
  1088. return self - aNumber;
  1089. return self;}
  1090. }),
  1091. smalltalk.Number);
  1092. smalltalk.addMethod(
  1093. '__star',
  1094. smalltalk.method({
  1095. selector: '*',
  1096. fn: function (aNumber){
  1097. var self=this;
  1098. return self * aNumber;
  1099. return self;}
  1100. }),
  1101. smalltalk.Number);
  1102. smalltalk.addMethod(
  1103. '__slash',
  1104. smalltalk.method({
  1105. selector: '/',
  1106. fn: function (aNumber){
  1107. var self=this;
  1108. return self / aNumber;
  1109. return self;}
  1110. }),
  1111. smalltalk.Number);
  1112. smalltalk.addMethod(
  1113. '_max_',
  1114. smalltalk.method({
  1115. selector: 'max:',
  1116. fn: function (aNumber){
  1117. var self=this;
  1118. return Math.max(self, aNumber);;
  1119. return self;}
  1120. }),
  1121. smalltalk.Number);
  1122. smalltalk.addMethod(
  1123. '_min_',
  1124. smalltalk.method({
  1125. selector: 'min:',
  1126. fn: function (aNumber){
  1127. var self=this;
  1128. return Math.min(self, aNumber);;
  1129. return self;}
  1130. }),
  1131. smalltalk.Number);
  1132. smalltalk.addMethod(
  1133. '_rounded',
  1134. smalltalk.method({
  1135. selector: 'rounded',
  1136. fn: function (){
  1137. var self=this;
  1138. return Math.round(self);;
  1139. return self;}
  1140. }),
  1141. smalltalk.Number);
  1142. smalltalk.addMethod(
  1143. '_truncated',
  1144. smalltalk.method({
  1145. selector: 'truncated',
  1146. fn: function (){
  1147. var self=this;
  1148. var result=nil;
  1149. ((($receiver = self >= (0)).klass === smalltalk.Boolean) ? ($receiver ? (function(){return result = Math.floor(self);;})() : (function(){return result = (Math.floor(self * (-1)) * (-1));;})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return result = Math.floor(self);;}), (function(){return result = (Math.floor(self * (-1)) * (-1));;})]));
  1150. return result;
  1151. return self;}
  1152. }),
  1153. smalltalk.Number);
  1154. smalltalk.addMethod(
  1155. '_to_',
  1156. smalltalk.method({
  1157. selector: 'to:',
  1158. fn: function (aNumber){
  1159. var self=this;
  1160. var array=nil;
  1161. var first=nil;
  1162. var last=nil;
  1163. var count=nil;
  1164. first=smalltalk.send(self, "_truncated", []);
  1165. last=((($receiver = smalltalk.send(aNumber, "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));
  1166. count=(1);
  1167. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  1168. smalltalk.send(((($receiver = last).klass === smalltalk.Number) ? $receiver -first : smalltalk.send($receiver, "__minus", [first])), "_timesRepeat_", [(function(){smalltalk.send(array, "_at_put_", [count, first]);count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return first=((($receiver = first).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})]);
  1169. return array;
  1170. return self;}
  1171. }),
  1172. smalltalk.Number);
  1173. smalltalk.addMethod(
  1174. '_timesRepeat_',
  1175. smalltalk.method({
  1176. selector: 'timesRepeat:',
  1177. fn: function (aBlock){
  1178. var self=this;
  1179. var integer=nil;
  1180. var count=nil;
  1181. integer=smalltalk.send(self, "_truncated", []);
  1182. count=(1);
  1183. (function(){while(!(function(){return ((($receiver = count).klass === smalltalk.Number) ? $receiver >self : smalltalk.send($receiver, "__gt", [self]));})()) {(function(){smalltalk.send(aBlock, "_value", []);return count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})()}})();
  1184. return self;}
  1185. }),
  1186. smalltalk.Number);
  1187. smalltalk.addMethod(
  1188. '_to_do_',
  1189. smalltalk.method({
  1190. selector: 'to:do:',
  1191. fn: function (stop, aBlock){
  1192. var self=this;
  1193. var nextValue=nil;
  1194. nextValue=self;
  1195. (function(){while((function(){return ((($receiver = nextValue).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [nextValue]);return nextValue=((($receiver = nextValue).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})()}})();
  1196. return self;}
  1197. }),
  1198. smalltalk.Number);
  1199. smalltalk.addMethod(
  1200. '_asString',
  1201. smalltalk.method({
  1202. selector: 'asString',
  1203. fn: function (){
  1204. var self=this;
  1205. return smalltalk.send(self, "_printString", []);
  1206. return self;}
  1207. }),
  1208. smalltalk.Number);
  1209. smalltalk.addMethod(
  1210. '_asJavascript',
  1211. smalltalk.method({
  1212. selector: 'asJavascript',
  1213. fn: function (){
  1214. var self=this;
  1215. return smalltalk.send(smalltalk.send(unescape("%28"), "__comma", [smalltalk.send(self, "_printString", [])]), "__comma", [unescape("%29")]);
  1216. return self;}
  1217. }),
  1218. smalltalk.Number);
  1219. smalltalk.addMethod(
  1220. '_printString',
  1221. smalltalk.method({
  1222. selector: 'printString',
  1223. fn: function (){
  1224. var self=this;
  1225. return String(self);
  1226. return self;}
  1227. }),
  1228. smalltalk.Number);
  1229. smalltalk.addMethod(
  1230. '_isNumber',
  1231. smalltalk.method({
  1232. selector: 'isNumber',
  1233. fn: function (){
  1234. var self=this;
  1235. return true;
  1236. return self;}
  1237. }),
  1238. smalltalk.Number);
  1239. smalltalk.addMethod(
  1240. '_atRandom',
  1241. smalltalk.method({
  1242. selector: 'atRandom',
  1243. fn: function (){
  1244. var self=this;
  1245. return ((($receiver = smalltalk.send(((($receiver = smalltalk.send(smalltalk.send((smalltalk.Random || Random), "_new", []), "_next", [])).klass === smalltalk.Number) ? $receiver *self : smalltalk.send($receiver, "__star", [self])), "_truncated", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));
  1246. return self;}
  1247. }),
  1248. smalltalk.Number);
  1249. smalltalk.addMethod(
  1250. '__at',
  1251. smalltalk.method({
  1252. selector: '@',
  1253. fn: function (aNumber){
  1254. var self=this;
  1255. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, aNumber]);
  1256. return self;}
  1257. }),
  1258. smalltalk.Number);
  1259. smalltalk.addMethod(
  1260. '_asPoint',
  1261. smalltalk.method({
  1262. selector: 'asPoint',
  1263. fn: function (){
  1264. var self=this;
  1265. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [self, self]);
  1266. return self;}
  1267. }),
  1268. smalltalk.Number);
  1269. smalltalk.addMethod(
  1270. '_clearInterval',
  1271. smalltalk.method({
  1272. selector: 'clearInterval',
  1273. fn: function (){
  1274. var self=this;
  1275. clearInterval(Number(self));
  1276. return self;}
  1277. }),
  1278. smalltalk.Number);
  1279. smalltalk.addMethod(
  1280. '_clearTimeout',
  1281. smalltalk.method({
  1282. selector: 'clearTimeout',
  1283. fn: function (){
  1284. var self=this;
  1285. clearTimeout(Number(self));
  1286. return self;}
  1287. }),
  1288. smalltalk.Number);
  1289. smalltalk.addMethod(
  1290. '_even',
  1291. smalltalk.method({
  1292. selector: 'even',
  1293. fn: function (){
  1294. var self=this;
  1295. return smalltalk.send((0), "__eq", [smalltalk.send(self, "_\\\\", [(2)])]);
  1296. return self;}
  1297. }),
  1298. smalltalk.Number);
  1299. smalltalk.addMethod(
  1300. '_odd',
  1301. smalltalk.method({
  1302. selector: 'odd',
  1303. fn: function (){
  1304. var self=this;
  1305. return smalltalk.send(smalltalk.send(self, "_even", []), "_not", []);
  1306. return self;}
  1307. }),
  1308. smalltalk.Number);
  1309. smalltalk.addMethod(
  1310. '_negated',
  1311. smalltalk.method({
  1312. selector: 'negated',
  1313. fn: function (){
  1314. var self=this;
  1315. return (0) - self;
  1316. return self;}
  1317. }),
  1318. smalltalk.Number);
  1319. smalltalk.addMethod(
  1320. '_printShowingDecimalPlaces_',
  1321. smalltalk.method({
  1322. selector: 'printShowingDecimalPlaces:',
  1323. fn: function (placesDesired){
  1324. var self=this;
  1325. return self.toFixed(placesDesired);
  1326. return self;}
  1327. }),
  1328. smalltalk.Number);
  1329. smalltalk.addMethod(
  1330. '_\',
  1331. smalltalk.method({
  1332. selector: '\',
  1333. fn: function (aNumber){
  1334. var self=this;
  1335. return self % aNumber;
  1336. return self;}
  1337. }),
  1338. smalltalk.Number);
  1339. smalltalk.addMethod(
  1340. '_to_by_',
  1341. smalltalk.method({
  1342. selector: 'to:by:',
  1343. fn: function (stop, step){
  1344. var self=this;
  1345. var array=nil;
  1346. var value=nil;
  1347. var pos=nil;
  1348. value=self;
  1349. array=smalltalk.send((smalltalk.Array || Array), "_new", []);
  1350. pos=(1);
  1351. ((($receiver = smalltalk.send(step, "__eq", [(0)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})]));
  1352. ((($receiver = ((($receiver = step).klass === smalltalk.Number) ? $receiver <(0) : smalltalk.send($receiver, "__lt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})() : (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();}), (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(array, "_at_put_", [pos, value]);pos=((($receiver = pos).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})]));
  1353. return array;
  1354. return self;}
  1355. }),
  1356. smalltalk.Number);
  1357. smalltalk.addMethod(
  1358. '_to_by_do_',
  1359. smalltalk.method({
  1360. selector: 'to:by:do:',
  1361. fn: function (stop, step, aBlock){
  1362. var self=this;
  1363. var value=nil;
  1364. value=self;
  1365. ((($receiver = smalltalk.send(step, "__eq", [(0)])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_error_", [unescape("step%20must%20be%20non-zero")]);})]));
  1366. ((($receiver = ((($receiver = step).klass === smalltalk.Number) ? $receiver <(0) : smalltalk.send($receiver, "__lt", [(0)]))).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})() : (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver >=stop : smalltalk.send($receiver, "__gt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();}), (function(){return (function(){while((function(){return ((($receiver = value).klass === smalltalk.Number) ? $receiver <=stop : smalltalk.send($receiver, "__lt_eq", [stop]));})()) {(function(){smalltalk.send(aBlock, "_value_", [value]);return value=((($receiver = value).klass === smalltalk.Number) ? $receiver +step : smalltalk.send($receiver, "__plus", [step]));})()}})();})]));
  1367. return self;}
  1368. }),
  1369. smalltalk.Number);
  1370. smalltalk.addMethod(
  1371. '_deepCopy',
  1372. smalltalk.method({
  1373. selector: 'deepCopy',
  1374. fn: function (){
  1375. var self=this;
  1376. return smalltalk.send(self, "_copy", []);
  1377. return self;}
  1378. }),
  1379. smalltalk.Number);
  1380. smalltalk.addMethod(
  1381. '_copy',
  1382. smalltalk.method({
  1383. selector: 'copy',
  1384. fn: function (){
  1385. var self=this;
  1386. return self;
  1387. return self;}
  1388. }),
  1389. smalltalk.Number);
  1390. smalltalk.addMethod(
  1391. '_\\',
  1392. smalltalk.method({
  1393. selector: '\\',
  1394. fn: function (aNumber){
  1395. var self=this;
  1396. return self % aNumber;
  1397. return self;}
  1398. }),
  1399. smalltalk.Number);
  1400. smalltalk.addMethod(
  1401. '_sqrt',
  1402. smalltalk.method({
  1403. selector: 'sqrt',
  1404. fn: function (){
  1405. var self=this;
  1406. return Math.sqrt(self);
  1407. return self;}
  1408. }),
  1409. smalltalk.Number);
  1410. smalltalk.addMethod(
  1411. '_squared',
  1412. smalltalk.method({
  1413. selector: 'squared',
  1414. fn: function (){
  1415. var self=this;
  1416. return self * self;
  1417. return self;}
  1418. }),
  1419. smalltalk.Number);
  1420. smalltalk.addMethod(
  1421. '_identityHash',
  1422. smalltalk.method({
  1423. selector: 'identityHash',
  1424. fn: function (){
  1425. var self=this;
  1426. return smalltalk.send(smalltalk.send(self, "_asString", []), "__comma", ["n"]);
  1427. return self;}
  1428. }),
  1429. smalltalk.Number);
  1430. smalltalk.addMethod(
  1431. '_pi',
  1432. smalltalk.method({
  1433. selector: 'pi',
  1434. fn: function (){
  1435. var self=this;
  1436. return Math.PI;
  1437. return self;}
  1438. }),
  1439. smalltalk.Number.klass);
  1440. smalltalk.addClass('Boolean', smalltalk.Object, [], 'Kernel-Objects');
  1441. smalltalk.addMethod(
  1442. '__eq',
  1443. smalltalk.method({
  1444. selector: '=',
  1445. fn: function (aBoolean){
  1446. var self=this;
  1447. try{((($receiver = smalltalk.send(smalltalk.send(aBoolean, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  1448. return Boolean(self == true) == aBoolean;
  1449. return self;
  1450. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}}
  1451. }),
  1452. smalltalk.Boolean);
  1453. smalltalk.addMethod(
  1454. '_shallowCopy',
  1455. smalltalk.method({
  1456. selector: 'shallowCopy',
  1457. fn: function (){
  1458. var self=this;
  1459. return self;
  1460. return self;}
  1461. }),
  1462. smalltalk.Boolean);
  1463. smalltalk.addMethod(
  1464. '_deepCopy',
  1465. smalltalk.method({
  1466. selector: 'deepCopy',
  1467. fn: function (){
  1468. var self=this;
  1469. return self;
  1470. return self;}
  1471. }),
  1472. smalltalk.Boolean);
  1473. smalltalk.addMethod(
  1474. '_ifTrue_',
  1475. smalltalk.method({
  1476. selector: 'ifTrue:',
  1477. fn: function (aBlock){
  1478. var self=this;
  1479. return smalltalk.send(self, "_ifTrue_ifFalse_", [aBlock, (function(){return nil;})]);
  1480. return self;}
  1481. }),
  1482. smalltalk.Boolean);
  1483. smalltalk.addMethod(
  1484. '_ifFalse_',
  1485. smalltalk.method({
  1486. selector: 'ifFalse:',
  1487. fn: function (aBlock){
  1488. var self=this;
  1489. return smalltalk.send(self, "_ifTrue_ifFalse_", [(function(){return nil;}), aBlock]);
  1490. return self;}
  1491. }),
  1492. smalltalk.Boolean);
  1493. smalltalk.addMethod(
  1494. '_ifFalse_ifTrue_',
  1495. smalltalk.method({
  1496. selector: 'ifFalse:ifTrue:',
  1497. fn: function (aBlock, anotherBlock){
  1498. var self=this;
  1499. return smalltalk.send(self, "_ifTrue_ifFalse_", [anotherBlock, aBlock]);
  1500. return self;}
  1501. }),
  1502. smalltalk.Boolean);
  1503. smalltalk.addMethod(
  1504. '_ifTrue_ifFalse_',
  1505. smalltalk.method({
  1506. selector: 'ifTrue:ifFalse:',
  1507. fn: function (aBlock, anotherBlock){
  1508. var self=this;
  1509. if(self == true) {
  1510. return aBlock();
  1511. } else {
  1512. return anotherBlock();
  1513. }
  1514. ;
  1515. return self;}
  1516. }),
  1517. smalltalk.Boolean);
  1518. smalltalk.addMethod(
  1519. '_and_',
  1520. smalltalk.method({
  1521. selector: 'and:',
  1522. fn: function (aBlock){
  1523. var self=this;
  1524. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [aBlock, (function(){return false;})]);
  1525. return self;}
  1526. }),
  1527. smalltalk.Boolean);
  1528. smalltalk.addMethod(
  1529. '_or_',
  1530. smalltalk.method({
  1531. selector: 'or:',
  1532. fn: function (aBlock){
  1533. var self=this;
  1534. return smalltalk.send(smalltalk.send(self, "__eq", [true]), "_ifTrue_ifFalse_", [(function(){return true;}), aBlock]);
  1535. return self;}
  1536. }),
  1537. smalltalk.Boolean);
  1538. smalltalk.addMethod(
  1539. '_not',
  1540. smalltalk.method({
  1541. selector: 'not',
  1542. fn: function (){
  1543. var self=this;
  1544. return smalltalk.send(self, "__eq", [false]);
  1545. return self;}
  1546. }),
  1547. smalltalk.Boolean);
  1548. smalltalk.addMethod(
  1549. '_printString',
  1550. smalltalk.method({
  1551. selector: 'printString',
  1552. fn: function (){
  1553. var self=this;
  1554. return self.toString();
  1555. return self;}
  1556. }),
  1557. smalltalk.Boolean);
  1558. smalltalk.addMethod(
  1559. '_&',
  1560. smalltalk.method({
  1561. selector: '&',
  1562. fn: function (aBoolean){
  1563. var self=this;
  1564. if(self == true) {
  1565. return aBoolean;
  1566. } else {
  1567. return false;
  1568. }
  1569. ;
  1570. return self;}
  1571. }),
  1572. smalltalk.Boolean);
  1573. smalltalk.addMethod(
  1574. '_|',
  1575. smalltalk.method({
  1576. selector: '|',
  1577. fn: function (aBoolean){
  1578. var self=this;
  1579. if(self == true) {
  1580. return true;
  1581. } else {
  1582. return aBoolean;
  1583. }
  1584. ;
  1585. return self;}
  1586. }),
  1587. smalltalk.Boolean);
  1588. smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel-Objects');
  1589. smalltalk.addMethod(
  1590. '_year',
  1591. smalltalk.method({
  1592. selector: 'year',
  1593. fn: function (){
  1594. var self=this;
  1595. return self.getFullYear();
  1596. return self;}
  1597. }),
  1598. smalltalk.Date);
  1599. smalltalk.addMethod(
  1600. '_month',
  1601. smalltalk.method({
  1602. selector: 'month',
  1603. fn: function (){
  1604. var self=this;
  1605. return self.getMonth() + 1;
  1606. return self;}
  1607. }),
  1608. smalltalk.Date);
  1609. smalltalk.addMethod(
  1610. '_month_',
  1611. smalltalk.method({
  1612. selector: 'month:',
  1613. fn: function (aNumber){
  1614. var self=this;
  1615. self.setMonth(aNumber - 1);
  1616. return self;}
  1617. }),
  1618. smalltalk.Date);
  1619. smalltalk.addMethod(
  1620. '_day',
  1621. smalltalk.method({
  1622. selector: 'day',
  1623. fn: function (){
  1624. var self=this;
  1625. return smalltalk.send(self, "_dayOfWeek", []);
  1626. return self;}
  1627. }),
  1628. smalltalk.Date);
  1629. smalltalk.addMethod(
  1630. '_dayOfWeek',
  1631. smalltalk.method({
  1632. selector: 'dayOfWeek',
  1633. fn: function (){
  1634. var self=this;
  1635. return self.getDay() + 1;
  1636. return self;}
  1637. }),
  1638. smalltalk.Date);
  1639. smalltalk.addMethod(
  1640. '_dayOfWeek_',
  1641. smalltalk.method({
  1642. selector: 'dayOfWeek:',
  1643. fn: function (aNumber){
  1644. var self=this;
  1645. return self.setDay(aNumber - 1);
  1646. return self;}
  1647. }),
  1648. smalltalk.Date);
  1649. smalltalk.addMethod(
  1650. '_day_',
  1651. smalltalk.method({
  1652. selector: 'day:',
  1653. fn: function (aNumber){
  1654. var self=this;
  1655. smalltalk.send(self, "_day_", [aNumber]);
  1656. return self;}
  1657. }),
  1658. smalltalk.Date);
  1659. smalltalk.addMethod(
  1660. '_year_',
  1661. smalltalk.method({
  1662. selector: 'year:',
  1663. fn: function (aNumber){
  1664. var self=this;
  1665. self.setFullYear(aNumber);
  1666. return self;}
  1667. }),
  1668. smalltalk.Date);
  1669. smalltalk.addMethod(
  1670. '_dayOfMonth',
  1671. smalltalk.method({
  1672. selector: 'dayOfMonth',
  1673. fn: function (){
  1674. var self=this;
  1675. return self.getDate();
  1676. return self;}
  1677. }),
  1678. smalltalk.Date);
  1679. smalltalk.addMethod(
  1680. '_dayOfMonth_',
  1681. smalltalk.method({
  1682. selector: 'dayOfMonth:',
  1683. fn: function (aNumber){
  1684. var self=this;
  1685. self.setDate(aNumber);
  1686. return self;}
  1687. }),
  1688. smalltalk.Date);
  1689. smalltalk.addMethod(
  1690. '_asString',
  1691. smalltalk.method({
  1692. selector: 'asString',
  1693. fn: function (){
  1694. var self=this;
  1695. return self.toString();
  1696. return self;}
  1697. }),
  1698. smalltalk.Date);
  1699. smalltalk.addMethod(
  1700. '_printString',
  1701. smalltalk.method({
  1702. selector: 'printString',
  1703. fn: function (){
  1704. var self=this;
  1705. return smalltalk.send(self, "_asString", []);
  1706. return self;}
  1707. }),
  1708. smalltalk.Date);
  1709. smalltalk.addMethod(
  1710. '_asMilliseconds',
  1711. smalltalk.method({
  1712. selector: 'asMilliseconds',
  1713. fn: function (){
  1714. var self=this;
  1715. return smalltalk.send(self, "_time", []);
  1716. return self;}
  1717. }),
  1718. smalltalk.Date);
  1719. smalltalk.addMethod(
  1720. '_time',
  1721. smalltalk.method({
  1722. selector: 'time',
  1723. fn: function (){
  1724. var self=this;
  1725. return self.getTime();
  1726. return self;}
  1727. }),
  1728. smalltalk.Date);
  1729. smalltalk.addMethod(
  1730. '_time_',
  1731. smalltalk.method({
  1732. selector: 'time:',
  1733. fn: function (aNumber){
  1734. var self=this;
  1735. self.setTime(aNumber);
  1736. return self;}
  1737. }),
  1738. smalltalk.Date);
  1739. smalltalk.addMethod(
  1740. '_asDateString',
  1741. smalltalk.method({
  1742. selector: 'asDateString',
  1743. fn: function (){
  1744. var self=this;
  1745. return self.toDateString();
  1746. return self;}
  1747. }),
  1748. smalltalk.Date);
  1749. smalltalk.addMethod(
  1750. '_asTimeString',
  1751. smalltalk.method({
  1752. selector: 'asTimeString',
  1753. fn: function (){
  1754. var self=this;
  1755. return self.toTimeString();
  1756. return self;}
  1757. }),
  1758. smalltalk.Date);
  1759. smalltalk.addMethod(
  1760. '_asLocaleString',
  1761. smalltalk.method({
  1762. selector: 'asLocaleString',
  1763. fn: function (){
  1764. var self=this;
  1765. return self.toLocaleString();
  1766. return self;}
  1767. }),
  1768. smalltalk.Date);
  1769. smalltalk.addMethod(
  1770. '_asNumber',
  1771. smalltalk.method({
  1772. selector: 'asNumber',
  1773. fn: function (){
  1774. var self=this;
  1775. return smalltalk.send(self, "_asMilliseconds", []);
  1776. return self;}
  1777. }),
  1778. smalltalk.Date);
  1779. smalltalk.addMethod(
  1780. '_hours_',
  1781. smalltalk.method({
  1782. selector: 'hours:',
  1783. fn: function (aNumber){
  1784. var self=this;
  1785. self.setHours(aNumber);
  1786. return self;}
  1787. }),
  1788. smalltalk.Date);
  1789. smalltalk.addMethod(
  1790. '_minutes_',
  1791. smalltalk.method({
  1792. selector: 'minutes:',
  1793. fn: function (aNumber){
  1794. var self=this;
  1795. self.setMinutes(aNumber);
  1796. return self;}
  1797. }),
  1798. smalltalk.Date);
  1799. smalltalk.addMethod(
  1800. '_seconds_',
  1801. smalltalk.method({
  1802. selector: 'seconds:',
  1803. fn: function (aNumber){
  1804. var self=this;
  1805. self.setSeconds(aNumber);
  1806. return self;}
  1807. }),
  1808. smalltalk.Date);
  1809. smalltalk.addMethod(
  1810. '_milliseconds_',
  1811. smalltalk.method({
  1812. selector: 'milliseconds:',
  1813. fn: function (aNumber){
  1814. var self=this;
  1815. self.setMilliseconds(aNumber);
  1816. return self;}
  1817. }),
  1818. smalltalk.Date);
  1819. smalltalk.addMethod(
  1820. '_hours',
  1821. smalltalk.method({
  1822. selector: 'hours',
  1823. fn: function (){
  1824. var self=this;
  1825. return self.getHours();
  1826. return self;}
  1827. }),
  1828. smalltalk.Date);
  1829. smalltalk.addMethod(
  1830. '_minutes',
  1831. smalltalk.method({
  1832. selector: 'minutes',
  1833. fn: function (){
  1834. var self=this;
  1835. return self.getMinutes();
  1836. return self;}
  1837. }),
  1838. smalltalk.Date);
  1839. smalltalk.addMethod(
  1840. '_seconds',
  1841. smalltalk.method({
  1842. selector: 'seconds',
  1843. fn: function (){
  1844. var self=this;
  1845. return self.getSeconds();
  1846. return self;}
  1847. }),
  1848. smalltalk.Date);
  1849. smalltalk.addMethod(
  1850. '_milliseconds',
  1851. smalltalk.method({
  1852. selector: 'milliseconds',
  1853. fn: function (){
  1854. var self=this;
  1855. return self.getMilliseconds();
  1856. return self;}
  1857. }),
  1858. smalltalk.Date);
  1859. smalltalk.addMethod(
  1860. '__lt',
  1861. smalltalk.method({
  1862. selector: '<',
  1863. fn: function (aDate){
  1864. var self=this;
  1865. return self < aDate;
  1866. return self;}
  1867. }),
  1868. smalltalk.Date);
  1869. smalltalk.addMethod(
  1870. '__gt',
  1871. smalltalk.method({
  1872. selector: '>',
  1873. fn: function (aDate){
  1874. var self=this;
  1875. return self > aDate;
  1876. return self;}
  1877. }),
  1878. smalltalk.Date);
  1879. smalltalk.addMethod(
  1880. '__lt_eq',
  1881. smalltalk.method({
  1882. selector: '<=',
  1883. fn: function (aDate){
  1884. var self=this;
  1885. return self <= aDate;
  1886. return self;}
  1887. }),
  1888. smalltalk.Date);
  1889. smalltalk.addMethod(
  1890. '__gt_eq',
  1891. smalltalk.method({
  1892. selector: '>=',
  1893. fn: function (aDate){
  1894. var self=this;
  1895. return self >= aDate;
  1896. return self;}
  1897. }),
  1898. smalltalk.Date);
  1899. smalltalk.addMethod(
  1900. '__minus',
  1901. smalltalk.method({
  1902. selector: '-',
  1903. fn: function (aDate){
  1904. var self=this;
  1905. return self - aDate;
  1906. return self;}
  1907. }),
  1908. smalltalk.Date);
  1909. smalltalk.addMethod(
  1910. '__plus',
  1911. smalltalk.method({
  1912. selector: '+',
  1913. fn: function (aDate){
  1914. var self=this;
  1915. return self + aDate;
  1916. return self;}
  1917. }),
  1918. smalltalk.Date);
  1919. smalltalk.addMethod(
  1920. '_new_',
  1921. smalltalk.method({
  1922. selector: 'new:',
  1923. fn: function (anObject){
  1924. var self=this;
  1925. return new Date(anObject);
  1926. return self;}
  1927. }),
  1928. smalltalk.Date.klass);
  1929. smalltalk.addMethod(
  1930. '_fromString_',
  1931. smalltalk.method({
  1932. selector: 'fromString:',
  1933. fn: function (aString){
  1934. var self=this;
  1935. return smalltalk.send(self, "_new_", [aString]);
  1936. return self;}
  1937. }),
  1938. smalltalk.Date.klass);
  1939. smalltalk.addMethod(
  1940. '_fromSeconds_',
  1941. smalltalk.method({
  1942. selector: 'fromSeconds:',
  1943. fn: function (aNumber){
  1944. var self=this;
  1945. return smalltalk.send(self, "_fromMilliseconds_", [((($receiver = aNumber).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))]);
  1946. return self;}
  1947. }),
  1948. smalltalk.Date.klass);
  1949. smalltalk.addMethod(
  1950. '_fromMilliseconds_',
  1951. smalltalk.method({
  1952. selector: 'fromMilliseconds:',
  1953. fn: function (aNumber){
  1954. var self=this;
  1955. return smalltalk.send(self, "_new_", [aNumber]);
  1956. return self;}
  1957. }),
  1958. smalltalk.Date.klass);
  1959. smalltalk.addMethod(
  1960. '_today',
  1961. smalltalk.method({
  1962. selector: 'today',
  1963. fn: function (){
  1964. var self=this;
  1965. return smalltalk.send(self, "_new", []);
  1966. return self;}
  1967. }),
  1968. smalltalk.Date.klass);
  1969. smalltalk.addMethod(
  1970. '_now',
  1971. smalltalk.method({
  1972. selector: 'now',
  1973. fn: function (){
  1974. var self=this;
  1975. return smalltalk.send(self, "_today", []);
  1976. return self;}
  1977. }),
  1978. smalltalk.Date.klass);
  1979. smalltalk.addMethod(
  1980. '_millisecondsToRun_',
  1981. smalltalk.method({
  1982. selector: 'millisecondsToRun:',
  1983. fn: function (aBlock){
  1984. var self=this;
  1985. var t=nil;
  1986. t=smalltalk.send((smalltalk.Date || Date), "_now", []);
  1987. smalltalk.send(aBlock, "_value", []);
  1988. return ((($receiver = smalltalk.send((smalltalk.Date || Date), "_now", [])).klass === smalltalk.Number) ? $receiver -t : smalltalk.send($receiver, "__minus", [t]));
  1989. return self;}
  1990. }),
  1991. smalltalk.Date.klass);
  1992. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel-Objects');
  1993. smalltalk.addMethod(
  1994. '_subclass_instanceVariableNames_',
  1995. smalltalk.method({
  1996. selector: 'subclass:instanceVariableNames:',
  1997. fn: function (aString, anotherString){
  1998. var self=this;
  1999. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, anotherString, nil]);
  2000. return self;}
  2001. }),
  2002. smalltalk.UndefinedObject);
  2003. smalltalk.addMethod(
  2004. '_subclass_instanceVariableNames_category_',
  2005. smalltalk.method({
  2006. selector: 'subclass:instanceVariableNames:category:',
  2007. fn: function (aString, aString2, aString3){
  2008. var self=this;
  2009. smalltalk.send(self, "_deprecatedAPI", []);
  2010. return smalltalk.send(self, "_subclass_instanceVariableNames_package_", [aString, aString2, aString3]);
  2011. return self;}
  2012. }),
  2013. smalltalk.UndefinedObject);
  2014. smalltalk.addMethod(
  2015. '_shallowCopy',
  2016. smalltalk.method({
  2017. selector: 'shallowCopy',
  2018. fn: function (){
  2019. var self=this;
  2020. return self;
  2021. return self;}
  2022. }),
  2023. smalltalk.UndefinedObject);
  2024. smalltalk.addMethod(
  2025. '_deepCopy',
  2026. smalltalk.method({
  2027. selector: 'deepCopy',
  2028. fn: function (){
  2029. var self=this;
  2030. return self;
  2031. return self;}
  2032. }),
  2033. smalltalk.UndefinedObject);
  2034. smalltalk.addMethod(
  2035. '_ifNil_',
  2036. smalltalk.method({
  2037. selector: 'ifNil:',
  2038. fn: function (aBlock){
  2039. var self=this;
  2040. return smalltalk.send(self, "_ifNil_ifNotNil_", [aBlock, (function(){return nil;})]);
  2041. return self;}
  2042. }),
  2043. smalltalk.UndefinedObject);
  2044. smalltalk.addMethod(
  2045. '_ifNotNil_',
  2046. smalltalk.method({
  2047. selector: 'ifNotNil:',
  2048. fn: function (aBlock){
  2049. var self=this;
  2050. return self;
  2051. return self;}
  2052. }),
  2053. smalltalk.UndefinedObject);
  2054. smalltalk.addMethod(
  2055. '_ifNil_ifNotNil_',
  2056. smalltalk.method({
  2057. selector: 'ifNil:ifNotNil:',
  2058. fn: function (aBlock, anotherBlock){
  2059. var self=this;
  2060. return smalltalk.send(aBlock, "_value", []);
  2061. return self;}
  2062. }),
  2063. smalltalk.UndefinedObject);
  2064. smalltalk.addMethod(
  2065. '_ifNotNil_ifNil_',
  2066. smalltalk.method({
  2067. selector: 'ifNotNil:ifNil:',
  2068. fn: function (aBlock, anotherBlock){
  2069. var self=this;
  2070. return smalltalk.send(anotherBlock, "_value", []);
  2071. return self;}
  2072. }),
  2073. smalltalk.UndefinedObject);
  2074. smalltalk.addMethod(
  2075. '_isNil',
  2076. smalltalk.method({
  2077. selector: 'isNil',
  2078. fn: function (){
  2079. var self=this;
  2080. return true;
  2081. return self;}
  2082. }),
  2083. smalltalk.UndefinedObject);
  2084. smalltalk.addMethod(
  2085. '_notNil',
  2086. smalltalk.method({
  2087. selector: 'notNil',
  2088. fn: function (){
  2089. var self=this;
  2090. return false;
  2091. return self;}
  2092. }),
  2093. smalltalk.UndefinedObject);
  2094. smalltalk.addMethod(
  2095. '_printString',
  2096. smalltalk.method({
  2097. selector: 'printString',
  2098. fn: function (){
  2099. var self=this;
  2100. return "nil";
  2101. return self;}
  2102. }),
  2103. smalltalk.UndefinedObject);
  2104. smalltalk.addMethod(
  2105. '_subclass_instanceVariableNames_package_',
  2106. smalltalk.method({
  2107. selector: 'subclass:instanceVariableNames:package:',
  2108. fn: function (aString, aString2, aString3){
  2109. var self=this;
  2110. return smalltalk.send(smalltalk.send((smalltalk.ClassBuilder || ClassBuilder), "_new", []), "_superclass_subclass_instanceVariableNames_package_", [self, aString, aString2, aString3]);
  2111. return self;}
  2112. }),
  2113. smalltalk.UndefinedObject);
  2114. smalltalk.addMethod(
  2115. '_new',
  2116. smalltalk.method({
  2117. selector: 'new',
  2118. fn: function (){
  2119. var self=this;
  2120. smalltalk.send(self, "_error_", ["You cannot create new instances of UndefinedObject. Use nil"]);
  2121. return self;}
  2122. }),
  2123. smalltalk.UndefinedObject.klass);
  2124. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel-Objects');
  2125. smalltalk.addMethod(
  2126. '_next',
  2127. smalltalk.method({
  2128. selector: 'next',
  2129. fn: function (){
  2130. var self=this;
  2131. return Math.random();
  2132. return self;}
  2133. }),
  2134. smalltalk.Random);
  2135. smalltalk.addMethod(
  2136. '_next_',
  2137. smalltalk.method({
  2138. selector: 'next:',
  2139. fn: function (anInteger){
  2140. var self=this;
  2141. return smalltalk.send(smalltalk.send((1), "_to_", [anInteger]), "_collect_", [(function(each){return smalltalk.send(self, "_next", []);})]);
  2142. return self;}
  2143. }),
  2144. smalltalk.Random);
  2145. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel-Objects');
  2146. smalltalk.addMethod(
  2147. '_x',
  2148. smalltalk.method({
  2149. selector: 'x',
  2150. fn: function (){
  2151. var self=this;
  2152. return self['@x'];
  2153. return self;}
  2154. }),
  2155. smalltalk.Point);
  2156. smalltalk.addMethod(
  2157. '_y',
  2158. smalltalk.method({
  2159. selector: 'y',
  2160. fn: function (){
  2161. var self=this;
  2162. return self['@y'];
  2163. return self;}
  2164. }),
  2165. smalltalk.Point);
  2166. smalltalk.addMethod(
  2167. '_y_',
  2168. smalltalk.method({
  2169. selector: 'y:',
  2170. fn: function (aNumber){
  2171. var self=this;
  2172. self['@y']=aNumber;
  2173. return self;}
  2174. }),
  2175. smalltalk.Point);
  2176. smalltalk.addMethod(
  2177. '_x_',
  2178. smalltalk.method({
  2179. selector: 'x:',
  2180. fn: function (aNumber){
  2181. var self=this;
  2182. self['@x']=aNumber;
  2183. return self;}
  2184. }),
  2185. smalltalk.Point);
  2186. smalltalk.addMethod(
  2187. '__star',
  2188. smalltalk.method({
  2189. selector: '*',
  2190. fn: function (aPoint){
  2191. var self=this;
  2192. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver *smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver *smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__star", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  2193. return self;}
  2194. }),
  2195. smalltalk.Point);
  2196. smalltalk.addMethod(
  2197. '__plus',
  2198. smalltalk.method({
  2199. selector: '+',
  2200. fn: function (aPoint){
  2201. var self=this;
  2202. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  2203. return self;}
  2204. }),
  2205. smalltalk.Point);
  2206. smalltalk.addMethod(
  2207. '__minus',
  2208. smalltalk.method({
  2209. selector: '-',
  2210. fn: function (aPoint){
  2211. var self=this;
  2212. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver -smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__minus", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  2213. return self;}
  2214. }),
  2215. smalltalk.Point);
  2216. smalltalk.addMethod(
  2217. '__slash',
  2218. smalltalk.method({
  2219. selector: '/',
  2220. fn: function (aPoint){
  2221. var self=this;
  2222. return smalltalk.send((smalltalk.Point || Point), "_x_y_", [((($receiver = smalltalk.send(self, "_x", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_x", [])])), ((($receiver = smalltalk.send(self, "_y", [])).klass === smalltalk.Number) ? $receiver /smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", []) : smalltalk.send($receiver, "__slash", [smalltalk.send(smalltalk.send(aPoint, "_asPoint", []), "_y", [])]))]);
  2223. return self;}
  2224. }),
  2225. smalltalk.Point);
  2226. smalltalk.addMethod(
  2227. '_asPoint',
  2228. smalltalk.method({
  2229. selector: 'asPoint',
  2230. fn: function (){
  2231. var self=this;
  2232. return self;
  2233. return self;}
  2234. }),
  2235. smalltalk.Point);
  2236. smalltalk.addMethod(
  2237. '__eq',
  2238. smalltalk.method({
  2239. selector: '=',
  2240. fn: function (aPoint){
  2241. var self=this;
  2242. return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_class", []), "__eq", [smalltalk.send(self, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aPoint, "_x", []), "__eq", [smalltalk.send(self, "_x", [])]), "_&", [smalltalk.send(smalltalk.send(aPoint, "_y", []), "__eq", [smalltalk.send(self, "_y", [])])]);})]);
  2243. return self;}
  2244. }),
  2245. smalltalk.Point);
  2246. smalltalk.addMethod(
  2247. '_x_y_',
  2248. smalltalk.method({
  2249. selector: 'x:y:',
  2250. fn: function (aNumber, anotherNumber){
  2251. var self=this;
  2252. return (function($rec){smalltalk.send($rec, "_x_", [aNumber]);smalltalk.send($rec, "_y_", [anotherNumber]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  2253. return self;}
  2254. }),
  2255. smalltalk.Point.klass);
  2256. smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Objects');
  2257. smalltalk.addMethod(
  2258. '_jsObject_',
  2259. smalltalk.method({
  2260. selector: 'jsObject:',
  2261. fn: function (aJSObject){
  2262. var self=this;
  2263. self['@jsObject']=aJSObject;
  2264. return self;}
  2265. }),
  2266. smalltalk.JSObjectProxy);
  2267. smalltalk.addMethod(
  2268. '_jsObject',
  2269. smalltalk.method({
  2270. selector: 'jsObject',
  2271. fn: function (){
  2272. var self=this;
  2273. return self['@jsObject'];
  2274. return self;}
  2275. }),
  2276. smalltalk.JSObjectProxy);
  2277. smalltalk.addMethod(
  2278. '_printString',
  2279. smalltalk.method({
  2280. selector: 'printString',
  2281. fn: function (){
  2282. var self=this;
  2283. return smalltalk.send(smalltalk.send(self, "_jsObject", []), "_toString", []);
  2284. return self;}
  2285. }),
  2286. smalltalk.JSObjectProxy);
  2287. smalltalk.addMethod(
  2288. '_inspectOn_',
  2289. smalltalk.method({
  2290. selector: 'inspectOn:',
  2291. fn: function (anInspector){
  2292. var self=this;
  2293. var variables=nil;
  2294. variables=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []);
  2295. smalltalk.send(variables, "_at_put_", [unescape("%23self"), smalltalk.send(self, "_jsObject", [])]);
  2296. smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
  2297. for(var i in self['@jsObject']) {
  2298. variables._at_put_(i, self['@jsObject'][i]);
  2299. };
  2300. smalltalk.send(anInspector, "_setVariables_", [variables]);
  2301. return self;}
  2302. }),
  2303. smalltalk.JSObjectProxy);
  2304. smalltalk.addMethod(
  2305. '_doesNotUnderstand_',
  2306. smalltalk.method({
  2307. selector: 'doesNotUnderstand:',
  2308. fn: function (aMessage){
  2309. var self=this;
  2310. var obj=nil;
  2311. var selector=nil;
  2312. var jsSelector=nil;
  2313. var arguments=nil;
  2314. obj=smalltalk.send(self, "_jsObject", []);
  2315. selector=smalltalk.send(aMessage, "_selector", []);
  2316. jsSelector=smalltalk.send(selector, "_asJavaScriptSelector", []);
  2317. arguments=smalltalk.send(aMessage, "_arguments", []);
  2318. if(obj[jsSelector] != undefined) {return smalltalk.send(obj, jsSelector, arguments)};
  2319. smalltalk.send(self, "_doesNotUnderstand_", [aMessage], smalltalk.Object);
  2320. return self;}
  2321. }),
  2322. smalltalk.JSObjectProxy);
  2323. smalltalk.addMethod(
  2324. '_at_',
  2325. smalltalk.method({
  2326. selector: 'at:',
  2327. fn: function (aSymbol){
  2328. var self=this;
  2329. var attr=nil;
  2330. attr=smalltalk.send(aSymbol, "_asString", []);
  2331. return self['@jsObject'][attr];
  2332. return self;}
  2333. }),
  2334. smalltalk.JSObjectProxy);
  2335. smalltalk.addMethod(
  2336. '_at_put_',
  2337. smalltalk.method({
  2338. selector: 'at:put:',
  2339. fn: function (aSymbol, anObject){
  2340. var self=this;
  2341. var attr=nil;
  2342. attr=smalltalk.send(aSymbol, "_asString", []);
  2343. self['@jsObject'][attr] = anObject;
  2344. return self;}
  2345. }),
  2346. smalltalk.JSObjectProxy);
  2347. smalltalk.addMethod(
  2348. '_on_',
  2349. smalltalk.method({
  2350. selector: 'on:',
  2351. fn: function (aJSObject){
  2352. var self=this;
  2353. return (function($rec){smalltalk.send($rec, "_jsObject_", [aJSObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  2354. return self;}
  2355. }),
  2356. smalltalk.JSObjectProxy.klass);