Kernel-Objects.deploy.js 108 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590
  1. smalltalk.addPackage('Kernel-Objects');
  2. smalltalk.addClass('Object', smalltalk.nil, [], 'Kernel-Objects');
  3. smalltalk.addMethod(
  4. "__minus_gt",
  5. smalltalk.method({
  6. selector: "->",
  7. fn: function (anObject){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) { var $1;
  10. $1=_st((smalltalk.Association || Association))._key_value_(self,anObject);
  11. return $1;
  12. }, function($ctx1) {$ctx1.fill(self,"->",{anObject:anObject},smalltalk.Object)})},
  13. messageSends: ["key:value:"]}),
  14. smalltalk.Object);
  15. smalltalk.addMethod(
  16. "__eq",
  17. smalltalk.method({
  18. selector: "=",
  19. fn: function (anObject){
  20. var self=this;
  21. return smalltalk.withContext(function($ctx1) { var $1;
  22. $1=_st(self).__eq_eq(anObject);
  23. return $1;
  24. }, function($ctx1) {$ctx1.fill(self,"=",{anObject:anObject},smalltalk.Object)})},
  25. messageSends: ["=="]}),
  26. smalltalk.Object);
  27. smalltalk.addMethod(
  28. "__eq_eq",
  29. smalltalk.method({
  30. selector: "==",
  31. fn: function (anObject){
  32. var self=this;
  33. return smalltalk.withContext(function($ctx1) { var $1;
  34. $1=_st(_st(self)._identityHash()).__eq(_st(anObject)._identityHash());
  35. return $1;
  36. }, function($ctx1) {$ctx1.fill(self,"==",{anObject:anObject},smalltalk.Object)})},
  37. messageSends: ["=", "identityHash"]}),
  38. smalltalk.Object);
  39. smalltalk.addMethod(
  40. "_asJSON",
  41. smalltalk.method({
  42. selector: "asJSON",
  43. fn: function (){
  44. var self=this;
  45. var variables;
  46. return smalltalk.withContext(function($ctx1) { var $1;
  47. variables=_st((smalltalk.HashedCollection || HashedCollection))._new();
  48. _st(_st(_st(self)._class())._allInstanceVariableNames())._do_((function(each){
  49. return smalltalk.withContext(function($ctx2) { return _st(variables)._at_put_(each,_st(_st(self)._instVarAt_(each))._asJSON());
  50. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  51. $1=variables;
  52. return $1;
  53. }, function($ctx1) {$ctx1.fill(self,"asJSON",{variables:variables},smalltalk.Object)})},
  54. messageSends: ["new", "do:", "at:put:", "asJSON", "instVarAt:", "allInstanceVariableNames", "class"]}),
  55. smalltalk.Object);
  56. smalltalk.addMethod(
  57. "_asJSONString",
  58. smalltalk.method({
  59. selector: "asJSONString",
  60. fn: function (){
  61. var self=this;
  62. return smalltalk.withContext(function($ctx1) { var $1;
  63. $1=_st((smalltalk.JSON || JSON))._stringify_(_st(self)._asJSON());
  64. return $1;
  65. }, function($ctx1) {$ctx1.fill(self,"asJSONString",{},smalltalk.Object)})},
  66. messageSends: ["stringify:", "asJSON"]}),
  67. smalltalk.Object);
  68. smalltalk.addMethod(
  69. "_asJavascript",
  70. smalltalk.method({
  71. selector: "asJavascript",
  72. fn: function (){
  73. var self=this;
  74. return smalltalk.withContext(function($ctx1) { var $1;
  75. $1=_st(self)._asString();
  76. return $1;
  77. }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Object)})},
  78. messageSends: ["asString"]}),
  79. smalltalk.Object);
  80. smalltalk.addMethod(
  81. "_asString",
  82. smalltalk.method({
  83. selector: "asString",
  84. fn: function (){
  85. var self=this;
  86. return smalltalk.withContext(function($ctx1) { var $1;
  87. $1=_st(self)._printString();
  88. return $1;
  89. }, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Object)})},
  90. messageSends: ["printString"]}),
  91. smalltalk.Object);
  92. smalltalk.addMethod(
  93. "_basicAt_",
  94. smalltalk.method({
  95. selector: "basicAt:",
  96. fn: function (aString){
  97. var self=this;
  98. return smalltalk.withContext(function($ctx1) { return self[aString];
  99. return self}, function($ctx1) {$ctx1.fill(self,"basicAt:",{aString:aString},smalltalk.Object)})},
  100. messageSends: []}),
  101. smalltalk.Object);
  102. smalltalk.addMethod(
  103. "_basicAt_put_",
  104. smalltalk.method({
  105. selector: "basicAt:put:",
  106. fn: function (aString,anObject){
  107. var self=this;
  108. return smalltalk.withContext(function($ctx1) { return self[aString] = anObject;
  109. return self}, function($ctx1) {$ctx1.fill(self,"basicAt:put:",{aString:aString,anObject:anObject},smalltalk.Object)})},
  110. messageSends: []}),
  111. smalltalk.Object);
  112. smalltalk.addMethod(
  113. "_basicDelete_",
  114. smalltalk.method({
  115. selector: "basicDelete:",
  116. fn: function (aString){
  117. var self=this;
  118. return smalltalk.withContext(function($ctx1) { delete self[aString]; return aString;
  119. return self}, function($ctx1) {$ctx1.fill(self,"basicDelete:",{aString:aString},smalltalk.Object)})},
  120. messageSends: []}),
  121. smalltalk.Object);
  122. smalltalk.addMethod(
  123. "_basicPerform_",
  124. smalltalk.method({
  125. selector: "basicPerform:",
  126. fn: function (aSymbol){
  127. var self=this;
  128. return smalltalk.withContext(function($ctx1) { var $1;
  129. $1=_st(self)._basicPerform_withArguments_(aSymbol,[]);
  130. return $1;
  131. }, function($ctx1) {$ctx1.fill(self,"basicPerform:",{aSymbol:aSymbol},smalltalk.Object)})},
  132. messageSends: ["basicPerform:withArguments:"]}),
  133. smalltalk.Object);
  134. smalltalk.addMethod(
  135. "_basicPerform_withArguments_",
  136. smalltalk.method({
  137. selector: "basicPerform:withArguments:",
  138. fn: function (aSymbol,aCollection){
  139. var self=this;
  140. return smalltalk.withContext(function($ctx1) { return self[aSymbol].apply(self, aCollection);;
  141. return self}, function($ctx1) {$ctx1.fill(self,"basicPerform:withArguments:",{aSymbol:aSymbol,aCollection:aCollection},smalltalk.Object)})},
  142. messageSends: []}),
  143. smalltalk.Object);
  144. smalltalk.addMethod(
  145. "_class",
  146. smalltalk.method({
  147. selector: "class",
  148. fn: function (){
  149. var self=this;
  150. return smalltalk.withContext(function($ctx1) { return self.klass;
  151. return self}, function($ctx1) {$ctx1.fill(self,"class",{},smalltalk.Object)})},
  152. messageSends: []}),
  153. smalltalk.Object);
  154. smalltalk.addMethod(
  155. "_copy",
  156. smalltalk.method({
  157. selector: "copy",
  158. fn: function (){
  159. var self=this;
  160. return smalltalk.withContext(function($ctx1) { var $1;
  161. $1=_st(_st(self)._shallowCopy())._postCopy();
  162. return $1;
  163. }, function($ctx1) {$ctx1.fill(self,"copy",{},smalltalk.Object)})},
  164. messageSends: ["postCopy", "shallowCopy"]}),
  165. smalltalk.Object);
  166. smalltalk.addMethod(
  167. "_deepCopy",
  168. smalltalk.method({
  169. selector: "deepCopy",
  170. fn: function (){
  171. var self=this;
  172. return smalltalk.withContext(function($ctx1) {
  173. var copy = self.klass._new();
  174. for(var i in self) {
  175. if(/^@.+/.test(i)) {
  176. copy[i] = self[i]._deepCopy();
  177. }
  178. }
  179. return copy;
  180. ;
  181. return self}, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Object)})},
  182. messageSends: []}),
  183. smalltalk.Object);
  184. smalltalk.addMethod(
  185. "_deprecatedAPI",
  186. smalltalk.method({
  187. selector: "deprecatedAPI",
  188. fn: function (){
  189. var self=this;
  190. return smalltalk.withContext(function($ctx1) { _st(console)._warn_(_st(_st(_st(_st(_st(smalltalk.getThisContext())._home())._asString()).__comma(" is deprecated! (in ")).__comma(_st(_st(_st(smalltalk.getThisContext())._home())._home())._asString())).__comma(")"));
  191. return self}, function($ctx1) {$ctx1.fill(self,"deprecatedAPI",{},smalltalk.Object)})},
  192. messageSends: ["warn:", ",", "asString", "home"]}),
  193. smalltalk.Object);
  194. smalltalk.addMethod(
  195. "_doesNotUnderstand_",
  196. smalltalk.method({
  197. selector: "doesNotUnderstand:",
  198. fn: function (aMessage){
  199. var self=this;
  200. return smalltalk.withContext(function($ctx1) { var $1,$2;
  201. $1=_st((smalltalk.MessageNotUnderstood || MessageNotUnderstood))._new();
  202. _st($1)._receiver_(self);
  203. _st($1)._message_(aMessage);
  204. $2=_st($1)._signal();
  205. return self}, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage},smalltalk.Object)})},
  206. messageSends: ["receiver:", "new", "message:", "signal"]}),
  207. smalltalk.Object);
  208. smalltalk.addMethod(
  209. "_error_",
  210. smalltalk.method({
  211. selector: "error:",
  212. fn: function (aString){
  213. var self=this;
  214. return smalltalk.withContext(function($ctx1) { _st((smalltalk.Error || Error))._signal_(aString);
  215. return self}, function($ctx1) {$ctx1.fill(self,"error:",{aString:aString},smalltalk.Object)})},
  216. messageSends: ["signal:"]}),
  217. smalltalk.Object);
  218. smalltalk.addMethod(
  219. "_halt",
  220. smalltalk.method({
  221. selector: "halt",
  222. fn: function (){
  223. var self=this;
  224. return smalltalk.withContext(function($ctx1) { _st(self)._error_("Halt encountered");
  225. return self}, function($ctx1) {$ctx1.fill(self,"halt",{},smalltalk.Object)})},
  226. messageSends: ["error:"]}),
  227. smalltalk.Object);
  228. smalltalk.addMethod(
  229. "_identityHash",
  230. smalltalk.method({
  231. selector: "identityHash",
  232. fn: function (){
  233. var self=this;
  234. return smalltalk.withContext(function($ctx1) {
  235. var hash=self.identityHash;
  236. if (hash) return hash;
  237. hash=smalltalk.nextId();
  238. Object.defineProperty(self, 'identityHash', {value:hash});
  239. return hash;
  240. ;
  241. return self}, function($ctx1) {$ctx1.fill(self,"identityHash",{},smalltalk.Object)})},
  242. messageSends: []}),
  243. smalltalk.Object);
  244. smalltalk.addMethod(
  245. "_ifNil_",
  246. smalltalk.method({
  247. selector: "ifNil:",
  248. fn: function (aBlock){
  249. var self=this;
  250. return smalltalk.withContext(function($ctx1) { var $1;
  251. $1=self;
  252. return $1;
  253. }, function($ctx1) {$ctx1.fill(self,"ifNil:",{aBlock:aBlock},smalltalk.Object)})},
  254. messageSends: []}),
  255. smalltalk.Object);
  256. smalltalk.addMethod(
  257. "_ifNil_ifNotNil_",
  258. smalltalk.method({
  259. selector: "ifNil:ifNotNil:",
  260. fn: function (aBlock,anotherBlock){
  261. var self=this;
  262. return smalltalk.withContext(function($ctx1) { var $1;
  263. $1=_st(anotherBlock)._value();
  264. return $1;
  265. }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Object)})},
  266. messageSends: ["value"]}),
  267. smalltalk.Object);
  268. smalltalk.addMethod(
  269. "_ifNotNil_",
  270. smalltalk.method({
  271. selector: "ifNotNil:",
  272. fn: function (aBlock){
  273. var self=this;
  274. return smalltalk.withContext(function($ctx1) { var $1;
  275. $1=_st(aBlock)._value();
  276. return $1;
  277. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{aBlock:aBlock},smalltalk.Object)})},
  278. messageSends: ["value"]}),
  279. smalltalk.Object);
  280. smalltalk.addMethod(
  281. "_ifNotNil_ifNil_",
  282. smalltalk.method({
  283. selector: "ifNotNil:ifNil:",
  284. fn: function (aBlock,anotherBlock){
  285. var self=this;
  286. return smalltalk.withContext(function($ctx1) { var $1;
  287. $1=_st(aBlock)._value();
  288. return $1;
  289. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Object)})},
  290. messageSends: ["value"]}),
  291. smalltalk.Object);
  292. smalltalk.addMethod(
  293. "_initialize",
  294. smalltalk.method({
  295. selector: "initialize",
  296. fn: function (){
  297. var self=this;
  298. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Object)})},
  299. messageSends: []}),
  300. smalltalk.Object);
  301. smalltalk.addMethod(
  302. "_instVarAt_",
  303. smalltalk.method({
  304. selector: "instVarAt:",
  305. fn: function (aSymbol){
  306. var self=this;
  307. return smalltalk.withContext(function($ctx1) { return self['@'+aSymbol._asString()];
  308. return self}, function($ctx1) {$ctx1.fill(self,"instVarAt:",{aSymbol:aSymbol},smalltalk.Object)})},
  309. messageSends: []}),
  310. smalltalk.Object);
  311. smalltalk.addMethod(
  312. "_instVarAt_put_",
  313. smalltalk.method({
  314. selector: "instVarAt:put:",
  315. fn: function (aSymbol,anObject){
  316. var self=this;
  317. return smalltalk.withContext(function($ctx1) { self['@' + aSymbol._asString()] = anObject;
  318. return self}, function($ctx1) {$ctx1.fill(self,"instVarAt:put:",{aSymbol:aSymbol,anObject:anObject},smalltalk.Object)})},
  319. messageSends: []}),
  320. smalltalk.Object);
  321. smalltalk.addMethod(
  322. "_isBoolean",
  323. smalltalk.method({
  324. selector: "isBoolean",
  325. fn: function (){
  326. var self=this;
  327. return smalltalk.withContext(function($ctx1) { return false;
  328. }, function($ctx1) {$ctx1.fill(self,"isBoolean",{},smalltalk.Object)})},
  329. messageSends: []}),
  330. smalltalk.Object);
  331. smalltalk.addMethod(
  332. "_isClass",
  333. smalltalk.method({
  334. selector: "isClass",
  335. fn: function (){
  336. var self=this;
  337. return smalltalk.withContext(function($ctx1) { return false;
  338. }, function($ctx1) {$ctx1.fill(self,"isClass",{},smalltalk.Object)})},
  339. messageSends: []}),
  340. smalltalk.Object);
  341. smalltalk.addMethod(
  342. "_isKindOf_",
  343. smalltalk.method({
  344. selector: "isKindOf:",
  345. fn: function (aClass){
  346. var self=this;
  347. return smalltalk.withContext(function($ctx1) { var $2,$1;
  348. $2=_st(self)._isMemberOf_(aClass);
  349. if(smalltalk.assert($2)){
  350. $1=true;
  351. } else {
  352. $1=_st(_st(self)._class())._inheritsFrom_(aClass);
  353. };
  354. return $1;
  355. }, function($ctx1) {$ctx1.fill(self,"isKindOf:",{aClass:aClass},smalltalk.Object)})},
  356. messageSends: ["ifTrue:ifFalse:", "inheritsFrom:", "class", "isMemberOf:"]}),
  357. smalltalk.Object);
  358. smalltalk.addMethod(
  359. "_isMemberOf_",
  360. smalltalk.method({
  361. selector: "isMemberOf:",
  362. fn: function (aClass){
  363. var self=this;
  364. return smalltalk.withContext(function($ctx1) { var $1;
  365. $1=_st(_st(self)._class()).__eq(aClass);
  366. return $1;
  367. }, function($ctx1) {$ctx1.fill(self,"isMemberOf:",{aClass:aClass},smalltalk.Object)})},
  368. messageSends: ["=", "class"]}),
  369. smalltalk.Object);
  370. smalltalk.addMethod(
  371. "_isMetaclass",
  372. smalltalk.method({
  373. selector: "isMetaclass",
  374. fn: function (){
  375. var self=this;
  376. return smalltalk.withContext(function($ctx1) { return false;
  377. }, function($ctx1) {$ctx1.fill(self,"isMetaclass",{},smalltalk.Object)})},
  378. messageSends: []}),
  379. smalltalk.Object);
  380. smalltalk.addMethod(
  381. "_isNil",
  382. smalltalk.method({
  383. selector: "isNil",
  384. fn: function (){
  385. var self=this;
  386. return smalltalk.withContext(function($ctx1) { return false;
  387. }, function($ctx1) {$ctx1.fill(self,"isNil",{},smalltalk.Object)})},
  388. messageSends: []}),
  389. smalltalk.Object);
  390. smalltalk.addMethod(
  391. "_isNumber",
  392. smalltalk.method({
  393. selector: "isNumber",
  394. fn: function (){
  395. var self=this;
  396. return smalltalk.withContext(function($ctx1) { return false;
  397. }, function($ctx1) {$ctx1.fill(self,"isNumber",{},smalltalk.Object)})},
  398. messageSends: []}),
  399. smalltalk.Object);
  400. smalltalk.addMethod(
  401. "_isParseFailure",
  402. smalltalk.method({
  403. selector: "isParseFailure",
  404. fn: function (){
  405. var self=this;
  406. return smalltalk.withContext(function($ctx1) { return false;
  407. }, function($ctx1) {$ctx1.fill(self,"isParseFailure",{},smalltalk.Object)})},
  408. messageSends: []}),
  409. smalltalk.Object);
  410. smalltalk.addMethod(
  411. "_isString",
  412. smalltalk.method({
  413. selector: "isString",
  414. fn: function (){
  415. var self=this;
  416. return smalltalk.withContext(function($ctx1) { return false;
  417. }, function($ctx1) {$ctx1.fill(self,"isString",{},smalltalk.Object)})},
  418. messageSends: []}),
  419. smalltalk.Object);
  420. smalltalk.addMethod(
  421. "_isSymbol",
  422. smalltalk.method({
  423. selector: "isSymbol",
  424. fn: function (){
  425. var self=this;
  426. return smalltalk.withContext(function($ctx1) { return false;
  427. }, function($ctx1) {$ctx1.fill(self,"isSymbol",{},smalltalk.Object)})},
  428. messageSends: []}),
  429. smalltalk.Object);
  430. smalltalk.addMethod(
  431. "_log_block_",
  432. smalltalk.method({
  433. selector: "log:block:",
  434. fn: function (aString,aBlock){
  435. var self=this;
  436. var result;
  437. return smalltalk.withContext(function($ctx1) { var $1;
  438. _st(console)._log_(_st(_st(aString).__comma(" time: ")).__comma(_st(_st((smalltalk.Date || Date))._millisecondsToRun_((function(){
  439. return smalltalk.withContext(function($ctx2) { result=_st(aBlock)._value();
  440. return result;
  441. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._printString()));
  442. $1=result;
  443. return $1;
  444. }, function($ctx1) {$ctx1.fill(self,"log:block:",{aString:aString,aBlock:aBlock,result:result},smalltalk.Object)})},
  445. messageSends: ["log:", ",", "printString", "millisecondsToRun:", "value"]}),
  446. smalltalk.Object);
  447. smalltalk.addMethod(
  448. "_notNil",
  449. smalltalk.method({
  450. selector: "notNil",
  451. fn: function (){
  452. var self=this;
  453. return smalltalk.withContext(function($ctx1) { var $1;
  454. $1=_st(_st(self)._isNil())._not();
  455. return $1;
  456. }, function($ctx1) {$ctx1.fill(self,"notNil",{},smalltalk.Object)})},
  457. messageSends: ["not", "isNil"]}),
  458. smalltalk.Object);
  459. smalltalk.addMethod(
  460. "_perform_",
  461. smalltalk.method({
  462. selector: "perform:",
  463. fn: function (aSymbol){
  464. var self=this;
  465. return smalltalk.withContext(function($ctx1) { var $1;
  466. $1=_st(self)._perform_withArguments_(aSymbol,[]);
  467. return $1;
  468. }, function($ctx1) {$ctx1.fill(self,"perform:",{aSymbol:aSymbol},smalltalk.Object)})},
  469. messageSends: ["perform:withArguments:"]}),
  470. smalltalk.Object);
  471. smalltalk.addMethod(
  472. "_perform_withArguments_",
  473. smalltalk.method({
  474. selector: "perform:withArguments:",
  475. fn: function (aSymbol,aCollection){
  476. var self=this;
  477. return smalltalk.withContext(function($ctx1) { return smalltalk.send(self, aSymbol._asSelector(), aCollection);
  478. return self}, function($ctx1) {$ctx1.fill(self,"perform:withArguments:",{aSymbol:aSymbol,aCollection:aCollection},smalltalk.Object)})},
  479. messageSends: []}),
  480. smalltalk.Object);
  481. smalltalk.addMethod(
  482. "_postCopy",
  483. smalltalk.method({
  484. selector: "postCopy",
  485. fn: function (){
  486. var self=this;
  487. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"postCopy",{},smalltalk.Object)})},
  488. messageSends: []}),
  489. smalltalk.Object);
  490. smalltalk.addMethod(
  491. "_printNl",
  492. smalltalk.method({
  493. selector: "printNl",
  494. fn: function (){
  495. var self=this;
  496. return smalltalk.withContext(function($ctx1) { console.log(self);
  497. return self}, function($ctx1) {$ctx1.fill(self,"printNl",{},smalltalk.Object)})},
  498. messageSends: []}),
  499. smalltalk.Object);
  500. smalltalk.addMethod(
  501. "_printString",
  502. smalltalk.method({
  503. selector: "printString",
  504. fn: function (){
  505. var self=this;
  506. return smalltalk.withContext(function($ctx1) { var $1;
  507. $1=_st("a ").__comma(_st(_st(self)._class())._name());
  508. return $1;
  509. }, function($ctx1) {$ctx1.fill(self,"printString",{},smalltalk.Object)})},
  510. messageSends: [",", "name", "class"]}),
  511. smalltalk.Object);
  512. smalltalk.addMethod(
  513. "_respondsTo_",
  514. smalltalk.method({
  515. selector: "respondsTo:",
  516. fn: function (aSelector){
  517. var self=this;
  518. return smalltalk.withContext(function($ctx1) { var $1;
  519. $1=_st(_st(self)._class())._canUnderstand_(aSelector);
  520. return $1;
  521. }, function($ctx1) {$ctx1.fill(self,"respondsTo:",{aSelector:aSelector},smalltalk.Object)})},
  522. messageSends: ["canUnderstand:", "class"]}),
  523. smalltalk.Object);
  524. smalltalk.addMethod(
  525. "_shallowCopy",
  526. smalltalk.method({
  527. selector: "shallowCopy",
  528. fn: function (){
  529. var self=this;
  530. return smalltalk.withContext(function($ctx1) {
  531. var copy = self.klass._new();
  532. for(var i in self) {
  533. if(/^@.+/.test(i)) {
  534. copy[i] = self[i];
  535. }
  536. }
  537. return copy;
  538. ;
  539. return self}, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.Object)})},
  540. messageSends: []}),
  541. smalltalk.Object);
  542. smalltalk.addMethod(
  543. "_shouldNotImplement",
  544. smalltalk.method({
  545. selector: "shouldNotImplement",
  546. fn: function (){
  547. var self=this;
  548. return smalltalk.withContext(function($ctx1) { _st(self)._error_(_st("This method should not be implemented in ").__comma(_st(_st(self)._class())._name()));
  549. return self}, function($ctx1) {$ctx1.fill(self,"shouldNotImplement",{},smalltalk.Object)})},
  550. messageSends: ["error:", ",", "name", "class"]}),
  551. smalltalk.Object);
  552. smalltalk.addMethod(
  553. "_size",
  554. smalltalk.method({
  555. selector: "size",
  556. fn: function (){
  557. var self=this;
  558. return smalltalk.withContext(function($ctx1) { _st(self)._error_("Object not indexable");
  559. return self}, function($ctx1) {$ctx1.fill(self,"size",{},smalltalk.Object)})},
  560. messageSends: ["error:"]}),
  561. smalltalk.Object);
  562. smalltalk.addMethod(
  563. "_storeOn_",
  564. smalltalk.method({
  565. selector: "storeOn:",
  566. fn: function (aStream){
  567. var self=this;
  568. return smalltalk.withContext(function($ctx1) { _st(aStream)._nextPutAll_(_st(self)._printString());
  569. return self}, function($ctx1) {$ctx1.fill(self,"storeOn:",{aStream:aStream},smalltalk.Object)})},
  570. messageSends: ["nextPutAll:", "printString"]}),
  571. smalltalk.Object);
  572. smalltalk.addMethod(
  573. "_storeString",
  574. smalltalk.method({
  575. selector: "storeString",
  576. fn: function (){
  577. var self=this;
  578. return smalltalk.withContext(function($ctx1) { var $1;
  579. $1=_st((smalltalk.String || String))._streamContents_((function(s){
  580. return smalltalk.withContext(function($ctx2) { return _st(self)._storeOn_(s);
  581. }, function($ctx2) {$ctx2.fillBlock({s:s},$ctx1)})}));
  582. return $1;
  583. }, function($ctx1) {$ctx1.fill(self,"storeString",{},smalltalk.Object)})},
  584. messageSends: ["streamContents:", "storeOn:"]}),
  585. smalltalk.Object);
  586. smalltalk.addMethod(
  587. "_subclassResponsibility",
  588. smalltalk.method({
  589. selector: "subclassResponsibility",
  590. fn: function (){
  591. var self=this;
  592. return smalltalk.withContext(function($ctx1) { _st(self)._error_("This method is a responsibility of a subclass");
  593. return self}, function($ctx1) {$ctx1.fill(self,"subclassResponsibility",{},smalltalk.Object)})},
  594. messageSends: ["error:"]}),
  595. smalltalk.Object);
  596. smalltalk.addMethod(
  597. "_test",
  598. smalltalk.method({
  599. selector: "test",
  600. fn: function (){
  601. var self=this;
  602. var a;
  603. return smalltalk.withContext(function($ctx1) { a=(1);
  604. _st(self)._halt();
  605. return self}, function($ctx1) {$ctx1.fill(self,"test",{a:a},smalltalk.Object)})},
  606. messageSends: ["halt"]}),
  607. smalltalk.Object);
  608. smalltalk.addMethod(
  609. "_throw_",
  610. smalltalk.method({
  611. selector: "throw:",
  612. fn: function (anObject){
  613. var self=this;
  614. return smalltalk.withContext(function($ctx1) { throw anObject ;
  615. return self}, function($ctx1) {$ctx1.fill(self,"throw:",{anObject:anObject},smalltalk.Object)})},
  616. messageSends: []}),
  617. smalltalk.Object);
  618. smalltalk.addMethod(
  619. "_try_catch_",
  620. smalltalk.method({
  621. selector: "try:catch:",
  622. fn: function (aBlock,anotherBlock){
  623. var self=this;
  624. return smalltalk.withContext(function($ctx1) { try{return aBlock()} catch(e) {return anotherBlock(e)};
  625. return self}, function($ctx1) {$ctx1.fill(self,"try:catch:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Object)})},
  626. messageSends: []}),
  627. smalltalk.Object);
  628. smalltalk.addMethod(
  629. "_value",
  630. smalltalk.method({
  631. selector: "value",
  632. fn: function (){
  633. var self=this;
  634. return smalltalk.withContext(function($ctx1) { return self.valueOf();
  635. return self}, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.Object)})},
  636. messageSends: []}),
  637. smalltalk.Object);
  638. smalltalk.addMethod(
  639. "_yourself",
  640. smalltalk.method({
  641. selector: "yourself",
  642. fn: function (){
  643. var self=this;
  644. return smalltalk.withContext(function($ctx1) { var $1;
  645. $1=self;
  646. return $1;
  647. }, function($ctx1) {$ctx1.fill(self,"yourself",{},smalltalk.Object)})},
  648. messageSends: []}),
  649. smalltalk.Object);
  650. smalltalk.addMethod(
  651. "__tild_eq",
  652. smalltalk.method({
  653. selector: "~=",
  654. fn: function (anObject){
  655. var self=this;
  656. return smalltalk.withContext(function($ctx1) { var $1;
  657. $1=_st(_st(self).__eq(anObject)).__eq(false);
  658. return $1;
  659. }, function($ctx1) {$ctx1.fill(self,"~=",{anObject:anObject},smalltalk.Object)})},
  660. messageSends: ["="]}),
  661. smalltalk.Object);
  662. smalltalk.addMethod(
  663. "__tild_tild",
  664. smalltalk.method({
  665. selector: "~~",
  666. fn: function (anObject){
  667. var self=this;
  668. return smalltalk.withContext(function($ctx1) { var $1;
  669. $1=_st(_st(self).__eq_eq(anObject)).__eq(false);
  670. return $1;
  671. }, function($ctx1) {$ctx1.fill(self,"~~",{anObject:anObject},smalltalk.Object)})},
  672. messageSends: ["=", "=="]}),
  673. smalltalk.Object);
  674. smalltalk.addMethod(
  675. "_initialize",
  676. smalltalk.method({
  677. selector: "initialize",
  678. fn: function (){
  679. var self=this;
  680. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Object.klass)})},
  681. messageSends: []}),
  682. smalltalk.Object.klass);
  683. smalltalk.addClass('Boolean', smalltalk.Object, [], 'Kernel-Objects');
  684. smalltalk.addMethod(
  685. "__and",
  686. smalltalk.method({
  687. selector: "&",
  688. fn: function (aBoolean){
  689. var self=this;
  690. return smalltalk.withContext(function($ctx1) {
  691. if(self == true) {
  692. return aBoolean;
  693. } else {
  694. return false;
  695. }
  696. ;
  697. return self}, function($ctx1) {$ctx1.fill(self,"&",{aBoolean:aBoolean},smalltalk.Boolean)})},
  698. messageSends: []}),
  699. smalltalk.Boolean);
  700. smalltalk.addMethod(
  701. "__eq",
  702. smalltalk.method({
  703. selector: "=",
  704. fn: function (aBoolean){
  705. var self=this;
  706. return smalltalk.withContext(function($ctx1) {
  707. if(! aBoolean._isBoolean || ! aBoolean._isBoolean()) {
  708. return false;
  709. }
  710. return Boolean(self == true) == aBoolean
  711. ;
  712. return self}, function($ctx1) {$ctx1.fill(self,"=",{aBoolean:aBoolean},smalltalk.Boolean)})},
  713. messageSends: []}),
  714. smalltalk.Boolean);
  715. smalltalk.addMethod(
  716. "__eq_eq",
  717. smalltalk.method({
  718. selector: "==",
  719. fn: function (aBoolean){
  720. var self=this;
  721. return smalltalk.withContext(function($ctx1) { var $1;
  722. $1=_st(self).__eq(aBoolean);
  723. return $1;
  724. }, function($ctx1) {$ctx1.fill(self,"==",{aBoolean:aBoolean},smalltalk.Boolean)})},
  725. messageSends: ["="]}),
  726. smalltalk.Boolean);
  727. smalltalk.addMethod(
  728. "_and_",
  729. smalltalk.method({
  730. selector: "and:",
  731. fn: function (aBlock){
  732. var self=this;
  733. return smalltalk.withContext(function($ctx1) { var $2,$1;
  734. $2=_st(self).__eq(true);
  735. $1=_st($2)._ifTrue_ifFalse_(aBlock,(function(){
  736. return smalltalk.withContext(function($ctx2) { return false;
  737. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  738. return $1;
  739. }, function($ctx1) {$ctx1.fill(self,"and:",{aBlock:aBlock},smalltalk.Boolean)})},
  740. messageSends: ["ifTrue:ifFalse:", "="]}),
  741. smalltalk.Boolean);
  742. smalltalk.addMethod(
  743. "_asJSON",
  744. smalltalk.method({
  745. selector: "asJSON",
  746. fn: function (){
  747. var self=this;
  748. return smalltalk.withContext(function($ctx1) { var $1;
  749. $1=self;
  750. return $1;
  751. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Boolean)})},
  752. messageSends: []}),
  753. smalltalk.Boolean);
  754. smalltalk.addMethod(
  755. "_deepCopy",
  756. smalltalk.method({
  757. selector: "deepCopy",
  758. fn: function (){
  759. var self=this;
  760. return smalltalk.withContext(function($ctx1) { var $1;
  761. $1=self;
  762. return $1;
  763. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Boolean)})},
  764. messageSends: []}),
  765. smalltalk.Boolean);
  766. smalltalk.addMethod(
  767. "_ifFalse_",
  768. smalltalk.method({
  769. selector: "ifFalse:",
  770. fn: function (aBlock){
  771. var self=this;
  772. return smalltalk.withContext(function($ctx1) { var $2,$1;
  773. $2=self;
  774. $1=_st($2)._ifTrue_ifFalse_((function(){
  775. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),aBlock);
  776. return $1;
  777. }, function($ctx1) {$ctx1.fill(self,"ifFalse:",{aBlock:aBlock},smalltalk.Boolean)})},
  778. messageSends: ["ifTrue:ifFalse:"]}),
  779. smalltalk.Boolean);
  780. smalltalk.addMethod(
  781. "_ifFalse_ifTrue_",
  782. smalltalk.method({
  783. selector: "ifFalse:ifTrue:",
  784. fn: function (aBlock,anotherBlock){
  785. var self=this;
  786. return smalltalk.withContext(function($ctx1) { var $2,$1;
  787. $2=self;
  788. $1=_st($2)._ifTrue_ifFalse_(anotherBlock,aBlock);
  789. return $1;
  790. }, function($ctx1) {$ctx1.fill(self,"ifFalse:ifTrue:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Boolean)})},
  791. messageSends: ["ifTrue:ifFalse:"]}),
  792. smalltalk.Boolean);
  793. smalltalk.addMethod(
  794. "_ifTrue_",
  795. smalltalk.method({
  796. selector: "ifTrue:",
  797. fn: function (aBlock){
  798. var self=this;
  799. return smalltalk.withContext(function($ctx1) { var $2,$1;
  800. $2=self;
  801. $1=_st($2)._ifTrue_ifFalse_(aBlock,(function(){
  802. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  803. return $1;
  804. }, function($ctx1) {$ctx1.fill(self,"ifTrue:",{aBlock:aBlock},smalltalk.Boolean)})},
  805. messageSends: ["ifTrue:ifFalse:"]}),
  806. smalltalk.Boolean);
  807. smalltalk.addMethod(
  808. "_ifTrue_ifFalse_",
  809. smalltalk.method({
  810. selector: "ifTrue:ifFalse:",
  811. fn: function (aBlock,anotherBlock){
  812. var self=this;
  813. return smalltalk.withContext(function($ctx1) {
  814. if(self == true) {
  815. return aBlock();
  816. } else {
  817. return anotherBlock();
  818. }
  819. ;
  820. return self}, function($ctx1) {$ctx1.fill(self,"ifTrue:ifFalse:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Boolean)})},
  821. messageSends: []}),
  822. smalltalk.Boolean);
  823. smalltalk.addMethod(
  824. "_isBoolean",
  825. smalltalk.method({
  826. selector: "isBoolean",
  827. fn: function (){
  828. var self=this;
  829. return smalltalk.withContext(function($ctx1) { return true;
  830. }, function($ctx1) {$ctx1.fill(self,"isBoolean",{},smalltalk.Boolean)})},
  831. messageSends: []}),
  832. smalltalk.Boolean);
  833. smalltalk.addMethod(
  834. "_not",
  835. smalltalk.method({
  836. selector: "not",
  837. fn: function (){
  838. var self=this;
  839. return smalltalk.withContext(function($ctx1) { var $1;
  840. $1=_st(self).__eq(false);
  841. return $1;
  842. }, function($ctx1) {$ctx1.fill(self,"not",{},smalltalk.Boolean)})},
  843. messageSends: ["="]}),
  844. smalltalk.Boolean);
  845. smalltalk.addMethod(
  846. "_or_",
  847. smalltalk.method({
  848. selector: "or:",
  849. fn: function (aBlock){
  850. var self=this;
  851. return smalltalk.withContext(function($ctx1) { var $2,$1;
  852. $2=_st(self).__eq(true);
  853. $1=_st($2)._ifTrue_ifFalse_((function(){
  854. return smalltalk.withContext(function($ctx2) { return true;
  855. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),aBlock);
  856. return $1;
  857. }, function($ctx1) {$ctx1.fill(self,"or:",{aBlock:aBlock},smalltalk.Boolean)})},
  858. messageSends: ["ifTrue:ifFalse:", "="]}),
  859. smalltalk.Boolean);
  860. smalltalk.addMethod(
  861. "_printString",
  862. smalltalk.method({
  863. selector: "printString",
  864. fn: function (){
  865. var self=this;
  866. return smalltalk.withContext(function($ctx1) { return self.toString();
  867. return self}, function($ctx1) {$ctx1.fill(self,"printString",{},smalltalk.Boolean)})},
  868. messageSends: []}),
  869. smalltalk.Boolean);
  870. smalltalk.addMethod(
  871. "_shallowCopy",
  872. smalltalk.method({
  873. selector: "shallowCopy",
  874. fn: function (){
  875. var self=this;
  876. return smalltalk.withContext(function($ctx1) { var $1;
  877. $1=self;
  878. return $1;
  879. }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.Boolean)})},
  880. messageSends: []}),
  881. smalltalk.Boolean);
  882. smalltalk.addMethod(
  883. "__or",
  884. smalltalk.method({
  885. selector: "|",
  886. fn: function (aBoolean){
  887. var self=this;
  888. return smalltalk.withContext(function($ctx1) {
  889. if(self == true) {
  890. return true;
  891. } else {
  892. return aBoolean;
  893. }
  894. ;
  895. return self}, function($ctx1) {$ctx1.fill(self,"|",{aBoolean:aBoolean},smalltalk.Boolean)})},
  896. messageSends: []}),
  897. smalltalk.Boolean);
  898. smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel-Objects');
  899. smalltalk.addMethod(
  900. "__plus",
  901. smalltalk.method({
  902. selector: "+",
  903. fn: function (aDate){
  904. var self=this;
  905. return smalltalk.withContext(function($ctx1) { return self + aDate;
  906. return self}, function($ctx1) {$ctx1.fill(self,"+",{aDate:aDate},smalltalk.Date)})},
  907. messageSends: []}),
  908. smalltalk.Date);
  909. smalltalk.addMethod(
  910. "__minus",
  911. smalltalk.method({
  912. selector: "-",
  913. fn: function (aDate){
  914. var self=this;
  915. return smalltalk.withContext(function($ctx1) { return self - aDate;
  916. return self}, function($ctx1) {$ctx1.fill(self,"-",{aDate:aDate},smalltalk.Date)})},
  917. messageSends: []}),
  918. smalltalk.Date);
  919. smalltalk.addMethod(
  920. "__lt",
  921. smalltalk.method({
  922. selector: "<",
  923. fn: function (aDate){
  924. var self=this;
  925. return smalltalk.withContext(function($ctx1) { return self < aDate;
  926. return self}, function($ctx1) {$ctx1.fill(self,"<",{aDate:aDate},smalltalk.Date)})},
  927. messageSends: []}),
  928. smalltalk.Date);
  929. smalltalk.addMethod(
  930. "__lt_eq",
  931. smalltalk.method({
  932. selector: "<=",
  933. fn: function (aDate){
  934. var self=this;
  935. return smalltalk.withContext(function($ctx1) { return self <= aDate;
  936. return self}, function($ctx1) {$ctx1.fill(self,"<=",{aDate:aDate},smalltalk.Date)})},
  937. messageSends: []}),
  938. smalltalk.Date);
  939. smalltalk.addMethod(
  940. "__gt",
  941. smalltalk.method({
  942. selector: ">",
  943. fn: function (aDate){
  944. var self=this;
  945. return smalltalk.withContext(function($ctx1) { return self > aDate;
  946. return self}, function($ctx1) {$ctx1.fill(self,">",{aDate:aDate},smalltalk.Date)})},
  947. messageSends: []}),
  948. smalltalk.Date);
  949. smalltalk.addMethod(
  950. "__gt_eq",
  951. smalltalk.method({
  952. selector: ">=",
  953. fn: function (aDate){
  954. var self=this;
  955. return smalltalk.withContext(function($ctx1) { return self >= aDate;
  956. return self}, function($ctx1) {$ctx1.fill(self,">=",{aDate:aDate},smalltalk.Date)})},
  957. messageSends: []}),
  958. smalltalk.Date);
  959. smalltalk.addMethod(
  960. "_asDateString",
  961. smalltalk.method({
  962. selector: "asDateString",
  963. fn: function (){
  964. var self=this;
  965. return smalltalk.withContext(function($ctx1) { return self.toDateString();
  966. return self}, function($ctx1) {$ctx1.fill(self,"asDateString",{},smalltalk.Date)})},
  967. messageSends: []}),
  968. smalltalk.Date);
  969. smalltalk.addMethod(
  970. "_asLocaleString",
  971. smalltalk.method({
  972. selector: "asLocaleString",
  973. fn: function (){
  974. var self=this;
  975. return smalltalk.withContext(function($ctx1) { return self.toLocaleString();
  976. return self}, function($ctx1) {$ctx1.fill(self,"asLocaleString",{},smalltalk.Date)})},
  977. messageSends: []}),
  978. smalltalk.Date);
  979. smalltalk.addMethod(
  980. "_asMilliseconds",
  981. smalltalk.method({
  982. selector: "asMilliseconds",
  983. fn: function (){
  984. var self=this;
  985. return smalltalk.withContext(function($ctx1) { var $1;
  986. $1=_st(self)._time();
  987. return $1;
  988. }, function($ctx1) {$ctx1.fill(self,"asMilliseconds",{},smalltalk.Date)})},
  989. messageSends: ["time"]}),
  990. smalltalk.Date);
  991. smalltalk.addMethod(
  992. "_asNumber",
  993. smalltalk.method({
  994. selector: "asNumber",
  995. fn: function (){
  996. var self=this;
  997. return smalltalk.withContext(function($ctx1) { var $1;
  998. $1=_st(self)._asMilliseconds();
  999. return $1;
  1000. }, function($ctx1) {$ctx1.fill(self,"asNumber",{},smalltalk.Date)})},
  1001. messageSends: ["asMilliseconds"]}),
  1002. smalltalk.Date);
  1003. smalltalk.addMethod(
  1004. "_asString",
  1005. smalltalk.method({
  1006. selector: "asString",
  1007. fn: function (){
  1008. var self=this;
  1009. return smalltalk.withContext(function($ctx1) { return self.toString();
  1010. return self}, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Date)})},
  1011. messageSends: []}),
  1012. smalltalk.Date);
  1013. smalltalk.addMethod(
  1014. "_asTimeString",
  1015. smalltalk.method({
  1016. selector: "asTimeString",
  1017. fn: function (){
  1018. var self=this;
  1019. return smalltalk.withContext(function($ctx1) { return self.toTimeString();
  1020. return self}, function($ctx1) {$ctx1.fill(self,"asTimeString",{},smalltalk.Date)})},
  1021. messageSends: []}),
  1022. smalltalk.Date);
  1023. smalltalk.addMethod(
  1024. "_day",
  1025. smalltalk.method({
  1026. selector: "day",
  1027. fn: function (){
  1028. var self=this;
  1029. return smalltalk.withContext(function($ctx1) { var $1;
  1030. $1=_st(self)._dayOfWeek();
  1031. return $1;
  1032. }, function($ctx1) {$ctx1.fill(self,"day",{},smalltalk.Date)})},
  1033. messageSends: ["dayOfWeek"]}),
  1034. smalltalk.Date);
  1035. smalltalk.addMethod(
  1036. "_day_",
  1037. smalltalk.method({
  1038. selector: "day:",
  1039. fn: function (aNumber){
  1040. var self=this;
  1041. return smalltalk.withContext(function($ctx1) { _st(self)._dayOfWeek_(aNumber);
  1042. return self}, function($ctx1) {$ctx1.fill(self,"day:",{aNumber:aNumber},smalltalk.Date)})},
  1043. messageSends: ["dayOfWeek:"]}),
  1044. smalltalk.Date);
  1045. smalltalk.addMethod(
  1046. "_dayOfMonth",
  1047. smalltalk.method({
  1048. selector: "dayOfMonth",
  1049. fn: function (){
  1050. var self=this;
  1051. return smalltalk.withContext(function($ctx1) { return self.getDate();
  1052. return self}, function($ctx1) {$ctx1.fill(self,"dayOfMonth",{},smalltalk.Date)})},
  1053. messageSends: []}),
  1054. smalltalk.Date);
  1055. smalltalk.addMethod(
  1056. "_dayOfMonth_",
  1057. smalltalk.method({
  1058. selector: "dayOfMonth:",
  1059. fn: function (aNumber){
  1060. var self=this;
  1061. return smalltalk.withContext(function($ctx1) { self.setDate(aNumber);
  1062. return self}, function($ctx1) {$ctx1.fill(self,"dayOfMonth:",{aNumber:aNumber},smalltalk.Date)})},
  1063. messageSends: []}),
  1064. smalltalk.Date);
  1065. smalltalk.addMethod(
  1066. "_dayOfWeek",
  1067. smalltalk.method({
  1068. selector: "dayOfWeek",
  1069. fn: function (){
  1070. var self=this;
  1071. return smalltalk.withContext(function($ctx1) { return self.getDay() + 1;
  1072. return self}, function($ctx1) {$ctx1.fill(self,"dayOfWeek",{},smalltalk.Date)})},
  1073. messageSends: []}),
  1074. smalltalk.Date);
  1075. smalltalk.addMethod(
  1076. "_dayOfWeek_",
  1077. smalltalk.method({
  1078. selector: "dayOfWeek:",
  1079. fn: function (aNumber){
  1080. var self=this;
  1081. return smalltalk.withContext(function($ctx1) { return self.setDay(aNumber - 1);
  1082. return self}, function($ctx1) {$ctx1.fill(self,"dayOfWeek:",{aNumber:aNumber},smalltalk.Date)})},
  1083. messageSends: []}),
  1084. smalltalk.Date);
  1085. smalltalk.addMethod(
  1086. "_hours",
  1087. smalltalk.method({
  1088. selector: "hours",
  1089. fn: function (){
  1090. var self=this;
  1091. return smalltalk.withContext(function($ctx1) { return self.getHours();
  1092. return self}, function($ctx1) {$ctx1.fill(self,"hours",{},smalltalk.Date)})},
  1093. messageSends: []}),
  1094. smalltalk.Date);
  1095. smalltalk.addMethod(
  1096. "_hours_",
  1097. smalltalk.method({
  1098. selector: "hours:",
  1099. fn: function (aNumber){
  1100. var self=this;
  1101. return smalltalk.withContext(function($ctx1) { self.setHours(aNumber);
  1102. return self}, function($ctx1) {$ctx1.fill(self,"hours:",{aNumber:aNumber},smalltalk.Date)})},
  1103. messageSends: []}),
  1104. smalltalk.Date);
  1105. smalltalk.addMethod(
  1106. "_milliseconds",
  1107. smalltalk.method({
  1108. selector: "milliseconds",
  1109. fn: function (){
  1110. var self=this;
  1111. return smalltalk.withContext(function($ctx1) { return self.getMilliseconds();
  1112. return self}, function($ctx1) {$ctx1.fill(self,"milliseconds",{},smalltalk.Date)})},
  1113. messageSends: []}),
  1114. smalltalk.Date);
  1115. smalltalk.addMethod(
  1116. "_milliseconds_",
  1117. smalltalk.method({
  1118. selector: "milliseconds:",
  1119. fn: function (aNumber){
  1120. var self=this;
  1121. return smalltalk.withContext(function($ctx1) { self.setMilliseconds(aNumber);
  1122. return self}, function($ctx1) {$ctx1.fill(self,"milliseconds:",{aNumber:aNumber},smalltalk.Date)})},
  1123. messageSends: []}),
  1124. smalltalk.Date);
  1125. smalltalk.addMethod(
  1126. "_minutes",
  1127. smalltalk.method({
  1128. selector: "minutes",
  1129. fn: function (){
  1130. var self=this;
  1131. return smalltalk.withContext(function($ctx1) { return self.getMinutes();
  1132. return self}, function($ctx1) {$ctx1.fill(self,"minutes",{},smalltalk.Date)})},
  1133. messageSends: []}),
  1134. smalltalk.Date);
  1135. smalltalk.addMethod(
  1136. "_minutes_",
  1137. smalltalk.method({
  1138. selector: "minutes:",
  1139. fn: function (aNumber){
  1140. var self=this;
  1141. return smalltalk.withContext(function($ctx1) { self.setMinutes(aNumber);
  1142. return self}, function($ctx1) {$ctx1.fill(self,"minutes:",{aNumber:aNumber},smalltalk.Date)})},
  1143. messageSends: []}),
  1144. smalltalk.Date);
  1145. smalltalk.addMethod(
  1146. "_month",
  1147. smalltalk.method({
  1148. selector: "month",
  1149. fn: function (){
  1150. var self=this;
  1151. return smalltalk.withContext(function($ctx1) { return self.getMonth() + 1;
  1152. return self}, function($ctx1) {$ctx1.fill(self,"month",{},smalltalk.Date)})},
  1153. messageSends: []}),
  1154. smalltalk.Date);
  1155. smalltalk.addMethod(
  1156. "_month_",
  1157. smalltalk.method({
  1158. selector: "month:",
  1159. fn: function (aNumber){
  1160. var self=this;
  1161. return smalltalk.withContext(function($ctx1) { self.setMonth(aNumber - 1);
  1162. return self}, function($ctx1) {$ctx1.fill(self,"month:",{aNumber:aNumber},smalltalk.Date)})},
  1163. messageSends: []}),
  1164. smalltalk.Date);
  1165. smalltalk.addMethod(
  1166. "_printString",
  1167. smalltalk.method({
  1168. selector: "printString",
  1169. fn: function (){
  1170. var self=this;
  1171. return smalltalk.withContext(function($ctx1) { var $1;
  1172. $1=_st(self)._asString();
  1173. return $1;
  1174. }, function($ctx1) {$ctx1.fill(self,"printString",{},smalltalk.Date)})},
  1175. messageSends: ["asString"]}),
  1176. smalltalk.Date);
  1177. smalltalk.addMethod(
  1178. "_seconds",
  1179. smalltalk.method({
  1180. selector: "seconds",
  1181. fn: function (){
  1182. var self=this;
  1183. return smalltalk.withContext(function($ctx1) { return self.getSeconds();
  1184. return self}, function($ctx1) {$ctx1.fill(self,"seconds",{},smalltalk.Date)})},
  1185. messageSends: []}),
  1186. smalltalk.Date);
  1187. smalltalk.addMethod(
  1188. "_seconds_",
  1189. smalltalk.method({
  1190. selector: "seconds:",
  1191. fn: function (aNumber){
  1192. var self=this;
  1193. return smalltalk.withContext(function($ctx1) { self.setSeconds(aNumber);
  1194. return self}, function($ctx1) {$ctx1.fill(self,"seconds:",{aNumber:aNumber},smalltalk.Date)})},
  1195. messageSends: []}),
  1196. smalltalk.Date);
  1197. smalltalk.addMethod(
  1198. "_time",
  1199. smalltalk.method({
  1200. selector: "time",
  1201. fn: function (){
  1202. var self=this;
  1203. return smalltalk.withContext(function($ctx1) { return self.getTime();
  1204. return self}, function($ctx1) {$ctx1.fill(self,"time",{},smalltalk.Date)})},
  1205. messageSends: []}),
  1206. smalltalk.Date);
  1207. smalltalk.addMethod(
  1208. "_time_",
  1209. smalltalk.method({
  1210. selector: "time:",
  1211. fn: function (aNumber){
  1212. var self=this;
  1213. return smalltalk.withContext(function($ctx1) { self.setTime(aNumber);
  1214. return self}, function($ctx1) {$ctx1.fill(self,"time:",{aNumber:aNumber},smalltalk.Date)})},
  1215. messageSends: []}),
  1216. smalltalk.Date);
  1217. smalltalk.addMethod(
  1218. "_year",
  1219. smalltalk.method({
  1220. selector: "year",
  1221. fn: function (){
  1222. var self=this;
  1223. return smalltalk.withContext(function($ctx1) { return self.getFullYear();
  1224. return self}, function($ctx1) {$ctx1.fill(self,"year",{},smalltalk.Date)})},
  1225. messageSends: []}),
  1226. smalltalk.Date);
  1227. smalltalk.addMethod(
  1228. "_year_",
  1229. smalltalk.method({
  1230. selector: "year:",
  1231. fn: function (aNumber){
  1232. var self=this;
  1233. return smalltalk.withContext(function($ctx1) { self.setFullYear(aNumber);
  1234. return self}, function($ctx1) {$ctx1.fill(self,"year:",{aNumber:aNumber},smalltalk.Date)})},
  1235. messageSends: []}),
  1236. smalltalk.Date);
  1237. smalltalk.addMethod(
  1238. "_fromMilliseconds_",
  1239. smalltalk.method({
  1240. selector: "fromMilliseconds:",
  1241. fn: function (aNumber){
  1242. var self=this;
  1243. return smalltalk.withContext(function($ctx1) { var $1;
  1244. $1=_st(self)._new_(aNumber);
  1245. return $1;
  1246. }, function($ctx1) {$ctx1.fill(self,"fromMilliseconds:",{aNumber:aNumber},smalltalk.Date.klass)})},
  1247. messageSends: ["new:"]}),
  1248. smalltalk.Date.klass);
  1249. smalltalk.addMethod(
  1250. "_fromSeconds_",
  1251. smalltalk.method({
  1252. selector: "fromSeconds:",
  1253. fn: function (aNumber){
  1254. var self=this;
  1255. return smalltalk.withContext(function($ctx1) { var $1;
  1256. $1=_st(self)._fromMilliseconds_(_st(aNumber).__star((1000)));
  1257. return $1;
  1258. }, function($ctx1) {$ctx1.fill(self,"fromSeconds:",{aNumber:aNumber},smalltalk.Date.klass)})},
  1259. messageSends: ["fromMilliseconds:", "*"]}),
  1260. smalltalk.Date.klass);
  1261. smalltalk.addMethod(
  1262. "_fromString_",
  1263. smalltalk.method({
  1264. selector: "fromString:",
  1265. fn: function (aString){
  1266. var self=this;
  1267. return smalltalk.withContext(function($ctx1) { var $1;
  1268. $1=_st(self)._new_(aString);
  1269. return $1;
  1270. }, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString},smalltalk.Date.klass)})},
  1271. messageSends: ["new:"]}),
  1272. smalltalk.Date.klass);
  1273. smalltalk.addMethod(
  1274. "_millisecondsToRun_",
  1275. smalltalk.method({
  1276. selector: "millisecondsToRun:",
  1277. fn: function (aBlock){
  1278. var self=this;
  1279. var t;
  1280. return smalltalk.withContext(function($ctx1) { var $1;
  1281. t=_st((smalltalk.Date || Date))._now();
  1282. _st(aBlock)._value();
  1283. $1=_st(_st((smalltalk.Date || Date))._now()).__minus(t);
  1284. return $1;
  1285. }, function($ctx1) {$ctx1.fill(self,"millisecondsToRun:",{aBlock:aBlock,t:t},smalltalk.Date.klass)})},
  1286. messageSends: ["now", "value", "-"]}),
  1287. smalltalk.Date.klass);
  1288. smalltalk.addMethod(
  1289. "_new_",
  1290. smalltalk.method({
  1291. selector: "new:",
  1292. fn: function (anObject){
  1293. var self=this;
  1294. return smalltalk.withContext(function($ctx1) { return new Date(anObject);
  1295. return self}, function($ctx1) {$ctx1.fill(self,"new:",{anObject:anObject},smalltalk.Date.klass)})},
  1296. messageSends: []}),
  1297. smalltalk.Date.klass);
  1298. smalltalk.addMethod(
  1299. "_now",
  1300. smalltalk.method({
  1301. selector: "now",
  1302. fn: function (){
  1303. var self=this;
  1304. return smalltalk.withContext(function($ctx1) { var $1;
  1305. $1=_st(self)._today();
  1306. return $1;
  1307. }, function($ctx1) {$ctx1.fill(self,"now",{},smalltalk.Date.klass)})},
  1308. messageSends: ["today"]}),
  1309. smalltalk.Date.klass);
  1310. smalltalk.addMethod(
  1311. "_today",
  1312. smalltalk.method({
  1313. selector: "today",
  1314. fn: function (){
  1315. var self=this;
  1316. return smalltalk.withContext(function($ctx1) { var $1;
  1317. $1=_st(self)._new();
  1318. return $1;
  1319. }, function($ctx1) {$ctx1.fill(self,"today",{},smalltalk.Date.klass)})},
  1320. messageSends: ["new"]}),
  1321. smalltalk.Date.klass);
  1322. smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Objects');
  1323. smalltalk.addMethod(
  1324. "_addObjectVariablesTo_",
  1325. smalltalk.method({
  1326. selector: "addObjectVariablesTo:",
  1327. fn: function (aDictionary){
  1328. var self=this;
  1329. return smalltalk.withContext(function($ctx1) {
  1330. for(var i in self['@jsObject']) {
  1331. aDictionary._at_put_(i, self['@jsObject'][i]);
  1332. }
  1333. ;
  1334. return self}, function($ctx1) {$ctx1.fill(self,"addObjectVariablesTo:",{aDictionary:aDictionary},smalltalk.JSObjectProxy)})},
  1335. messageSends: []}),
  1336. smalltalk.JSObjectProxy);
  1337. smalltalk.addMethod(
  1338. "_at_",
  1339. smalltalk.method({
  1340. selector: "at:",
  1341. fn: function (aSymbol){
  1342. var self=this;
  1343. return smalltalk.withContext(function($ctx1) { return self['@jsObject'][aSymbol._asString()];
  1344. return self}, function($ctx1) {$ctx1.fill(self,"at:",{aSymbol:aSymbol},smalltalk.JSObjectProxy)})},
  1345. messageSends: []}),
  1346. smalltalk.JSObjectProxy);
  1347. smalltalk.addMethod(
  1348. "_at_ifAbsent_",
  1349. smalltalk.method({
  1350. selector: "at:ifAbsent:",
  1351. fn: function (aSymbol,aBlock){
  1352. var self=this;
  1353. return smalltalk.withContext(function($ctx1) {
  1354. var obj = self['@jsObject'],
  1355. symbol = aSymbol._asString();
  1356. return symbol in obj ? obj[symbol] : aBlock();
  1357. ;
  1358. return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aSymbol:aSymbol,aBlock:aBlock},smalltalk.JSObjectProxy)})},
  1359. messageSends: []}),
  1360. smalltalk.JSObjectProxy);
  1361. smalltalk.addMethod(
  1362. "_at_ifPresent_",
  1363. smalltalk.method({
  1364. selector: "at:ifPresent:",
  1365. fn: function (aSymbol,aBlock){
  1366. var self=this;
  1367. return smalltalk.withContext(function($ctx1) {
  1368. var obj = self['@jsObject'],
  1369. symbol = aSymbol._asString();
  1370. return symbol in obj ? aBlock(obj[symbol]) : nil;
  1371. ;
  1372. return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:",{aSymbol:aSymbol,aBlock:aBlock},smalltalk.JSObjectProxy)})},
  1373. messageSends: []}),
  1374. smalltalk.JSObjectProxy);
  1375. smalltalk.addMethod(
  1376. "_at_ifPresent_ifAbsent_",
  1377. smalltalk.method({
  1378. selector: "at:ifPresent:ifAbsent:",
  1379. fn: function (aSymbol,aBlock,anotherBlock){
  1380. var self=this;
  1381. return smalltalk.withContext(function($ctx1) {
  1382. var obj = self['@jsObject'],
  1383. symbol = aSymbol._asString();
  1384. return symbol in obj ? aBlock(obj[symbol]) : anotherBlock();
  1385. ;
  1386. return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{aSymbol:aSymbol,aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.JSObjectProxy)})},
  1387. messageSends: []}),
  1388. smalltalk.JSObjectProxy);
  1389. smalltalk.addMethod(
  1390. "_at_put_",
  1391. smalltalk.method({
  1392. selector: "at:put:",
  1393. fn: function (aSymbol,anObject){
  1394. var self=this;
  1395. return smalltalk.withContext(function($ctx1) { self['@jsObject'][aSymbol._asString()] = anObject;
  1396. return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{aSymbol:aSymbol,anObject:anObject},smalltalk.JSObjectProxy)})},
  1397. messageSends: []}),
  1398. smalltalk.JSObjectProxy);
  1399. smalltalk.addMethod(
  1400. "_canForwardMessage_",
  1401. smalltalk.method({
  1402. selector: "canForwardMessage:",
  1403. fn: function (aMessage){
  1404. var self=this;
  1405. return smalltalk.withContext(function($ctx1) {
  1406. var jsSelector = aMessage._selector()._asJavaScriptSelector();
  1407. if(jsSelector in self._jsObject()) {
  1408. return true
  1409. } else {
  1410. return false;
  1411. }
  1412. ;
  1413. return self}, function($ctx1) {$ctx1.fill(self,"canForwardMessage:",{aMessage:aMessage},smalltalk.JSObjectProxy)})},
  1414. messageSends: []}),
  1415. smalltalk.JSObjectProxy);
  1416. smalltalk.addMethod(
  1417. "_doesNotUnderstand_",
  1418. smalltalk.method({
  1419. selector: "doesNotUnderstand:",
  1420. fn: function (aMessage){
  1421. var self=this;
  1422. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1423. $2=_st(self)._canForwardMessage_(aMessage);
  1424. if(smalltalk.assert($2)){
  1425. $1=_st(self)._forwardMessage_(aMessage);
  1426. } else {
  1427. $3=smalltalk.Object.fn.prototype._doesNotUnderstand_.apply(_st(self), [aMessage]);
  1428. return $3;
  1429. };
  1430. return $1;
  1431. }, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage},smalltalk.JSObjectProxy)})},
  1432. messageSends: ["ifTrue:ifFalse:", "forwardMessage:", "doesNotUnderstand:", "canForwardMessage:"]}),
  1433. smalltalk.JSObjectProxy);
  1434. smalltalk.addMethod(
  1435. "_forwardMessage_",
  1436. smalltalk.method({
  1437. selector: "forwardMessage:",
  1438. fn: function (aMessage){
  1439. var self=this;
  1440. return smalltalk.withContext(function($ctx1) {
  1441. return smalltalk.send(self._jsObject(), aMessage._selector()._asJavaScriptSelector(), aMessage._arguments());
  1442. ;
  1443. return self}, function($ctx1) {$ctx1.fill(self,"forwardMessage:",{aMessage:aMessage},smalltalk.JSObjectProxy)})},
  1444. messageSends: []}),
  1445. smalltalk.JSObjectProxy);
  1446. smalltalk.addMethod(
  1447. "_inspectOn_",
  1448. smalltalk.method({
  1449. selector: "inspectOn:",
  1450. fn: function (anInspector){
  1451. var self=this;
  1452. var variables;
  1453. return smalltalk.withContext(function($ctx1) { variables=_st((smalltalk.Dictionary || Dictionary))._new();
  1454. _st(variables)._at_put_("#self",_st(self)._jsObject());
  1455. _st(anInspector)._setLabel_(_st(self)._printString());
  1456. _st(self)._addObjectVariablesTo_(variables);
  1457. _st(anInspector)._setVariables_(variables);
  1458. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.JSObjectProxy)})},
  1459. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "addObjectVariablesTo:", "setVariables:"]}),
  1460. smalltalk.JSObjectProxy);
  1461. smalltalk.addMethod(
  1462. "_jsObject",
  1463. smalltalk.method({
  1464. selector: "jsObject",
  1465. fn: function (){
  1466. var self=this;
  1467. return smalltalk.withContext(function($ctx1) { var $1;
  1468. $1=self["@jsObject"];
  1469. return $1;
  1470. }, function($ctx1) {$ctx1.fill(self,"jsObject",{},smalltalk.JSObjectProxy)})},
  1471. messageSends: []}),
  1472. smalltalk.JSObjectProxy);
  1473. smalltalk.addMethod(
  1474. "_jsObject_",
  1475. smalltalk.method({
  1476. selector: "jsObject:",
  1477. fn: function (aJSObject){
  1478. var self=this;
  1479. return smalltalk.withContext(function($ctx1) { self["@jsObject"]=aJSObject;
  1480. return self}, function($ctx1) {$ctx1.fill(self,"jsObject:",{aJSObject:aJSObject},smalltalk.JSObjectProxy)})},
  1481. messageSends: []}),
  1482. smalltalk.JSObjectProxy);
  1483. smalltalk.addMethod(
  1484. "_keysAndValuesDo_",
  1485. smalltalk.method({
  1486. selector: "keysAndValuesDo:",
  1487. fn: function (aBlock){
  1488. var self=this;
  1489. return smalltalk.withContext(function($ctx1) {
  1490. var o = self['@jsObject'];
  1491. for(var i in o) {
  1492. aBlock(i, o[i]);
  1493. }
  1494. ;
  1495. return self}, function($ctx1) {$ctx1.fill(self,"keysAndValuesDo:",{aBlock:aBlock},smalltalk.JSObjectProxy)})},
  1496. messageSends: []}),
  1497. smalltalk.JSObjectProxy);
  1498. smalltalk.addMethod(
  1499. "_printString",
  1500. smalltalk.method({
  1501. selector: "printString",
  1502. fn: function (){
  1503. var self=this;
  1504. return smalltalk.withContext(function($ctx1) { var $1;
  1505. $1=_st(_st(self)._jsObject())._toString();
  1506. return $1;
  1507. }, function($ctx1) {$ctx1.fill(self,"printString",{},smalltalk.JSObjectProxy)})},
  1508. messageSends: ["toString", "jsObject"]}),
  1509. smalltalk.JSObjectProxy);
  1510. smalltalk.addMethod(
  1511. "_value",
  1512. smalltalk.method({
  1513. selector: "value",
  1514. fn: function (){
  1515. var self=this;
  1516. return smalltalk.withContext(function($ctx1) { var $1;
  1517. $1=_st(self)._at_ifAbsent_("value",(function(){
  1518. return smalltalk.withContext(function($ctx2) { return smalltalk.Object.fn.prototype._value.apply(_st(self), []);
  1519. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1520. return $1;
  1521. }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.JSObjectProxy)})},
  1522. messageSends: ["at:ifAbsent:", "value"]}),
  1523. smalltalk.JSObjectProxy);
  1524. smalltalk.addMethod(
  1525. "_on_",
  1526. smalltalk.method({
  1527. selector: "on:",
  1528. fn: function (aJSObject){
  1529. var self=this;
  1530. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  1531. $2=_st(self)._new();
  1532. _st($2)._jsObject_(aJSObject);
  1533. $3=_st($2)._yourself();
  1534. $1=$3;
  1535. return $1;
  1536. }, function($ctx1) {$ctx1.fill(self,"on:",{aJSObject:aJSObject},smalltalk.JSObjectProxy.klass)})},
  1537. messageSends: ["jsObject:", "new", "yourself"]}),
  1538. smalltalk.JSObjectProxy.klass);
  1539. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel-Objects');
  1540. smalltalk.addMethod(
  1541. "__and",
  1542. smalltalk.method({
  1543. selector: "&",
  1544. fn: function (aNumber){
  1545. var self=this;
  1546. return smalltalk.withContext(function($ctx1) { return self & aNumber;
  1547. return self}, function($ctx1) {$ctx1.fill(self,"&",{aNumber:aNumber},smalltalk.Number)})},
  1548. messageSends: []}),
  1549. smalltalk.Number);
  1550. smalltalk.addMethod(
  1551. "__star",
  1552. smalltalk.method({
  1553. selector: "*",
  1554. fn: function (aNumber){
  1555. var self=this;
  1556. return smalltalk.withContext(function($ctx1) { return self * aNumber;
  1557. return self}, function($ctx1) {$ctx1.fill(self,"*",{aNumber:aNumber},smalltalk.Number)})},
  1558. messageSends: []}),
  1559. smalltalk.Number);
  1560. smalltalk.addMethod(
  1561. "__plus",
  1562. smalltalk.method({
  1563. selector: "+",
  1564. fn: function (aNumber){
  1565. var self=this;
  1566. return smalltalk.withContext(function($ctx1) { return self + aNumber;
  1567. return self}, function($ctx1) {$ctx1.fill(self,"+",{aNumber:aNumber},smalltalk.Number)})},
  1568. messageSends: []}),
  1569. smalltalk.Number);
  1570. smalltalk.addMethod(
  1571. "__minus",
  1572. smalltalk.method({
  1573. selector: "-",
  1574. fn: function (aNumber){
  1575. var self=this;
  1576. return smalltalk.withContext(function($ctx1) { return self - aNumber;
  1577. return self}, function($ctx1) {$ctx1.fill(self,"-",{aNumber:aNumber},smalltalk.Number)})},
  1578. messageSends: []}),
  1579. smalltalk.Number);
  1580. smalltalk.addMethod(
  1581. "__slash",
  1582. smalltalk.method({
  1583. selector: "/",
  1584. fn: function (aNumber){
  1585. var self=this;
  1586. return smalltalk.withContext(function($ctx1) { return self / aNumber;
  1587. return self}, function($ctx1) {$ctx1.fill(self,"/",{aNumber:aNumber},smalltalk.Number)})},
  1588. messageSends: []}),
  1589. smalltalk.Number);
  1590. smalltalk.addMethod(
  1591. "__lt",
  1592. smalltalk.method({
  1593. selector: "<",
  1594. fn: function (aNumber){
  1595. var self=this;
  1596. return smalltalk.withContext(function($ctx1) { return self < aNumber;
  1597. return self}, function($ctx1) {$ctx1.fill(self,"<",{aNumber:aNumber},smalltalk.Number)})},
  1598. messageSends: []}),
  1599. smalltalk.Number);
  1600. smalltalk.addMethod(
  1601. "__lt_eq",
  1602. smalltalk.method({
  1603. selector: "<=",
  1604. fn: function (aNumber){
  1605. var self=this;
  1606. return smalltalk.withContext(function($ctx1) { return self <= aNumber;
  1607. return self}, function($ctx1) {$ctx1.fill(self,"<=",{aNumber:aNumber},smalltalk.Number)})},
  1608. messageSends: []}),
  1609. smalltalk.Number);
  1610. smalltalk.addMethod(
  1611. "__eq",
  1612. smalltalk.method({
  1613. selector: "=",
  1614. fn: function (aNumber){
  1615. var self=this;
  1616. return smalltalk.withContext(function($ctx1) {
  1617. if(! aNumber._isNumber || ! aNumber._isNumber()) {
  1618. return false;
  1619. }
  1620. return Number(self) == aNumber
  1621. ;
  1622. return self}, function($ctx1) {$ctx1.fill(self,"=",{aNumber:aNumber},smalltalk.Number)})},
  1623. messageSends: []}),
  1624. smalltalk.Number);
  1625. smalltalk.addMethod(
  1626. "__gt",
  1627. smalltalk.method({
  1628. selector: ">",
  1629. fn: function (aNumber){
  1630. var self=this;
  1631. return smalltalk.withContext(function($ctx1) { return self > aNumber;
  1632. return self}, function($ctx1) {$ctx1.fill(self,">",{aNumber:aNumber},smalltalk.Number)})},
  1633. messageSends: []}),
  1634. smalltalk.Number);
  1635. smalltalk.addMethod(
  1636. "__gt_eq",
  1637. smalltalk.method({
  1638. selector: ">=",
  1639. fn: function (aNumber){
  1640. var self=this;
  1641. return smalltalk.withContext(function($ctx1) { return self >= aNumber;
  1642. return self}, function($ctx1) {$ctx1.fill(self,">=",{aNumber:aNumber},smalltalk.Number)})},
  1643. messageSends: []}),
  1644. smalltalk.Number);
  1645. smalltalk.addMethod(
  1646. "__at",
  1647. smalltalk.method({
  1648. selector: "@",
  1649. fn: function (aNumber){
  1650. var self=this;
  1651. return smalltalk.withContext(function($ctx1) { var $1;
  1652. $1=_st((smalltalk.Point || Point))._x_y_(self,aNumber);
  1653. return $1;
  1654. }, function($ctx1) {$ctx1.fill(self,"@",{aNumber:aNumber},smalltalk.Number)})},
  1655. messageSends: ["x:y:"]}),
  1656. smalltalk.Number);
  1657. smalltalk.addMethod(
  1658. "__backslash",
  1659. smalltalk.method({
  1660. selector: "\x5c",
  1661. fn: function (aNumber){
  1662. var self=this;
  1663. return smalltalk.withContext(function($ctx1) { return self % aNumber;
  1664. return self}, function($ctx1) {$ctx1.fill(self,"\x5c\x5c",{aNumber:aNumber},smalltalk.Number)})},
  1665. messageSends: []}),
  1666. smalltalk.Number);
  1667. smalltalk.addMethod(
  1668. "__backslash_backslash",
  1669. smalltalk.method({
  1670. selector: "\x5c\x5c",
  1671. fn: function (aNumber) {
  1672. var self = this;
  1673. return self % aNumber;
  1674. return self;
  1675. },
  1676. messageSends: []}),
  1677. smalltalk.Number);
  1678. smalltalk.addMethod(
  1679. "_abs",
  1680. smalltalk.method({
  1681. selector: "abs",
  1682. fn: function (){
  1683. var self=this;
  1684. return smalltalk.withContext(function($ctx1) { return Math.abs(self);;
  1685. return self}, function($ctx1) {$ctx1.fill(self,"abs",{},smalltalk.Number)})},
  1686. messageSends: []}),
  1687. smalltalk.Number);
  1688. smalltalk.addMethod(
  1689. "_asJSON",
  1690. smalltalk.method({
  1691. selector: "asJSON",
  1692. fn: function (){
  1693. var self=this;
  1694. return smalltalk.withContext(function($ctx1) { var $1;
  1695. $1=self;
  1696. return $1;
  1697. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Number)})},
  1698. messageSends: []}),
  1699. smalltalk.Number);
  1700. smalltalk.addMethod(
  1701. "_asJavascript",
  1702. smalltalk.method({
  1703. selector: "asJavascript",
  1704. fn: function (){
  1705. var self=this;
  1706. return smalltalk.withContext(function($ctx1) { var $1;
  1707. $1=_st(_st("(").__comma(_st(self)._printString())).__comma(")");
  1708. return $1;
  1709. }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Number)})},
  1710. messageSends: [",", "printString"]}),
  1711. smalltalk.Number);
  1712. smalltalk.addMethod(
  1713. "_asPoint",
  1714. smalltalk.method({
  1715. selector: "asPoint",
  1716. fn: function (){
  1717. var self=this;
  1718. return smalltalk.withContext(function($ctx1) { var $1;
  1719. $1=_st((smalltalk.Point || Point))._x_y_(self,self);
  1720. return $1;
  1721. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Number)})},
  1722. messageSends: ["x:y:"]}),
  1723. smalltalk.Number);
  1724. smalltalk.addMethod(
  1725. "_asString",
  1726. smalltalk.method({
  1727. selector: "asString",
  1728. fn: function (){
  1729. var self=this;
  1730. return smalltalk.withContext(function($ctx1) { var $1;
  1731. $1=_st(self)._printString();
  1732. return $1;
  1733. }, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Number)})},
  1734. messageSends: ["printString"]}),
  1735. smalltalk.Number);
  1736. smalltalk.addMethod(
  1737. "_atRandom",
  1738. smalltalk.method({
  1739. selector: "atRandom",
  1740. fn: function (){
  1741. var self=this;
  1742. return smalltalk.withContext(function($ctx1) { var $1;
  1743. $1=_st(_st(_st(_st(_st((smalltalk.Random || Random))._new())._next()).__star(self))._truncated()).__plus((1));
  1744. return $1;
  1745. }, function($ctx1) {$ctx1.fill(self,"atRandom",{},smalltalk.Number)})},
  1746. messageSends: ["+", "truncated", "*", "next", "new"]}),
  1747. smalltalk.Number);
  1748. smalltalk.addMethod(
  1749. "_copy",
  1750. smalltalk.method({
  1751. selector: "copy",
  1752. fn: function (){
  1753. var self=this;
  1754. return smalltalk.withContext(function($ctx1) { var $1;
  1755. $1=self;
  1756. return $1;
  1757. }, function($ctx1) {$ctx1.fill(self,"copy",{},smalltalk.Number)})},
  1758. messageSends: []}),
  1759. smalltalk.Number);
  1760. smalltalk.addMethod(
  1761. "_deepCopy",
  1762. smalltalk.method({
  1763. selector: "deepCopy",
  1764. fn: function (){
  1765. var self=this;
  1766. return smalltalk.withContext(function($ctx1) { var $1;
  1767. $1=_st(self)._copy();
  1768. return $1;
  1769. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Number)})},
  1770. messageSends: ["copy"]}),
  1771. smalltalk.Number);
  1772. smalltalk.addMethod(
  1773. "_even",
  1774. smalltalk.method({
  1775. selector: "even",
  1776. fn: function (){
  1777. var self=this;
  1778. return smalltalk.withContext(function($ctx1) { var $1;
  1779. $1=_st((0)).__eq(_st(self).__backslash_backslash((2)));
  1780. return $1;
  1781. }, function($ctx1) {$ctx1.fill(self,"even",{},smalltalk.Number)})},
  1782. messageSends: ["=", "\x5c\x5c"]}),
  1783. smalltalk.Number);
  1784. smalltalk.addMethod(
  1785. "_identityHash",
  1786. smalltalk.method({
  1787. selector: "identityHash",
  1788. fn: function (){
  1789. var self=this;
  1790. return smalltalk.withContext(function($ctx1) { var $1;
  1791. $1=_st(_st(self)._asString()).__comma("n");
  1792. return $1;
  1793. }, function($ctx1) {$ctx1.fill(self,"identityHash",{},smalltalk.Number)})},
  1794. messageSends: [",", "asString"]}),
  1795. smalltalk.Number);
  1796. smalltalk.addMethod(
  1797. "_isNumber",
  1798. smalltalk.method({
  1799. selector: "isNumber",
  1800. fn: function (){
  1801. var self=this;
  1802. return smalltalk.withContext(function($ctx1) { return true;
  1803. }, function($ctx1) {$ctx1.fill(self,"isNumber",{},smalltalk.Number)})},
  1804. messageSends: []}),
  1805. smalltalk.Number);
  1806. smalltalk.addMethod(
  1807. "_isZero",
  1808. smalltalk.method({
  1809. selector: "isZero",
  1810. fn: function (){
  1811. var self=this;
  1812. return smalltalk.withContext(function($ctx1) { var $1;
  1813. $1=_st(self).__eq((0));
  1814. return $1;
  1815. }, function($ctx1) {$ctx1.fill(self,"isZero",{},smalltalk.Number)})},
  1816. messageSends: ["="]}),
  1817. smalltalk.Number);
  1818. smalltalk.addMethod(
  1819. "_max_",
  1820. smalltalk.method({
  1821. selector: "max:",
  1822. fn: function (aNumber){
  1823. var self=this;
  1824. return smalltalk.withContext(function($ctx1) { return Math.max(self, aNumber);;
  1825. return self}, function($ctx1) {$ctx1.fill(self,"max:",{aNumber:aNumber},smalltalk.Number)})},
  1826. messageSends: []}),
  1827. smalltalk.Number);
  1828. smalltalk.addMethod(
  1829. "_min_",
  1830. smalltalk.method({
  1831. selector: "min:",
  1832. fn: function (aNumber){
  1833. var self=this;
  1834. return smalltalk.withContext(function($ctx1) { return Math.min(self, aNumber);;
  1835. return self}, function($ctx1) {$ctx1.fill(self,"min:",{aNumber:aNumber},smalltalk.Number)})},
  1836. messageSends: []}),
  1837. smalltalk.Number);
  1838. smalltalk.addMethod(
  1839. "_negated",
  1840. smalltalk.method({
  1841. selector: "negated",
  1842. fn: function (){
  1843. var self=this;
  1844. return smalltalk.withContext(function($ctx1) { var $1;
  1845. $1=_st((0)).__minus(self);
  1846. return $1;
  1847. }, function($ctx1) {$ctx1.fill(self,"negated",{},smalltalk.Number)})},
  1848. messageSends: ["-"]}),
  1849. smalltalk.Number);
  1850. smalltalk.addMethod(
  1851. "_negative",
  1852. smalltalk.method({
  1853. selector: "negative",
  1854. fn: function (){
  1855. var self=this;
  1856. return smalltalk.withContext(function($ctx1) { var $1;
  1857. $1=_st(self).__lt((0));
  1858. return $1;
  1859. }, function($ctx1) {$ctx1.fill(self,"negative",{},smalltalk.Number)})},
  1860. messageSends: ["<"]}),
  1861. smalltalk.Number);
  1862. smalltalk.addMethod(
  1863. "_odd",
  1864. smalltalk.method({
  1865. selector: "odd",
  1866. fn: function (){
  1867. var self=this;
  1868. return smalltalk.withContext(function($ctx1) { var $1;
  1869. $1=_st(_st(self)._even())._not();
  1870. return $1;
  1871. }, function($ctx1) {$ctx1.fill(self,"odd",{},smalltalk.Number)})},
  1872. messageSends: ["not", "even"]}),
  1873. smalltalk.Number);
  1874. smalltalk.addMethod(
  1875. "_positive",
  1876. smalltalk.method({
  1877. selector: "positive",
  1878. fn: function (){
  1879. var self=this;
  1880. return smalltalk.withContext(function($ctx1) { var $1;
  1881. $1=_st(self).__gt_eq((0));
  1882. return $1;
  1883. }, function($ctx1) {$ctx1.fill(self,"positive",{},smalltalk.Number)})},
  1884. messageSends: [">="]}),
  1885. smalltalk.Number);
  1886. smalltalk.addMethod(
  1887. "_printShowingDecimalPlaces_",
  1888. smalltalk.method({
  1889. selector: "printShowingDecimalPlaces:",
  1890. fn: function (placesDesired){
  1891. var self=this;
  1892. return smalltalk.withContext(function($ctx1) { return self.toFixed(placesDesired);
  1893. return self}, function($ctx1) {$ctx1.fill(self,"printShowingDecimalPlaces:",{placesDesired:placesDesired},smalltalk.Number)})},
  1894. messageSends: []}),
  1895. smalltalk.Number);
  1896. smalltalk.addMethod(
  1897. "_printString",
  1898. smalltalk.method({
  1899. selector: "printString",
  1900. fn: function (){
  1901. var self=this;
  1902. return smalltalk.withContext(function($ctx1) { return String(self);
  1903. return self}, function($ctx1) {$ctx1.fill(self,"printString",{},smalltalk.Number)})},
  1904. messageSends: []}),
  1905. smalltalk.Number);
  1906. smalltalk.addMethod(
  1907. "_rounded",
  1908. smalltalk.method({
  1909. selector: "rounded",
  1910. fn: function (){
  1911. var self=this;
  1912. return smalltalk.withContext(function($ctx1) { return Math.round(self);;
  1913. return self}, function($ctx1) {$ctx1.fill(self,"rounded",{},smalltalk.Number)})},
  1914. messageSends: []}),
  1915. smalltalk.Number);
  1916. smalltalk.addMethod(
  1917. "_sqrt",
  1918. smalltalk.method({
  1919. selector: "sqrt",
  1920. fn: function (){
  1921. var self=this;
  1922. return smalltalk.withContext(function($ctx1) { return Math.sqrt(self);
  1923. return self}, function($ctx1) {$ctx1.fill(self,"sqrt",{},smalltalk.Number)})},
  1924. messageSends: []}),
  1925. smalltalk.Number);
  1926. smalltalk.addMethod(
  1927. "_squared",
  1928. smalltalk.method({
  1929. selector: "squared",
  1930. fn: function (){
  1931. var self=this;
  1932. return smalltalk.withContext(function($ctx1) { var $1;
  1933. $1=_st(self).__star(self);
  1934. return $1;
  1935. }, function($ctx1) {$ctx1.fill(self,"squared",{},smalltalk.Number)})},
  1936. messageSends: ["*"]}),
  1937. smalltalk.Number);
  1938. smalltalk.addMethod(
  1939. "_timesRepeat_",
  1940. smalltalk.method({
  1941. selector: "timesRepeat:",
  1942. fn: function (aBlock){
  1943. var self=this;
  1944. var count;
  1945. return smalltalk.withContext(function($ctx1) { count=(1);
  1946. _st((function(){
  1947. return smalltalk.withContext(function($ctx2) { return _st(count).__gt(self);
  1948. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
  1949. return smalltalk.withContext(function($ctx2) { _st(aBlock)._value();
  1950. count=_st(count).__plus((1));
  1951. return count;
  1952. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1953. return self}, function($ctx1) {$ctx1.fill(self,"timesRepeat:",{aBlock:aBlock,count:count},smalltalk.Number)})},
  1954. messageSends: ["whileFalse:", "value", "+", ">"]}),
  1955. smalltalk.Number);
  1956. smalltalk.addMethod(
  1957. "_to_",
  1958. smalltalk.method({
  1959. selector: "to:",
  1960. fn: function (aNumber){
  1961. var self=this;
  1962. var array,first,last,count;
  1963. return smalltalk.withContext(function($ctx1) { var $1;
  1964. first=_st(self)._truncated();
  1965. last=_st(_st(aNumber)._truncated()).__plus((1));
  1966. count=(1);
  1967. array=_st((smalltalk.Array || Array))._new();
  1968. _st(_st(last).__minus(first))._timesRepeat_((function(){
  1969. return smalltalk.withContext(function($ctx2) { _st(array)._at_put_(count,first);
  1970. count=_st(count).__plus((1));
  1971. count;
  1972. first=_st(first).__plus((1));
  1973. return first;
  1974. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1975. $1=array;
  1976. return $1;
  1977. }, function($ctx1) {$ctx1.fill(self,"to:",{aNumber:aNumber,array:array,first:first,last:last,count:count},smalltalk.Number)})},
  1978. messageSends: ["truncated", "+", "new", "timesRepeat:", "at:put:", "-"]}),
  1979. smalltalk.Number);
  1980. smalltalk.addMethod(
  1981. "_to_by_",
  1982. smalltalk.method({
  1983. selector: "to:by:",
  1984. fn: function (stop,step){
  1985. var self=this;
  1986. var array,value,pos;
  1987. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1988. value=self;
  1989. array=_st((smalltalk.Array || Array))._new();
  1990. pos=(1);
  1991. $1=_st(step).__eq((0));
  1992. if(smalltalk.assert($1)){
  1993. _st(self)._error_("step must be non-zero");
  1994. };
  1995. $2=_st(step).__lt((0));
  1996. if(smalltalk.assert($2)){
  1997. _st((function(){
  1998. return smalltalk.withContext(function($ctx2) { return _st(value).__gt_eq(stop);
  1999. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2000. return smalltalk.withContext(function($ctx2) { _st(array)._at_put_(pos,value);
  2001. pos=_st(pos).__plus((1));
  2002. pos;
  2003. value=_st(value).__plus(step);
  2004. return value;
  2005. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2006. } else {
  2007. _st((function(){
  2008. return smalltalk.withContext(function($ctx2) { return _st(value).__lt_eq(stop);
  2009. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2010. return smalltalk.withContext(function($ctx2) { _st(array)._at_put_(pos,value);
  2011. pos=_st(pos).__plus((1));
  2012. pos;
  2013. value=_st(value).__plus(step);
  2014. return value;
  2015. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2016. };
  2017. $3=array;
  2018. return $3;
  2019. }, function($ctx1) {$ctx1.fill(self,"to:by:",{stop:stop,step:step,array:array,value:value,pos:pos},smalltalk.Number)})},
  2020. messageSends: ["new", "ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "at:put:", "+", ">=", "<=", "<"]}),
  2021. smalltalk.Number);
  2022. smalltalk.addMethod(
  2023. "_to_by_do_",
  2024. smalltalk.method({
  2025. selector: "to:by:do:",
  2026. fn: function (stop,step,aBlock){
  2027. var self=this;
  2028. var value;
  2029. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2030. value=self;
  2031. $1=_st(step).__eq((0));
  2032. if(smalltalk.assert($1)){
  2033. _st(self)._error_("step must be non-zero");
  2034. };
  2035. $2=_st(step).__lt((0));
  2036. if(smalltalk.assert($2)){
  2037. _st((function(){
  2038. return smalltalk.withContext(function($ctx2) { return _st(value).__gt_eq(stop);
  2039. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2040. return smalltalk.withContext(function($ctx2) { _st(aBlock)._value_(value);
  2041. value=_st(value).__plus(step);
  2042. return value;
  2043. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2044. } else {
  2045. _st((function(){
  2046. return smalltalk.withContext(function($ctx2) { return _st(value).__lt_eq(stop);
  2047. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2048. return smalltalk.withContext(function($ctx2) { _st(aBlock)._value_(value);
  2049. value=_st(value).__plus(step);
  2050. return value;
  2051. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2052. };
  2053. return self}, function($ctx1) {$ctx1.fill(self,"to:by:do:",{stop:stop,step:step,aBlock:aBlock,value:value},smalltalk.Number)})},
  2054. messageSends: ["ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "value:", "+", ">=", "<=", "<"]}),
  2055. smalltalk.Number);
  2056. smalltalk.addMethod(
  2057. "_to_do_",
  2058. smalltalk.method({
  2059. selector: "to:do:",
  2060. fn: function (stop,aBlock){
  2061. var self=this;
  2062. var nextValue;
  2063. return smalltalk.withContext(function($ctx1) { nextValue=self;
  2064. _st((function(){
  2065. return smalltalk.withContext(function($ctx2) { return _st(nextValue).__lt_eq(stop);
  2066. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2067. return smalltalk.withContext(function($ctx2) { _st(aBlock)._value_(nextValue);
  2068. nextValue=_st(nextValue).__plus((1));
  2069. return nextValue;
  2070. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2071. return self}, function($ctx1) {$ctx1.fill(self,"to:do:",{stop:stop,aBlock:aBlock,nextValue:nextValue},smalltalk.Number)})},
  2072. messageSends: ["whileTrue:", "value:", "+", "<="]}),
  2073. smalltalk.Number);
  2074. smalltalk.addMethod(
  2075. "_truncated",
  2076. smalltalk.method({
  2077. selector: "truncated",
  2078. fn: function (){
  2079. var self=this;
  2080. return smalltalk.withContext(function($ctx1) {
  2081. if(self >= 0) {
  2082. return Math.floor(self);
  2083. } else {
  2084. return Math.floor(self * (-1)) * (-1);
  2085. };
  2086. ;
  2087. return self}, function($ctx1) {$ctx1.fill(self,"truncated",{},smalltalk.Number)})},
  2088. messageSends: []}),
  2089. smalltalk.Number);
  2090. smalltalk.addMethod(
  2091. "__or",
  2092. smalltalk.method({
  2093. selector: "|",
  2094. fn: function (aNumber){
  2095. var self=this;
  2096. return smalltalk.withContext(function($ctx1) { return self | aNumber;
  2097. return self}, function($ctx1) {$ctx1.fill(self,"|",{aNumber:aNumber},smalltalk.Number)})},
  2098. messageSends: []}),
  2099. smalltalk.Number);
  2100. smalltalk.addMethod(
  2101. "_pi",
  2102. smalltalk.method({
  2103. selector: "pi",
  2104. fn: function (){
  2105. var self=this;
  2106. return smalltalk.withContext(function($ctx1) { return Math.PI;
  2107. return self}, function($ctx1) {$ctx1.fill(self,"pi",{},smalltalk.Number.klass)})},
  2108. messageSends: []}),
  2109. smalltalk.Number.klass);
  2110. smalltalk.addClass('Organizer', smalltalk.Object, [], 'Kernel-Objects');
  2111. smalltalk.addMethod(
  2112. "_addElement_",
  2113. smalltalk.method({
  2114. selector: "addElement:",
  2115. fn: function (anObject){
  2116. var self=this;
  2117. return smalltalk.withContext(function($ctx1) { self.elements.addElement(anObject);
  2118. return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{anObject:anObject},smalltalk.Organizer)})},
  2119. messageSends: []}),
  2120. smalltalk.Organizer);
  2121. smalltalk.addMethod(
  2122. "_elements",
  2123. smalltalk.method({
  2124. selector: "elements",
  2125. fn: function (){
  2126. var self=this;
  2127. return smalltalk.withContext(function($ctx1) { var $1;
  2128. $1=_st(_st(self)._basicAt_("elements"))._copy();
  2129. return $1;
  2130. }, function($ctx1) {$ctx1.fill(self,"elements",{},smalltalk.Organizer)})},
  2131. messageSends: ["copy", "basicAt:"]}),
  2132. smalltalk.Organizer);
  2133. smalltalk.addMethod(
  2134. "_removeElement_",
  2135. smalltalk.method({
  2136. selector: "removeElement:",
  2137. fn: function (anObject){
  2138. var self=this;
  2139. return smalltalk.withContext(function($ctx1) { self.elements.removeElement(anObject);
  2140. return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{anObject:anObject},smalltalk.Organizer)})},
  2141. messageSends: []}),
  2142. smalltalk.Organizer);
  2143. smalltalk.addClass('ClassOrganizer', smalltalk.Organizer, [], 'Kernel-Objects');
  2144. smalltalk.addMethod(
  2145. "_addElement_",
  2146. smalltalk.method({
  2147. selector: "addElement:",
  2148. fn: function (aString){
  2149. var self=this;
  2150. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2151. smalltalk.Organizer.fn.prototype._addElement_.apply(_st(self), [aString]);
  2152. $1=_st((smalltalk.ProtocolAdded || ProtocolAdded))._new();
  2153. _st($1)._protocol_(aString);
  2154. _st($1)._theClass_(_st(self)._theClass());
  2155. $2=_st($1)._yourself();
  2156. _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._announce_($2);
  2157. return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{aString:aString},smalltalk.ClassOrganizer)})},
  2158. messageSends: ["addElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"]}),
  2159. smalltalk.ClassOrganizer);
  2160. smalltalk.addMethod(
  2161. "_removeElement_",
  2162. smalltalk.method({
  2163. selector: "removeElement:",
  2164. fn: function (aString){
  2165. var self=this;
  2166. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2167. smalltalk.Organizer.fn.prototype._removeElement_.apply(_st(self), [aString]);
  2168. $1=_st((smalltalk.ProtocolRemoved || ProtocolRemoved))._new();
  2169. _st($1)._protocol_(aString);
  2170. _st($1)._theClass_(_st(self)._theClass());
  2171. $2=_st($1)._yourself();
  2172. _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._announce_($2);
  2173. return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{aString:aString},smalltalk.ClassOrganizer)})},
  2174. messageSends: ["removeElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"]}),
  2175. smalltalk.ClassOrganizer);
  2176. smalltalk.addMethod(
  2177. "_theClass",
  2178. smalltalk.method({
  2179. selector: "theClass",
  2180. fn: function (){
  2181. var self=this;
  2182. return smalltalk.withContext(function($ctx1) { return self.theClass ;
  2183. return self}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassOrganizer)})},
  2184. messageSends: []}),
  2185. smalltalk.ClassOrganizer);
  2186. smalltalk.addClass('PackageOrganizer', smalltalk.Organizer, [], 'Kernel-Objects');
  2187. smalltalk.addClass('Package', smalltalk.Object, ['commitPathJs', 'commitPathSt'], 'Kernel-Objects');
  2188. smalltalk.addMethod(
  2189. "_classes",
  2190. smalltalk.method({
  2191. selector: "classes",
  2192. fn: function (){
  2193. var self=this;
  2194. return smalltalk.withContext(function($ctx1) { var $1;
  2195. $1=_st(_st(self)._organization())._elements();
  2196. return $1;
  2197. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Package)})},
  2198. messageSends: ["elements", "organization"]}),
  2199. smalltalk.Package);
  2200. smalltalk.addMethod(
  2201. "_commitPathJs",
  2202. smalltalk.method({
  2203. selector: "commitPathJs",
  2204. fn: function (){
  2205. var self=this;
  2206. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2207. $2=self["@commitPathJs"];
  2208. if(($receiver = $2) == nil || $receiver == undefined){
  2209. $1=_st(_st(self)._class())._defaultCommitPathJs();
  2210. } else {
  2211. $1=$2;
  2212. };
  2213. return $1;
  2214. }, function($ctx1) {$ctx1.fill(self,"commitPathJs",{},smalltalk.Package)})},
  2215. messageSends: ["ifNil:", "defaultCommitPathJs", "class"]}),
  2216. smalltalk.Package);
  2217. smalltalk.addMethod(
  2218. "_commitPathJs_",
  2219. smalltalk.method({
  2220. selector: "commitPathJs:",
  2221. fn: function (aString){
  2222. var self=this;
  2223. return smalltalk.withContext(function($ctx1) { self["@commitPathJs"]=aString;
  2224. return self}, function($ctx1) {$ctx1.fill(self,"commitPathJs:",{aString:aString},smalltalk.Package)})},
  2225. messageSends: []}),
  2226. smalltalk.Package);
  2227. smalltalk.addMethod(
  2228. "_commitPathSt",
  2229. smalltalk.method({
  2230. selector: "commitPathSt",
  2231. fn: function (){
  2232. var self=this;
  2233. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2234. $2=self["@commitPathSt"];
  2235. if(($receiver = $2) == nil || $receiver == undefined){
  2236. $1=_st(_st(self)._class())._defaultCommitPathSt();
  2237. } else {
  2238. $1=$2;
  2239. };
  2240. return $1;
  2241. }, function($ctx1) {$ctx1.fill(self,"commitPathSt",{},smalltalk.Package)})},
  2242. messageSends: ["ifNil:", "defaultCommitPathSt", "class"]}),
  2243. smalltalk.Package);
  2244. smalltalk.addMethod(
  2245. "_commitPathSt_",
  2246. smalltalk.method({
  2247. selector: "commitPathSt:",
  2248. fn: function (aString){
  2249. var self=this;
  2250. return smalltalk.withContext(function($ctx1) { self["@commitPathSt"]=aString;
  2251. return self}, function($ctx1) {$ctx1.fill(self,"commitPathSt:",{aString:aString},smalltalk.Package)})},
  2252. messageSends: []}),
  2253. smalltalk.Package);
  2254. smalltalk.addMethod(
  2255. "_dependencies",
  2256. smalltalk.method({
  2257. selector: "dependencies",
  2258. fn: function (){
  2259. var self=this;
  2260. return smalltalk.withContext(function($ctx1) { var $1;
  2261. $1=_st(self)._propertyAt_ifAbsent_("dependencies",(function(){
  2262. return smalltalk.withContext(function($ctx2) { return [];
  2263. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2264. return $1;
  2265. }, function($ctx1) {$ctx1.fill(self,"dependencies",{},smalltalk.Package)})},
  2266. messageSends: ["propertyAt:ifAbsent:"]}),
  2267. smalltalk.Package);
  2268. smalltalk.addMethod(
  2269. "_dependencies_",
  2270. smalltalk.method({
  2271. selector: "dependencies:",
  2272. fn: function (anArray){
  2273. var self=this;
  2274. return smalltalk.withContext(function($ctx1) { var $1;
  2275. $1=_st(self)._propertyAt_put_("dependencies",anArray);
  2276. return $1;
  2277. }, function($ctx1) {$ctx1.fill(self,"dependencies:",{anArray:anArray},smalltalk.Package)})},
  2278. messageSends: ["propertyAt:put:"]}),
  2279. smalltalk.Package);
  2280. smalltalk.addMethod(
  2281. "_jsProperties",
  2282. smalltalk.method({
  2283. selector: "jsProperties",
  2284. fn: function (){
  2285. var self=this;
  2286. return smalltalk.withContext(function($ctx1) { return self.properties;
  2287. return self}, function($ctx1) {$ctx1.fill(self,"jsProperties",{},smalltalk.Package)})},
  2288. messageSends: []}),
  2289. smalltalk.Package);
  2290. smalltalk.addMethod(
  2291. "_jsProperties_",
  2292. smalltalk.method({
  2293. selector: "jsProperties:",
  2294. fn: function (aJSObject){
  2295. var self=this;
  2296. return smalltalk.withContext(function($ctx1) { return self.properties = aJSObject;
  2297. return self}, function($ctx1) {$ctx1.fill(self,"jsProperties:",{aJSObject:aJSObject},smalltalk.Package)})},
  2298. messageSends: []}),
  2299. smalltalk.Package);
  2300. smalltalk.addMethod(
  2301. "_name",
  2302. smalltalk.method({
  2303. selector: "name",
  2304. fn: function (){
  2305. var self=this;
  2306. return smalltalk.withContext(function($ctx1) { return self.pkgName;
  2307. return self}, function($ctx1) {$ctx1.fill(self,"name",{},smalltalk.Package)})},
  2308. messageSends: []}),
  2309. smalltalk.Package);
  2310. smalltalk.addMethod(
  2311. "_name_",
  2312. smalltalk.method({
  2313. selector: "name:",
  2314. fn: function (aString){
  2315. var self=this;
  2316. return smalltalk.withContext(function($ctx1) { self.pkgName = aString;
  2317. return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString},smalltalk.Package)})},
  2318. messageSends: []}),
  2319. smalltalk.Package);
  2320. smalltalk.addMethod(
  2321. "_organization",
  2322. smalltalk.method({
  2323. selector: "organization",
  2324. fn: function (){
  2325. var self=this;
  2326. return smalltalk.withContext(function($ctx1) { var $1;
  2327. $1=_st(self)._basicAt_("organization");
  2328. return $1;
  2329. }, function($ctx1) {$ctx1.fill(self,"organization",{},smalltalk.Package)})},
  2330. messageSends: ["basicAt:"]}),
  2331. smalltalk.Package);
  2332. smalltalk.addMethod(
  2333. "_printString",
  2334. smalltalk.method({
  2335. selector: "printString",
  2336. fn: function (){
  2337. var self=this;
  2338. return smalltalk.withContext(function($ctx1) { var $1;
  2339. $1=_st(self)._name();
  2340. return $1;
  2341. }, function($ctx1) {$ctx1.fill(self,"printString",{},smalltalk.Package)})},
  2342. messageSends: ["name"]}),
  2343. smalltalk.Package);
  2344. smalltalk.addMethod(
  2345. "_properties",
  2346. smalltalk.method({
  2347. selector: "properties",
  2348. fn: function (){
  2349. var self=this;
  2350. return smalltalk.withContext(function($ctx1) { var $1;
  2351. $1=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._readJSObject_(_st(self)._basicAt_("properties"));
  2352. return $1;
  2353. }, function($ctx1) {$ctx1.fill(self,"properties",{},smalltalk.Package)})},
  2354. messageSends: ["readJSObject:", "basicAt:", "current"]}),
  2355. smalltalk.Package);
  2356. smalltalk.addMethod(
  2357. "_propertiesAsJSON",
  2358. smalltalk.method({
  2359. selector: "propertiesAsJSON",
  2360. fn: function (){
  2361. var self=this;
  2362. return smalltalk.withContext(function($ctx1) { return JSON.stringify(self.properties);
  2363. return self}, function($ctx1) {$ctx1.fill(self,"propertiesAsJSON",{},smalltalk.Package)})},
  2364. messageSends: []}),
  2365. smalltalk.Package);
  2366. smalltalk.addMethod(
  2367. "_propertyAt_",
  2368. smalltalk.method({
  2369. selector: "propertyAt:",
  2370. fn: function (key){
  2371. var self=this;
  2372. return smalltalk.withContext(function($ctx1) { return self.properties[key];
  2373. return self}, function($ctx1) {$ctx1.fill(self,"propertyAt:",{key:key},smalltalk.Package)})},
  2374. messageSends: []}),
  2375. smalltalk.Package);
  2376. smalltalk.addMethod(
  2377. "_propertyAt_ifAbsent_",
  2378. smalltalk.method({
  2379. selector: "propertyAt:ifAbsent:",
  2380. fn: function (key,block){
  2381. var self=this;
  2382. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2383. $2=_st(self)._propertyAt_(key);
  2384. if(($receiver = $2) == nil || $receiver == undefined){
  2385. $1=_st(block)._value();
  2386. } else {
  2387. $1=$2;
  2388. };
  2389. return $1;
  2390. }, function($ctx1) {$ctx1.fill(self,"propertyAt:ifAbsent:",{key:key,block:block},smalltalk.Package)})},
  2391. messageSends: ["ifNil:", "value", "propertyAt:"]}),
  2392. smalltalk.Package);
  2393. smalltalk.addMethod(
  2394. "_propertyAt_put_",
  2395. smalltalk.method({
  2396. selector: "propertyAt:put:",
  2397. fn: function (key,value){
  2398. var self=this;
  2399. return smalltalk.withContext(function($ctx1) { return self.properties[key] = value;
  2400. return self}, function($ctx1) {$ctx1.fill(self,"propertyAt:put:",{key:key,value:value},smalltalk.Package)})},
  2401. messageSends: []}),
  2402. smalltalk.Package);
  2403. smalltalk.addMethod(
  2404. "_setupClasses",
  2405. smalltalk.method({
  2406. selector: "setupClasses",
  2407. fn: function (){
  2408. var self=this;
  2409. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2410. $1=_st(self)._classes();
  2411. _st($1)._do_((function(each){
  2412. return smalltalk.withContext(function($ctx2) { return _st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._setupClass_(each);
  2413. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2414. $2=_st($1)._do_((function(each){
  2415. return smalltalk.withContext(function($ctx2) { return _st(each)._initialize();
  2416. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2417. return self}, function($ctx1) {$ctx1.fill(self,"setupClasses",{},smalltalk.Package)})},
  2418. messageSends: ["do:", "setupClass:", "new", "classes", "initialize"]}),
  2419. smalltalk.Package);
  2420. smalltalk.addMethod(
  2421. "_sortedClasses",
  2422. smalltalk.method({
  2423. selector: "sortedClasses",
  2424. fn: function (){
  2425. var self=this;
  2426. return smalltalk.withContext(function($ctx1) { var $1;
  2427. $1=_st(_st(self)._class())._sortedClasses_(_st(self)._classes());
  2428. return $1;
  2429. }, function($ctx1) {$ctx1.fill(self,"sortedClasses",{},smalltalk.Package)})},
  2430. messageSends: ["sortedClasses:", "classes", "class"]}),
  2431. smalltalk.Package);
  2432. smalltalk.Package.klass.iVarNames = ['defaultCommitPathJs','defaultCommitPathSt'];
  2433. smalltalk.addMethod(
  2434. "_commitPathsFromLoader",
  2435. smalltalk.method({
  2436. selector: "commitPathsFromLoader",
  2437. fn: function (){
  2438. var self=this;
  2439. return smalltalk.withContext(function($ctx1) {
  2440. var cp = typeof amber !== 'undefined' && amber.commitPath;
  2441. if (!cp) return;
  2442. if (cp.js) self._defaultCommitPathJs_(cp.js);
  2443. if (cp.st) self._defaultCommitPathSt_(cp.st);
  2444. ;
  2445. return self}, function($ctx1) {$ctx1.fill(self,"commitPathsFromLoader",{},smalltalk.Package.klass)})},
  2446. messageSends: []}),
  2447. smalltalk.Package.klass);
  2448. smalltalk.addMethod(
  2449. "_defaultCommitPathJs",
  2450. smalltalk.method({
  2451. selector: "defaultCommitPathJs",
  2452. fn: function (){
  2453. var self=this;
  2454. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2455. $2=self["@defaultCommitPathJs"];
  2456. if(($receiver = $2) == nil || $receiver == undefined){
  2457. self["@defaultCommitPathJs"]="js";
  2458. $1=self["@defaultCommitPathJs"];
  2459. } else {
  2460. $1=$2;
  2461. };
  2462. return $1;
  2463. }, function($ctx1) {$ctx1.fill(self,"defaultCommitPathJs",{},smalltalk.Package.klass)})},
  2464. messageSends: ["ifNil:"]}),
  2465. smalltalk.Package.klass);
  2466. smalltalk.addMethod(
  2467. "_defaultCommitPathJs_",
  2468. smalltalk.method({
  2469. selector: "defaultCommitPathJs:",
  2470. fn: function (aString){
  2471. var self=this;
  2472. return smalltalk.withContext(function($ctx1) { self["@defaultCommitPathJs"]=aString;
  2473. return self}, function($ctx1) {$ctx1.fill(self,"defaultCommitPathJs:",{aString:aString},smalltalk.Package.klass)})},
  2474. messageSends: []}),
  2475. smalltalk.Package.klass);
  2476. smalltalk.addMethod(
  2477. "_defaultCommitPathSt",
  2478. smalltalk.method({
  2479. selector: "defaultCommitPathSt",
  2480. fn: function (){
  2481. var self=this;
  2482. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2483. $2=self["@defaultCommitPathSt"];
  2484. if(($receiver = $2) == nil || $receiver == undefined){
  2485. self["@defaultCommitPathSt"]="st";
  2486. $1=self["@defaultCommitPathSt"];
  2487. } else {
  2488. $1=$2;
  2489. };
  2490. return $1;
  2491. }, function($ctx1) {$ctx1.fill(self,"defaultCommitPathSt",{},smalltalk.Package.klass)})},
  2492. messageSends: ["ifNil:"]}),
  2493. smalltalk.Package.klass);
  2494. smalltalk.addMethod(
  2495. "_defaultCommitPathSt_",
  2496. smalltalk.method({
  2497. selector: "defaultCommitPathSt:",
  2498. fn: function (aString){
  2499. var self=this;
  2500. return smalltalk.withContext(function($ctx1) { self["@defaultCommitPathSt"]=aString;
  2501. return self}, function($ctx1) {$ctx1.fill(self,"defaultCommitPathSt:",{aString:aString},smalltalk.Package.klass)})},
  2502. messageSends: []}),
  2503. smalltalk.Package.klass);
  2504. smalltalk.addMethod(
  2505. "_fetch_",
  2506. smalltalk.method({
  2507. selector: "fetch:",
  2508. fn: function (aPackageName){
  2509. var self=this;
  2510. return smalltalk.withContext(function($ctx1) { _st(self)._fetch_prefix_(aPackageName,_st(_st(self)._defaultCommitPathJs()).__comma("/"));
  2511. return self}, function($ctx1) {$ctx1.fill(self,"fetch:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
  2512. messageSends: ["fetch:prefix:", ",", "defaultCommitPathJs"]}),
  2513. smalltalk.Package.klass);
  2514. smalltalk.addMethod(
  2515. "_fetch_prefix_",
  2516. smalltalk.method({
  2517. selector: "fetch:prefix:",
  2518. fn: function (aPackageName,aPrefix){
  2519. var self=this;
  2520. return smalltalk.withContext(function($ctx1) { _st(jQuery)._getScript_onSuccess_(_st(_st(aPrefix).__comma(aPackageName)).__comma(".js"),(function(){
  2521. return smalltalk.withContext(function($ctx2) { return _st(_st((smalltalk.Package || Package))._named_(aPackageName))._setupClasses();
  2522. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2523. return self}, function($ctx1) {$ctx1.fill(self,"fetch:prefix:",{aPackageName:aPackageName,aPrefix:aPrefix},smalltalk.Package.klass)})},
  2524. messageSends: ["getScript:onSuccess:", ",", "setupClasses", "named:"]}),
  2525. smalltalk.Package.klass);
  2526. smalltalk.addMethod(
  2527. "_initialize",
  2528. smalltalk.method({
  2529. selector: "initialize",
  2530. fn: function (){
  2531. var self=this;
  2532. return smalltalk.withContext(function($ctx1) { smalltalk.Object.klass.fn.prototype._initialize.apply(_st(self), []);
  2533. _st(self)._commitPathsFromLoader();
  2534. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Package.klass)})},
  2535. messageSends: ["initialize", "commitPathsFromLoader"]}),
  2536. smalltalk.Package.klass);
  2537. smalltalk.addMethod(
  2538. "_named_",
  2539. smalltalk.method({
  2540. selector: "named:",
  2541. fn: function (aPackageName){
  2542. var self=this;
  2543. return smalltalk.withContext(function($ctx1) { var $1;
  2544. $1=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._packageAt_(aPackageName);
  2545. return $1;
  2546. }, function($ctx1) {$ctx1.fill(self,"named:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
  2547. messageSends: ["packageAt:", "current"]}),
  2548. smalltalk.Package.klass);
  2549. smalltalk.addMethod(
  2550. "_named_ifAbsent_",
  2551. smalltalk.method({
  2552. selector: "named:ifAbsent:",
  2553. fn: function (aPackageName,aBlock){
  2554. var self=this;
  2555. return smalltalk.withContext(function($ctx1) { var $1;
  2556. $1=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._packageAt_ifAbsent_(aPackageName,aBlock);
  2557. return $1;
  2558. }, function($ctx1) {$ctx1.fill(self,"named:ifAbsent:",{aPackageName:aPackageName,aBlock:aBlock},smalltalk.Package.klass)})},
  2559. messageSends: ["packageAt:ifAbsent:", "current"]}),
  2560. smalltalk.Package.klass);
  2561. smalltalk.addMethod(
  2562. "_resetCommitPaths",
  2563. smalltalk.method({
  2564. selector: "resetCommitPaths",
  2565. fn: function (){
  2566. var self=this;
  2567. return smalltalk.withContext(function($ctx1) { self["@defaultCommitPathJs"]=nil;
  2568. self["@defaultCommitPathSt"]=nil;
  2569. return self}, function($ctx1) {$ctx1.fill(self,"resetCommitPaths",{},smalltalk.Package.klass)})},
  2570. messageSends: []}),
  2571. smalltalk.Package.klass);
  2572. smalltalk.addMethod(
  2573. "_sortedClasses_",
  2574. smalltalk.method({
  2575. selector: "sortedClasses:",
  2576. fn: function (classes){
  2577. var self=this;
  2578. var children,others,nodes,expandedClasses;
  2579. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2580. children=[];
  2581. others=[];
  2582. _st(classes)._do_((function(each){
  2583. return smalltalk.withContext(function($ctx2) { $1=_st(classes)._includes_(_st(each)._superclass());
  2584. if(smalltalk.assert($1)){
  2585. return _st(others)._add_(each);
  2586. } else {
  2587. return _st(children)._add_(each);
  2588. };
  2589. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2590. nodes=_st(children)._collect_((function(each){
  2591. return smalltalk.withContext(function($ctx2) { return _st((smalltalk.ClassSorterNode || ClassSorterNode))._on_classes_level_(each,others,(0));
  2592. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2593. nodes=_st(nodes)._sorted_((function(a,b){
  2594. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(a)._theClass())._name()).__lt_eq(_st(_st(b)._theClass())._name());
  2595. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  2596. expandedClasses=_st((smalltalk.Array || Array))._new();
  2597. _st(nodes)._do_((function(aNode){
  2598. return smalltalk.withContext(function($ctx2) { return _st(aNode)._traverseClassesWith_(expandedClasses);
  2599. }, function($ctx2) {$ctx2.fillBlock({aNode:aNode},$ctx1)})}));
  2600. $2=expandedClasses;
  2601. return $2;
  2602. }, function($ctx1) {$ctx1.fill(self,"sortedClasses:",{classes:classes,children:children,others:others,nodes:nodes,expandedClasses:expandedClasses},smalltalk.Package.klass)})},
  2603. messageSends: ["do:", "ifFalse:ifTrue:", "add:", "includes:", "superclass", "collect:", "on:classes:level:", "sorted:", "<=", "name", "theClass", "new", "traverseClassesWith:"]}),
  2604. smalltalk.Package.klass);
  2605. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel-Objects');
  2606. smalltalk.addMethod(
  2607. "__star",
  2608. smalltalk.method({
  2609. selector: "*",
  2610. fn: function (aPoint){
  2611. var self=this;
  2612. return smalltalk.withContext(function($ctx1) { var $1;
  2613. $1=_st((smalltalk.Point || Point))._x_y_(_st(_st(self)._x()).__star(_st(_st(aPoint)._asPoint())._x()),_st(_st(self)._y()).__star(_st(_st(aPoint)._asPoint())._y()));
  2614. return $1;
  2615. }, function($ctx1) {$ctx1.fill(self,"*",{aPoint:aPoint},smalltalk.Point)})},
  2616. messageSends: ["x:y:", "*", "x", "asPoint", "y"]}),
  2617. smalltalk.Point);
  2618. smalltalk.addMethod(
  2619. "__plus",
  2620. smalltalk.method({
  2621. selector: "+",
  2622. fn: function (aPoint){
  2623. var self=this;
  2624. return smalltalk.withContext(function($ctx1) { var $1;
  2625. $1=_st((smalltalk.Point || Point))._x_y_(_st(_st(self)._x()).__plus(_st(_st(aPoint)._asPoint())._x()),_st(_st(self)._y()).__plus(_st(_st(aPoint)._asPoint())._y()));
  2626. return $1;
  2627. }, function($ctx1) {$ctx1.fill(self,"+",{aPoint:aPoint},smalltalk.Point)})},
  2628. messageSends: ["x:y:", "+", "x", "asPoint", "y"]}),
  2629. smalltalk.Point);
  2630. smalltalk.addMethod(
  2631. "__minus",
  2632. smalltalk.method({
  2633. selector: "-",
  2634. fn: function (aPoint){
  2635. var self=this;
  2636. return smalltalk.withContext(function($ctx1) { var $1;
  2637. $1=_st((smalltalk.Point || Point))._x_y_(_st(_st(self)._x()).__minus(_st(_st(aPoint)._asPoint())._x()),_st(_st(self)._y()).__minus(_st(_st(aPoint)._asPoint())._y()));
  2638. return $1;
  2639. }, function($ctx1) {$ctx1.fill(self,"-",{aPoint:aPoint},smalltalk.Point)})},
  2640. messageSends: ["x:y:", "-", "x", "asPoint", "y"]}),
  2641. smalltalk.Point);
  2642. smalltalk.addMethod(
  2643. "__slash",
  2644. smalltalk.method({
  2645. selector: "/",
  2646. fn: function (aPoint){
  2647. var self=this;
  2648. return smalltalk.withContext(function($ctx1) { var $1;
  2649. $1=_st((smalltalk.Point || Point))._x_y_(_st(_st(self)._x()).__slash(_st(_st(aPoint)._asPoint())._x()),_st(_st(self)._y()).__slash(_st(_st(aPoint)._asPoint())._y()));
  2650. return $1;
  2651. }, function($ctx1) {$ctx1.fill(self,"/",{aPoint:aPoint},smalltalk.Point)})},
  2652. messageSends: ["x:y:", "/", "x", "asPoint", "y"]}),
  2653. smalltalk.Point);
  2654. smalltalk.addMethod(
  2655. "__eq",
  2656. smalltalk.method({
  2657. selector: "=",
  2658. fn: function (aPoint){
  2659. var self=this;
  2660. return smalltalk.withContext(function($ctx1) { var $1;
  2661. $1=_st(_st(_st(aPoint)._class()).__eq(_st(self)._class()))._and_((function(){
  2662. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(aPoint)._x()).__eq(_st(self)._x())).__and(_st(_st(aPoint)._y()).__eq(_st(self)._y()));
  2663. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2664. return $1;
  2665. }, function($ctx1) {$ctx1.fill(self,"=",{aPoint:aPoint},smalltalk.Point)})},
  2666. messageSends: ["and:", "&", "=", "y", "x", "class"]}),
  2667. smalltalk.Point);
  2668. smalltalk.addMethod(
  2669. "_asPoint",
  2670. smalltalk.method({
  2671. selector: "asPoint",
  2672. fn: function (){
  2673. var self=this;
  2674. return smalltalk.withContext(function($ctx1) { var $1;
  2675. $1=self;
  2676. return $1;
  2677. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Point)})},
  2678. messageSends: []}),
  2679. smalltalk.Point);
  2680. smalltalk.addMethod(
  2681. "_printString",
  2682. smalltalk.method({
  2683. selector: "printString",
  2684. fn: function (){
  2685. var self=this;
  2686. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2687. $1=_st((smalltalk.String || String))._streamContents_((function(stream){
  2688. return smalltalk.withContext(function($ctx2) { _st(stream)._nextPutAll_(_st(_st(self["@x"])._printString()).__comma("@"));
  2689. $2=_st(_st(self["@y"])._notNil())._and_((function(){
  2690. return smalltalk.withContext(function($ctx3) { return _st(self["@y"])._negative();
  2691. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2692. if(smalltalk.assert($2)){
  2693. _st(stream)._space();
  2694. };
  2695. return _st(stream)._nextPutAll_(_st(self["@y"])._printString());
  2696. }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})}));
  2697. return $1;
  2698. }, function($ctx1) {$ctx1.fill(self,"printString",{},smalltalk.Point)})},
  2699. messageSends: ["streamContents:", "nextPutAll:", ",", "printString", "ifTrue:", "space", "and:", "negative", "notNil"]}),
  2700. smalltalk.Point);
  2701. smalltalk.addMethod(
  2702. "_translateBy_",
  2703. smalltalk.method({
  2704. selector: "translateBy:",
  2705. fn: function (delta){
  2706. var self=this;
  2707. return smalltalk.withContext(function($ctx1) { var $1;
  2708. $1=_st(_st(_st(delta)._x()).__plus(self["@x"])).__at(_st(_st(delta)._y()).__plus(self["@y"]));
  2709. return $1;
  2710. }, function($ctx1) {$ctx1.fill(self,"translateBy:",{delta:delta},smalltalk.Point)})},
  2711. messageSends: ["@", "+", "y", "x"]}),
  2712. smalltalk.Point);
  2713. smalltalk.addMethod(
  2714. "_x",
  2715. smalltalk.method({
  2716. selector: "x",
  2717. fn: function (){
  2718. var self=this;
  2719. return smalltalk.withContext(function($ctx1) { var $1;
  2720. $1=self["@x"];
  2721. return $1;
  2722. }, function($ctx1) {$ctx1.fill(self,"x",{},smalltalk.Point)})},
  2723. messageSends: []}),
  2724. smalltalk.Point);
  2725. smalltalk.addMethod(
  2726. "_x_",
  2727. smalltalk.method({
  2728. selector: "x:",
  2729. fn: function (aNumber){
  2730. var self=this;
  2731. return smalltalk.withContext(function($ctx1) { self["@x"]=aNumber;
  2732. return self}, function($ctx1) {$ctx1.fill(self,"x:",{aNumber:aNumber},smalltalk.Point)})},
  2733. messageSends: []}),
  2734. smalltalk.Point);
  2735. smalltalk.addMethod(
  2736. "_y",
  2737. smalltalk.method({
  2738. selector: "y",
  2739. fn: function (){
  2740. var self=this;
  2741. return smalltalk.withContext(function($ctx1) { var $1;
  2742. $1=self["@y"];
  2743. return $1;
  2744. }, function($ctx1) {$ctx1.fill(self,"y",{},smalltalk.Point)})},
  2745. messageSends: []}),
  2746. smalltalk.Point);
  2747. smalltalk.addMethod(
  2748. "_y_",
  2749. smalltalk.method({
  2750. selector: "y:",
  2751. fn: function (aNumber){
  2752. var self=this;
  2753. return smalltalk.withContext(function($ctx1) { self["@y"]=aNumber;
  2754. return self}, function($ctx1) {$ctx1.fill(self,"y:",{aNumber:aNumber},smalltalk.Point)})},
  2755. messageSends: []}),
  2756. smalltalk.Point);
  2757. smalltalk.addMethod(
  2758. "_x_y_",
  2759. smalltalk.method({
  2760. selector: "x:y:",
  2761. fn: function (aNumber,anotherNumber){
  2762. var self=this;
  2763. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2764. $2=_st(self)._new();
  2765. _st($2)._x_(aNumber);
  2766. _st($2)._y_(anotherNumber);
  2767. $3=_st($2)._yourself();
  2768. $1=$3;
  2769. return $1;
  2770. }, function($ctx1) {$ctx1.fill(self,"x:y:",{aNumber:aNumber,anotherNumber:anotherNumber},smalltalk.Point.klass)})},
  2771. messageSends: ["x:", "new", "y:", "yourself"]}),
  2772. smalltalk.Point.klass);
  2773. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel-Objects');
  2774. smalltalk.addMethod(
  2775. "_next",
  2776. smalltalk.method({
  2777. selector: "next",
  2778. fn: function (){
  2779. var self=this;
  2780. return smalltalk.withContext(function($ctx1) { return Math.random();
  2781. return self}, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.Random)})},
  2782. messageSends: []}),
  2783. smalltalk.Random);
  2784. smalltalk.addMethod(
  2785. "_next_",
  2786. smalltalk.method({
  2787. selector: "next:",
  2788. fn: function (anInteger){
  2789. var self=this;
  2790. return smalltalk.withContext(function($ctx1) { var $1;
  2791. $1=_st(_st((1))._to_(anInteger))._collect_((function(each){
  2792. return smalltalk.withContext(function($ctx2) { return _st(self)._next();
  2793. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2794. return $1;
  2795. }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger},smalltalk.Random)})},
  2796. messageSends: ["collect:", "next", "to:"]}),
  2797. smalltalk.Random);
  2798. smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel-Objects');
  2799. smalltalk.addMethod(
  2800. "_asSmalltalkException_",
  2801. smalltalk.method({
  2802. selector: "asSmalltalkException:",
  2803. fn: function (anObject){
  2804. var self=this;
  2805. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2806. $2=_st(_st(self)._isSmalltalkObject_(anObject))._and_((function(){
  2807. return smalltalk.withContext(function($ctx2) { return _st(anObject)._isKindOf_((smalltalk.Error || Error));
  2808. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2809. if(smalltalk.assert($2)){
  2810. $1=anObject;
  2811. } else {
  2812. $1=_st((smalltalk.JavaScriptException || JavaScriptException))._on_(anObject);
  2813. };
  2814. return $1;
  2815. }, function($ctx1) {$ctx1.fill(self,"asSmalltalkException:",{anObject:anObject},smalltalk.Smalltalk)})},
  2816. messageSends: ["ifTrue:ifFalse:", "on:", "and:", "isKindOf:", "isSmalltalkObject:"]}),
  2817. smalltalk.Smalltalk);
  2818. smalltalk.addMethod(
  2819. "_at_",
  2820. smalltalk.method({
  2821. selector: "at:",
  2822. fn: function (aSymbol){
  2823. var self=this;
  2824. return smalltalk.withContext(function($ctx1) { return self[aSymbol._asString()];
  2825. return self}, function($ctx1) {$ctx1.fill(self,"at:",{aSymbol:aSymbol},smalltalk.Smalltalk)})},
  2826. messageSends: []}),
  2827. smalltalk.Smalltalk);
  2828. smalltalk.addMethod(
  2829. "_basicParse_",
  2830. smalltalk.method({
  2831. selector: "basicParse:",
  2832. fn: function (aString){
  2833. var self=this;
  2834. return smalltalk.withContext(function($ctx1) { return smalltalk.parser.parse(aString);
  2835. return self}, function($ctx1) {$ctx1.fill(self,"basicParse:",{aString:aString},smalltalk.Smalltalk)})},
  2836. messageSends: []}),
  2837. smalltalk.Smalltalk);
  2838. smalltalk.addMethod(
  2839. "_classes",
  2840. smalltalk.method({
  2841. selector: "classes",
  2842. fn: function (){
  2843. var self=this;
  2844. return smalltalk.withContext(function($ctx1) { return self.classes();
  2845. return self}, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Smalltalk)})},
  2846. messageSends: []}),
  2847. smalltalk.Smalltalk);
  2848. smalltalk.addMethod(
  2849. "_createPackage_",
  2850. smalltalk.method({
  2851. selector: "createPackage:",
  2852. fn: function (packageName){
  2853. var self=this;
  2854. return smalltalk.withContext(function($ctx1) { return smalltalk.addPackage(packageName);
  2855. return self}, function($ctx1) {$ctx1.fill(self,"createPackage:",{packageName:packageName},smalltalk.Smalltalk)})},
  2856. messageSends: []}),
  2857. smalltalk.Smalltalk);
  2858. smalltalk.addMethod(
  2859. "_createPackage_properties_",
  2860. smalltalk.method({
  2861. selector: "createPackage:properties:",
  2862. fn: function (packageName,aDict){
  2863. var self=this;
  2864. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2865. _st(self)._deprecatedAPI();
  2866. $1=_st(aDict)._isEmpty();
  2867. if(! smalltalk.assert($1)){
  2868. _st(self)._error_("createPackage:properties: called with nonempty properties");
  2869. };
  2870. $2=_st(self)._createPackage_(packageName);
  2871. return $2;
  2872. }, function($ctx1) {$ctx1.fill(self,"createPackage:properties:",{packageName:packageName,aDict:aDict},smalltalk.Smalltalk)})},
  2873. messageSends: ["deprecatedAPI", "ifFalse:", "error:", "isEmpty", "createPackage:"]}),
  2874. smalltalk.Smalltalk);
  2875. smalltalk.addMethod(
  2876. "_deleteClass_",
  2877. smalltalk.method({
  2878. selector: "deleteClass:",
  2879. fn: function (aClass){
  2880. var self=this;
  2881. return smalltalk.withContext(function($ctx1) { self.removeClass(aClass);
  2882. return self}, function($ctx1) {$ctx1.fill(self,"deleteClass:",{aClass:aClass},smalltalk.Smalltalk)})},
  2883. messageSends: []}),
  2884. smalltalk.Smalltalk);
  2885. smalltalk.addMethod(
  2886. "_deletePackage_",
  2887. smalltalk.method({
  2888. selector: "deletePackage:",
  2889. fn: function (packageName){
  2890. var self=this;
  2891. return smalltalk.withContext(function($ctx1) { delete smalltalk.packages[packageName];
  2892. return self}, function($ctx1) {$ctx1.fill(self,"deletePackage:",{packageName:packageName},smalltalk.Smalltalk)})},
  2893. messageSends: []}),
  2894. smalltalk.Smalltalk);
  2895. smalltalk.addMethod(
  2896. "_isSmalltalkObject_",
  2897. smalltalk.method({
  2898. selector: "isSmalltalkObject:",
  2899. fn: function (anObject){
  2900. var self=this;
  2901. return smalltalk.withContext(function($ctx1) { return typeof anObject.klass !== 'undefined';
  2902. return self}, function($ctx1) {$ctx1.fill(self,"isSmalltalkObject:",{anObject:anObject},smalltalk.Smalltalk)})},
  2903. messageSends: []}),
  2904. smalltalk.Smalltalk);
  2905. smalltalk.addMethod(
  2906. "_packageAt_",
  2907. smalltalk.method({
  2908. selector: "packageAt:",
  2909. fn: function (packageName){
  2910. var self=this;
  2911. return smalltalk.withContext(function($ctx1) { return self.packages[packageName];
  2912. return self}, function($ctx1) {$ctx1.fill(self,"packageAt:",{packageName:packageName},smalltalk.Smalltalk)})},
  2913. messageSends: []}),
  2914. smalltalk.Smalltalk);
  2915. smalltalk.addMethod(
  2916. "_packageAt_ifAbsent_",
  2917. smalltalk.method({
  2918. selector: "packageAt:ifAbsent:",
  2919. fn: function (packageName,aBlock){
  2920. var self=this;
  2921. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2922. $2=_st(self)._packageAt_(packageName);
  2923. $1=_st($2)._ifNil_(aBlock);
  2924. return $1;
  2925. }, function($ctx1) {$ctx1.fill(self,"packageAt:ifAbsent:",{packageName:packageName,aBlock:aBlock},smalltalk.Smalltalk)})},
  2926. messageSends: ["ifNil:", "packageAt:"]}),
  2927. smalltalk.Smalltalk);
  2928. smalltalk.addMethod(
  2929. "_packages",
  2930. smalltalk.method({
  2931. selector: "packages",
  2932. fn: function (){
  2933. var self=this;
  2934. return smalltalk.withContext(function($ctx1) { return self.packages.all();
  2935. return self}, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.Smalltalk)})},
  2936. messageSends: []}),
  2937. smalltalk.Smalltalk);
  2938. smalltalk.addMethod(
  2939. "_parse_",
  2940. smalltalk.method({
  2941. selector: "parse:",
  2942. fn: function (aString){
  2943. var self=this;
  2944. var result;
  2945. return smalltalk.withContext(function($ctx1) { var $1;
  2946. _st(self)._try_catch_((function(){
  2947. return smalltalk.withContext(function($ctx2) { result=_st(self)._basicParse_(aString);
  2948. return result;
  2949. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(ex){
  2950. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._parseError_parsing_(ex,aString))._signal();
  2951. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  2952. $1=result;
  2953. return $1;
  2954. }, function($ctx1) {$ctx1.fill(self,"parse:",{aString:aString,result:result},smalltalk.Smalltalk)})},
  2955. messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:"]}),
  2956. smalltalk.Smalltalk);
  2957. smalltalk.addMethod(
  2958. "_parseError_parsing_",
  2959. smalltalk.method({
  2960. selector: "parseError:parsing:",
  2961. fn: function (anException,aString){
  2962. var self=this;
  2963. return smalltalk.withContext(function($ctx1) { var $1;
  2964. $1=_st(_st((smalltalk.ParseError || ParseError))._new())._messageText_(_st(_st(_st(_st(_st("Parse error on line ").__comma(_st(anException)._basicAt_("line"))).__comma(" column ")).__comma(_st(anException)._basicAt_("column"))).__comma(" : Unexpected character ")).__comma(_st(anException)._basicAt_("found")));
  2965. return $1;
  2966. }, function($ctx1) {$ctx1.fill(self,"parseError:parsing:",{anException:anException,aString:aString},smalltalk.Smalltalk)})},
  2967. messageSends: ["messageText:", ",", "basicAt:", "new"]}),
  2968. smalltalk.Smalltalk);
  2969. smalltalk.addMethod(
  2970. "_pseudoVariableNames",
  2971. smalltalk.method({
  2972. selector: "pseudoVariableNames",
  2973. fn: function (){
  2974. var self=this;
  2975. return smalltalk.withContext(function($ctx1) { return ["self", "super", "nil", "true", "false", "thisContext"];
  2976. }, function($ctx1) {$ctx1.fill(self,"pseudoVariableNames",{},smalltalk.Smalltalk)})},
  2977. messageSends: []}),
  2978. smalltalk.Smalltalk);
  2979. smalltalk.addMethod(
  2980. "_readJSObject_",
  2981. smalltalk.method({
  2982. selector: "readJSObject:",
  2983. fn: function (anObject){
  2984. var self=this;
  2985. return smalltalk.withContext(function($ctx1) { return self.readJSObject(anObject);
  2986. return self}, function($ctx1) {$ctx1.fill(self,"readJSObject:",{anObject:anObject},smalltalk.Smalltalk)})},
  2987. messageSends: []}),
  2988. smalltalk.Smalltalk);
  2989. smalltalk.addMethod(
  2990. "_removeClass_",
  2991. smalltalk.method({
  2992. selector: "removeClass:",
  2993. fn: function (aClass){
  2994. var self=this;
  2995. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2996. $1=_st(aClass)._isMetaclass();
  2997. if(smalltalk.assert($1)){
  2998. _st(self)._error_(_st(_st(aClass)._asString()).__comma(" is a Metaclass and cannot be removed!"));
  2999. };
  3000. _st(self)._deleteClass_(aClass);
  3001. $2=_st((smalltalk.ClassRemoved || ClassRemoved))._new();
  3002. _st($2)._theClass_(aClass);
  3003. $3=_st($2)._yourself();
  3004. _st(_st((smalltalk.SystemAnnouncer || SystemAnnouncer))._current())._announce_($3);
  3005. return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.Smalltalk)})},
  3006. messageSends: ["ifTrue:", "error:", ",", "asString", "isMetaclass", "deleteClass:", "announce:", "theClass:", "new", "yourself", "current"]}),
  3007. smalltalk.Smalltalk);
  3008. smalltalk.addMethod(
  3009. "_removePackage_",
  3010. smalltalk.method({
  3011. selector: "removePackage:",
  3012. fn: function (packageName){
  3013. var self=this;
  3014. var pkg;
  3015. return smalltalk.withContext(function($ctx1) { pkg=_st(self)._packageAt_ifAbsent_(packageName,(function(){
  3016. return smalltalk.withContext(function($ctx2) { return _st(self)._error_(_st("Missing package: ").__comma(packageName));
  3017. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3018. _st(_st(pkg)._classes())._do_((function(each){
  3019. return smalltalk.withContext(function($ctx2) { return _st(self)._removeClass_(each);
  3020. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3021. _st(self)._deletePackage_(packageName);
  3022. return self}, function($ctx1) {$ctx1.fill(self,"removePackage:",{packageName:packageName,pkg:pkg},smalltalk.Smalltalk)})},
  3023. messageSends: ["packageAt:ifAbsent:", "error:", ",", "do:", "removeClass:", "classes", "deletePackage:"]}),
  3024. smalltalk.Smalltalk);
  3025. smalltalk.addMethod(
  3026. "_renamePackage_to_",
  3027. smalltalk.method({
  3028. selector: "renamePackage:to:",
  3029. fn: function (packageName,newName){
  3030. var self=this;
  3031. var pkg;
  3032. return smalltalk.withContext(function($ctx1) { var $1;
  3033. pkg=_st(self)._packageAt_ifAbsent_(packageName,(function(){
  3034. return smalltalk.withContext(function($ctx2) { return _st(self)._error_(_st("Missing package: ").__comma(packageName));
  3035. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3036. $1=_st(self)._packageAt_(newName);
  3037. if(($receiver = $1) == nil || $receiver == undefined){
  3038. $1;
  3039. } else {
  3040. _st(self)._error_(_st("Already exists a package called: ").__comma(newName));
  3041. };
  3042. _st(_st(self)._basicAt_("packages"))._at_put_(newName,pkg);
  3043. _st(pkg)._name_(newName);
  3044. _st(self)._deletePackage_(packageName);
  3045. return self}, function($ctx1) {$ctx1.fill(self,"renamePackage:to:",{packageName:packageName,newName:newName,pkg:pkg},smalltalk.Smalltalk)})},
  3046. messageSends: ["packageAt:ifAbsent:", "error:", ",", "ifNotNil:", "packageAt:", "at:put:", "basicAt:", "name:", "deletePackage:"]}),
  3047. smalltalk.Smalltalk);
  3048. smalltalk.addMethod(
  3049. "_reservedWords",
  3050. smalltalk.method({
  3051. selector: "reservedWords",
  3052. fn: function (){
  3053. var self=this;
  3054. return smalltalk.withContext(function($ctx1) { return self.reservedWords;
  3055. return self}, function($ctx1) {$ctx1.fill(self,"reservedWords",{},smalltalk.Smalltalk)})},
  3056. messageSends: []}),
  3057. smalltalk.Smalltalk);
  3058. smalltalk.addMethod(
  3059. "_version",
  3060. smalltalk.method({
  3061. selector: "version",
  3062. fn: function (){
  3063. var self=this;
  3064. return smalltalk.withContext(function($ctx1) { return "0.10";
  3065. }, function($ctx1) {$ctx1.fill(self,"version",{},smalltalk.Smalltalk)})},
  3066. messageSends: []}),
  3067. smalltalk.Smalltalk);
  3068. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  3069. smalltalk.addMethod(
  3070. "_current",
  3071. smalltalk.method({
  3072. selector: "current",
  3073. fn: function (){
  3074. var self=this;
  3075. return smalltalk.withContext(function($ctx1) { return smalltalk;
  3076. return self}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.Smalltalk.klass)})},
  3077. messageSends: []}),
  3078. smalltalk.Smalltalk.klass);
  3079. smalltalk.addClass('Timeout', smalltalk.Object, ['rawTimeout'], 'Kernel-Objects');
  3080. smalltalk.addMethod(
  3081. "_clearInterval",
  3082. smalltalk.method({
  3083. selector: "clearInterval",
  3084. fn: function (){
  3085. var self=this;
  3086. return smalltalk.withContext(function($ctx1) {
  3087. var interval = self["@rawTimeout"];
  3088. clearInterval(interval);
  3089. ;
  3090. return self}, function($ctx1) {$ctx1.fill(self,"clearInterval",{},smalltalk.Timeout)})},
  3091. messageSends: []}),
  3092. smalltalk.Timeout);
  3093. smalltalk.addMethod(
  3094. "_clearTimeout",
  3095. smalltalk.method({
  3096. selector: "clearTimeout",
  3097. fn: function (){
  3098. var self=this;
  3099. return smalltalk.withContext(function($ctx1) {
  3100. var timeout = self["@rawTimeout"];
  3101. clearTimeout(timeout);
  3102. ;
  3103. return self}, function($ctx1) {$ctx1.fill(self,"clearTimeout",{},smalltalk.Timeout)})},
  3104. messageSends: []}),
  3105. smalltalk.Timeout);
  3106. smalltalk.addMethod(
  3107. "_rawTimeout_",
  3108. smalltalk.method({
  3109. selector: "rawTimeout:",
  3110. fn: function (anObject){
  3111. var self=this;
  3112. return smalltalk.withContext(function($ctx1) { self["@rawTimeout"]=anObject;
  3113. return self}, function($ctx1) {$ctx1.fill(self,"rawTimeout:",{anObject:anObject},smalltalk.Timeout)})},
  3114. messageSends: []}),
  3115. smalltalk.Timeout);
  3116. smalltalk.addMethod(
  3117. "_on_",
  3118. smalltalk.method({
  3119. selector: "on:",
  3120. fn: function (anObject){
  3121. var self=this;
  3122. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  3123. $2=_st(self)._new();
  3124. _st($2)._rawTimeout_(anObject);
  3125. $3=_st($2)._yourself();
  3126. $1=$3;
  3127. return $1;
  3128. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Timeout.klass)})},
  3129. messageSends: ["rawTimeout:", "new", "yourself"]}),
  3130. smalltalk.Timeout.klass);
  3131. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel-Objects');
  3132. smalltalk.addMethod(
  3133. "_asJSON",
  3134. smalltalk.method({
  3135. selector: "asJSON",
  3136. fn: function (){
  3137. var self=this;
  3138. return smalltalk.withContext(function($ctx1) { var $1;
  3139. $1=null;
  3140. return $1;
  3141. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.UndefinedObject)})},
  3142. messageSends: []}),
  3143. smalltalk.UndefinedObject);
  3144. smalltalk.addMethod(
  3145. "_deepCopy",
  3146. smalltalk.method({
  3147. selector: "deepCopy",
  3148. fn: function (){
  3149. var self=this;
  3150. return smalltalk.withContext(function($ctx1) { var $1;
  3151. $1=self;
  3152. return $1;
  3153. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.UndefinedObject)})},
  3154. messageSends: []}),
  3155. smalltalk.UndefinedObject);
  3156. smalltalk.addMethod(
  3157. "_ifNil_",
  3158. smalltalk.method({
  3159. selector: "ifNil:",
  3160. fn: function (aBlock){
  3161. var self=this;
  3162. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3163. $2=self;
  3164. $1=_st($2)._ifNil_ifNotNil_(aBlock,(function(){
  3165. return smalltalk.withContext(function($ctx2) { }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3166. return $1;
  3167. }, function($ctx1) {$ctx1.fill(self,"ifNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  3168. messageSends: ["ifNil:ifNotNil:"]}),
  3169. smalltalk.UndefinedObject);
  3170. smalltalk.addMethod(
  3171. "_ifNil_ifNotNil_",
  3172. smalltalk.method({
  3173. selector: "ifNil:ifNotNil:",
  3174. fn: function (aBlock,anotherBlock){
  3175. var self=this;
  3176. return smalltalk.withContext(function($ctx1) { var $1;
  3177. $1=_st(aBlock)._value();
  3178. return $1;
  3179. }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  3180. messageSends: ["value"]}),
  3181. smalltalk.UndefinedObject);
  3182. smalltalk.addMethod(
  3183. "_ifNotNil_",
  3184. smalltalk.method({
  3185. selector: "ifNotNil:",
  3186. fn: function (aBlock){
  3187. var self=this;
  3188. return smalltalk.withContext(function($ctx1) { var $1;
  3189. $1=self;
  3190. return $1;
  3191. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  3192. messageSends: []}),
  3193. smalltalk.UndefinedObject);
  3194. smalltalk.addMethod(
  3195. "_ifNotNil_ifNil_",
  3196. smalltalk.method({
  3197. selector: "ifNotNil:ifNil:",
  3198. fn: function (aBlock,anotherBlock){
  3199. var self=this;
  3200. return smalltalk.withContext(function($ctx1) { var $1;
  3201. $1=_st(anotherBlock)._value();
  3202. return $1;
  3203. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  3204. messageSends: ["value"]}),
  3205. smalltalk.UndefinedObject);
  3206. smalltalk.addMethod(
  3207. "_isNil",
  3208. smalltalk.method({
  3209. selector: "isNil",
  3210. fn: function (){
  3211. var self=this;
  3212. return smalltalk.withContext(function($ctx1) { return true;
  3213. }, function($ctx1) {$ctx1.fill(self,"isNil",{},smalltalk.UndefinedObject)})},
  3214. messageSends: []}),
  3215. smalltalk.UndefinedObject);
  3216. smalltalk.addMethod(
  3217. "_notNil",
  3218. smalltalk.method({
  3219. selector: "notNil",
  3220. fn: function (){
  3221. var self=this;
  3222. return smalltalk.withContext(function($ctx1) { return false;
  3223. }, function($ctx1) {$ctx1.fill(self,"notNil",{},smalltalk.UndefinedObject)})},
  3224. messageSends: []}),
  3225. smalltalk.UndefinedObject);
  3226. smalltalk.addMethod(
  3227. "_printString",
  3228. smalltalk.method({
  3229. selector: "printString",
  3230. fn: function (){
  3231. var self=this;
  3232. return smalltalk.withContext(function($ctx1) { return "nil";
  3233. }, function($ctx1) {$ctx1.fill(self,"printString",{},smalltalk.UndefinedObject)})},
  3234. messageSends: []}),
  3235. smalltalk.UndefinedObject);
  3236. smalltalk.addMethod(
  3237. "_shallowCopy",
  3238. smalltalk.method({
  3239. selector: "shallowCopy",
  3240. fn: function (){
  3241. var self=this;
  3242. return smalltalk.withContext(function($ctx1) { var $1;
  3243. $1=self;
  3244. return $1;
  3245. }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.UndefinedObject)})},
  3246. messageSends: []}),
  3247. smalltalk.UndefinedObject);
  3248. smalltalk.addMethod(
  3249. "_subclass_instanceVariableNames_",
  3250. smalltalk.method({
  3251. selector: "subclass:instanceVariableNames:",
  3252. fn: function (aString,anotherString){
  3253. var self=this;
  3254. return smalltalk.withContext(function($ctx1) { var $1;
  3255. $1=_st(self)._subclass_instanceVariableNames_package_(aString,anotherString,nil);
  3256. return $1;
  3257. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString},smalltalk.UndefinedObject)})},
  3258. messageSends: ["subclass:instanceVariableNames:package:"]}),
  3259. smalltalk.UndefinedObject);
  3260. smalltalk.addMethod(
  3261. "_subclass_instanceVariableNames_category_",
  3262. smalltalk.method({
  3263. selector: "subclass:instanceVariableNames:category:",
  3264. fn: function (aString,aString2,aString3){
  3265. var self=this;
  3266. return smalltalk.withContext(function($ctx1) { var $1;
  3267. _st(self)._deprecatedAPI();
  3268. $1=_st(self)._subclass_instanceVariableNames_package_(aString,aString2,aString3);
  3269. return $1;
  3270. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:category:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  3271. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"]}),
  3272. smalltalk.UndefinedObject);
  3273. smalltalk.addMethod(
  3274. "_subclass_instanceVariableNames_package_",
  3275. smalltalk.method({
  3276. selector: "subclass:instanceVariableNames:package:",
  3277. fn: function (aString,aString2,aString3){
  3278. var self=this;
  3279. return smalltalk.withContext(function($ctx1) { var $1;
  3280. $1=_st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._superclass_subclass_instanceVariableNames_package_(self,_st(aString)._asString(),aString2,aString3);
  3281. return $1;
  3282. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  3283. messageSends: ["superclass:subclass:instanceVariableNames:package:", "asString", "new"]}),
  3284. smalltalk.UndefinedObject);
  3285. smalltalk.addMethod(
  3286. "_new",
  3287. smalltalk.method({
  3288. selector: "new",
  3289. fn: function (){
  3290. var self=this;
  3291. return smalltalk.withContext(function($ctx1) { _st(self)._error_("You cannot create new instances of UndefinedObject. Use nil");
  3292. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.UndefinedObject.klass)})},
  3293. messageSends: ["error:"]}),
  3294. smalltalk.UndefinedObject.klass);