1
0

Kernel-Objects.deploy.js 132 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377
  1. (function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Kernel-Objects');
  3. smalltalk.addClass('Object', smalltalk.nil, [], 'Kernel-Objects');
  4. smalltalk.addMethod(
  5. smalltalk.method({
  6. selector: "->",
  7. fn: function (anObject){
  8. var self=this;
  9. function $Association(){return smalltalk.Association||(typeof Association=="undefined"?nil:Association)}
  10. return smalltalk.withContext(function($ctx1) {
  11. var $1;
  12. $1=_st($Association())._key_value_(self,anObject);
  13. return $1;
  14. }, function($ctx1) {$ctx1.fill(self,"->",{anObject:anObject},smalltalk.Object)})},
  15. messageSends: ["key:value:"]}),
  16. smalltalk.Object);
  17. smalltalk.addMethod(
  18. smalltalk.method({
  19. selector: "=",
  20. fn: function (anObject){
  21. var self=this;
  22. return smalltalk.withContext(function($ctx1) {
  23. var $1;
  24. $1=self.__eq_eq(anObject);
  25. return $1;
  26. }, function($ctx1) {$ctx1.fill(self,"=",{anObject:anObject},smalltalk.Object)})},
  27. messageSends: ["=="]}),
  28. smalltalk.Object);
  29. smalltalk.addMethod(
  30. smalltalk.method({
  31. selector: "==",
  32. fn: function (anObject){
  33. var self=this;
  34. return smalltalk.withContext(function($ctx1) {
  35. var $1;
  36. $1=_st(self._identityHash()).__eq(_st(anObject)._identityHash());
  37. return $1;
  38. }, function($ctx1) {$ctx1.fill(self,"==",{anObject:anObject},smalltalk.Object)})},
  39. messageSends: ["=", "identityHash"]}),
  40. smalltalk.Object);
  41. smalltalk.addMethod(
  42. smalltalk.method({
  43. selector: "asJSON",
  44. fn: function (){
  45. var self=this;
  46. var variables;
  47. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  48. return smalltalk.withContext(function($ctx1) {
  49. var $1;
  50. variables=_st($HashedCollection())._new();
  51. _st(_st(self._class())._allInstanceVariableNames())._do_((function(each){
  52. return smalltalk.withContext(function($ctx2) {
  53. return _st(variables)._at_put_(each,_st(self._instVarAt_(each))._asJSON());
  54. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  55. $1=variables;
  56. return $1;
  57. }, function($ctx1) {$ctx1.fill(self,"asJSON",{variables:variables},smalltalk.Object)})},
  58. messageSends: ["new", "do:", "at:put:", "asJSON", "instVarAt:", "allInstanceVariableNames", "class"]}),
  59. smalltalk.Object);
  60. smalltalk.addMethod(
  61. smalltalk.method({
  62. selector: "asJSONString",
  63. fn: function (){
  64. var self=this;
  65. function $JSON(){return smalltalk.JSON||(typeof JSON=="undefined"?nil:JSON)}
  66. return smalltalk.withContext(function($ctx1) {
  67. var $1;
  68. $1=_st($JSON())._stringify_(self._asJSON());
  69. return $1;
  70. }, function($ctx1) {$ctx1.fill(self,"asJSONString",{},smalltalk.Object)})},
  71. messageSends: ["stringify:", "asJSON"]}),
  72. smalltalk.Object);
  73. smalltalk.addMethod(
  74. smalltalk.method({
  75. selector: "asJavascript",
  76. fn: function (){
  77. var self=this;
  78. return smalltalk.withContext(function($ctx1) {
  79. var $1;
  80. $1=self._asString();
  81. return $1;
  82. }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Object)})},
  83. messageSends: ["asString"]}),
  84. smalltalk.Object);
  85. smalltalk.addMethod(
  86. smalltalk.method({
  87. selector: "asString",
  88. fn: function (){
  89. var self=this;
  90. return smalltalk.withContext(function($ctx1) {
  91. var $1;
  92. $1=self._printString();
  93. return $1;
  94. }, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Object)})},
  95. messageSends: ["printString"]}),
  96. smalltalk.Object);
  97. smalltalk.addMethod(
  98. smalltalk.method({
  99. selector: "basicAt:",
  100. fn: function (aString){
  101. var self=this;
  102. return smalltalk.withContext(function($ctx1) {
  103. return self[aString];
  104. return self}, function($ctx1) {$ctx1.fill(self,"basicAt:",{aString:aString},smalltalk.Object)})},
  105. messageSends: []}),
  106. smalltalk.Object);
  107. smalltalk.addMethod(
  108. smalltalk.method({
  109. selector: "basicAt:put:",
  110. fn: function (aString,anObject){
  111. var self=this;
  112. return smalltalk.withContext(function($ctx1) {
  113. return self[aString] = anObject;
  114. return self}, function($ctx1) {$ctx1.fill(self,"basicAt:put:",{aString:aString,anObject:anObject},smalltalk.Object)})},
  115. messageSends: []}),
  116. smalltalk.Object);
  117. smalltalk.addMethod(
  118. smalltalk.method({
  119. selector: "basicDelete:",
  120. fn: function (aString){
  121. var self=this;
  122. return smalltalk.withContext(function($ctx1) {
  123. delete self[aString]; return aString;
  124. return self}, function($ctx1) {$ctx1.fill(self,"basicDelete:",{aString:aString},smalltalk.Object)})},
  125. messageSends: []}),
  126. smalltalk.Object);
  127. smalltalk.addMethod(
  128. smalltalk.method({
  129. selector: "basicPerform:",
  130. fn: function (aString){
  131. var self=this;
  132. return smalltalk.withContext(function($ctx1) {
  133. var $1;
  134. $1=self._basicPerform_withArguments_(aString,[]);
  135. return $1;
  136. }, function($ctx1) {$ctx1.fill(self,"basicPerform:",{aString:aString},smalltalk.Object)})},
  137. messageSends: ["basicPerform:withArguments:"]}),
  138. smalltalk.Object);
  139. smalltalk.addMethod(
  140. smalltalk.method({
  141. selector: "basicPerform:withArguments:",
  142. fn: function (aString,aCollection){
  143. var self=this;
  144. return smalltalk.withContext(function($ctx1) {
  145. return self[aString].apply(self, aCollection);;
  146. return self}, function($ctx1) {$ctx1.fill(self,"basicPerform:withArguments:",{aString:aString,aCollection:aCollection},smalltalk.Object)})},
  147. messageSends: []}),
  148. smalltalk.Object);
  149. smalltalk.addMethod(
  150. smalltalk.method({
  151. selector: "class",
  152. fn: function (){
  153. var self=this;
  154. return smalltalk.withContext(function($ctx1) {
  155. return self.klass;
  156. return self}, function($ctx1) {$ctx1.fill(self,"class",{},smalltalk.Object)})},
  157. messageSends: []}),
  158. smalltalk.Object);
  159. smalltalk.addMethod(
  160. smalltalk.method({
  161. selector: "copy",
  162. fn: function (){
  163. var self=this;
  164. return smalltalk.withContext(function($ctx1) {
  165. var $1;
  166. $1=_st(self._shallowCopy())._postCopy();
  167. return $1;
  168. }, function($ctx1) {$ctx1.fill(self,"copy",{},smalltalk.Object)})},
  169. messageSends: ["postCopy", "shallowCopy"]}),
  170. smalltalk.Object);
  171. smalltalk.addMethod(
  172. smalltalk.method({
  173. selector: "deepCopy",
  174. fn: function (){
  175. var self=this;
  176. return smalltalk.withContext(function($ctx1) {
  177. var copy = self.klass._new();
  178. for(var i in self) {
  179. if(/^@.+/.test(i)) {
  180. copy[i] = self[i]._deepCopy();
  181. }
  182. }
  183. return copy;
  184. ;
  185. return self}, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Object)})},
  186. messageSends: []}),
  187. smalltalk.Object);
  188. smalltalk.addMethod(
  189. smalltalk.method({
  190. selector: "deprecatedAPI",
  191. fn: function (){
  192. var self=this;
  193. return smalltalk.withContext(function($ctx1) {
  194. _st(console)._warn_(_st(_st(_st(_st(smalltalk.getThisContext()._home())._asString()).__comma(" is deprecated! (in ")).__comma(_st(_st(smalltalk.getThisContext()._home())._home())._asString())).__comma(")"));
  195. return self}, function($ctx1) {$ctx1.fill(self,"deprecatedAPI",{},smalltalk.Object)})},
  196. messageSends: ["warn:", ",", "asString", "home"]}),
  197. smalltalk.Object);
  198. smalltalk.addMethod(
  199. smalltalk.method({
  200. selector: "doesNotUnderstand:",
  201. fn: function (aMessage){
  202. var self=this;
  203. function $MessageNotUnderstood(){return smalltalk.MessageNotUnderstood||(typeof MessageNotUnderstood=="undefined"?nil:MessageNotUnderstood)}
  204. return smalltalk.withContext(function($ctx1) {
  205. var $1,$2;
  206. $1=_st($MessageNotUnderstood())._new();
  207. _st($1)._receiver_(self);
  208. _st($1)._message_(aMessage);
  209. $2=_st($1)._signal();
  210. return self}, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage},smalltalk.Object)})},
  211. messageSends: ["receiver:", "new", "message:", "signal"]}),
  212. smalltalk.Object);
  213. smalltalk.addMethod(
  214. smalltalk.method({
  215. selector: "error:",
  216. fn: function (aString){
  217. var self=this;
  218. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  219. return smalltalk.withContext(function($ctx1) {
  220. _st($Error())._signal_(aString);
  221. return self}, function($ctx1) {$ctx1.fill(self,"error:",{aString:aString},smalltalk.Object)})},
  222. messageSends: ["signal:"]}),
  223. smalltalk.Object);
  224. smalltalk.addMethod(
  225. smalltalk.method({
  226. selector: "halt",
  227. fn: function (){
  228. var self=this;
  229. return smalltalk.withContext(function($ctx1) {
  230. self._error_("Halt encountered");
  231. return self}, function($ctx1) {$ctx1.fill(self,"halt",{},smalltalk.Object)})},
  232. messageSends: ["error:"]}),
  233. smalltalk.Object);
  234. smalltalk.addMethod(
  235. smalltalk.method({
  236. selector: "identityHash",
  237. fn: function (){
  238. var self=this;
  239. return smalltalk.withContext(function($ctx1) {
  240. var hash=self.identityHash;
  241. if (hash) return hash;
  242. hash=smalltalk.nextId();
  243. Object.defineProperty(self, 'identityHash', {value:hash});
  244. return hash;
  245. ;
  246. return self}, function($ctx1) {$ctx1.fill(self,"identityHash",{},smalltalk.Object)})},
  247. messageSends: []}),
  248. smalltalk.Object);
  249. smalltalk.addMethod(
  250. smalltalk.method({
  251. selector: "ifNil:",
  252. fn: function (aBlock){
  253. var self=this;
  254. return smalltalk.withContext(function($ctx1) {
  255. var $1;
  256. $1=self;
  257. return $1;
  258. }, function($ctx1) {$ctx1.fill(self,"ifNil:",{aBlock:aBlock},smalltalk.Object)})},
  259. messageSends: []}),
  260. smalltalk.Object);
  261. smalltalk.addMethod(
  262. smalltalk.method({
  263. selector: "ifNil:ifNotNil:",
  264. fn: function (aBlock,anotherBlock){
  265. var self=this;
  266. return smalltalk.withContext(function($ctx1) {
  267. var $1;
  268. $1=_st(anotherBlock)._value_(self);
  269. return $1;
  270. }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Object)})},
  271. messageSends: ["value:"]}),
  272. smalltalk.Object);
  273. smalltalk.addMethod(
  274. smalltalk.method({
  275. selector: "ifNotNil:",
  276. fn: function (aBlock){
  277. var self=this;
  278. return smalltalk.withContext(function($ctx1) {
  279. var $1;
  280. $1=_st(aBlock)._value_(self);
  281. return $1;
  282. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{aBlock:aBlock},smalltalk.Object)})},
  283. messageSends: ["value:"]}),
  284. smalltalk.Object);
  285. smalltalk.addMethod(
  286. smalltalk.method({
  287. selector: "ifNotNil:ifNil:",
  288. fn: function (aBlock,anotherBlock){
  289. var self=this;
  290. return smalltalk.withContext(function($ctx1) {
  291. var $1;
  292. $1=_st(aBlock)._value_(self);
  293. return $1;
  294. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Object)})},
  295. messageSends: ["value:"]}),
  296. smalltalk.Object);
  297. smalltalk.addMethod(
  298. smalltalk.method({
  299. selector: "initialize",
  300. fn: function (){
  301. var self=this;
  302. return smalltalk.withContext(function($ctx1) {
  303. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Object)})},
  304. messageSends: []}),
  305. smalltalk.Object);
  306. smalltalk.addMethod(
  307. smalltalk.method({
  308. selector: "inspect",
  309. fn: function (){
  310. var self=this;
  311. function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
  312. return smalltalk.withContext(function($ctx1) {
  313. _st($InspectorHandler())._inspect_(self);
  314. return self}, function($ctx1) {$ctx1.fill(self,"inspect",{},smalltalk.Object)})},
  315. messageSends: ["inspect:"]}),
  316. smalltalk.Object);
  317. smalltalk.addMethod(
  318. smalltalk.method({
  319. selector: "inspectOn:",
  320. fn: function (anInspector){
  321. var self=this;
  322. var variables;
  323. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  324. return smalltalk.withContext(function($ctx1) {
  325. var $1,$2;
  326. variables=_st($Dictionary())._new();
  327. _st(variables)._at_put_("#self",self);
  328. _st(_st(self._class())._allInstanceVariableNames())._do_((function(each){
  329. return smalltalk.withContext(function($ctx2) {
  330. return _st(variables)._at_put_(each,self._instVarAt_(each));
  331. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  332. $1=anInspector;
  333. _st($1)._setLabel_(self._printString());
  334. $2=_st($1)._setVariables_(variables);
  335. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Object)})},
  336. messageSends: ["new", "at:put:", "do:", "instVarAt:", "allInstanceVariableNames", "class", "setLabel:", "printString", "setVariables:"]}),
  337. smalltalk.Object);
  338. smalltalk.addMethod(
  339. smalltalk.method({
  340. selector: "instVarAt:",
  341. fn: function (aString){
  342. var self=this;
  343. return smalltalk.withContext(function($ctx1) {
  344. return self['@'+aString] ;
  345. return self}, function($ctx1) {$ctx1.fill(self,"instVarAt:",{aString:aString},smalltalk.Object)})},
  346. messageSends: []}),
  347. smalltalk.Object);
  348. smalltalk.addMethod(
  349. smalltalk.method({
  350. selector: "instVarAt:put:",
  351. fn: function (aString,anObject){
  352. var self=this;
  353. return smalltalk.withContext(function($ctx1) {
  354. self['@' + aString] = anObject ;
  355. return self}, function($ctx1) {$ctx1.fill(self,"instVarAt:put:",{aString:aString,anObject:anObject},smalltalk.Object)})},
  356. messageSends: []}),
  357. smalltalk.Object);
  358. smalltalk.addMethod(
  359. smalltalk.method({
  360. selector: "isBehavior",
  361. fn: function (){
  362. var self=this;
  363. return smalltalk.withContext(function($ctx1) {
  364. return false;
  365. }, function($ctx1) {$ctx1.fill(self,"isBehavior",{},smalltalk.Object)})},
  366. messageSends: []}),
  367. smalltalk.Object);
  368. smalltalk.addMethod(
  369. smalltalk.method({
  370. selector: "isBoolean",
  371. fn: function (){
  372. var self=this;
  373. return smalltalk.withContext(function($ctx1) {
  374. return false;
  375. }, function($ctx1) {$ctx1.fill(self,"isBoolean",{},smalltalk.Object)})},
  376. messageSends: []}),
  377. smalltalk.Object);
  378. smalltalk.addMethod(
  379. smalltalk.method({
  380. selector: "isClass",
  381. fn: function (){
  382. var self=this;
  383. return smalltalk.withContext(function($ctx1) {
  384. return false;
  385. }, function($ctx1) {$ctx1.fill(self,"isClass",{},smalltalk.Object)})},
  386. messageSends: []}),
  387. smalltalk.Object);
  388. smalltalk.addMethod(
  389. smalltalk.method({
  390. selector: "isCompiledMethod",
  391. fn: function (){
  392. var self=this;
  393. return smalltalk.withContext(function($ctx1) {
  394. return false;
  395. }, function($ctx1) {$ctx1.fill(self,"isCompiledMethod",{},smalltalk.Object)})},
  396. messageSends: []}),
  397. smalltalk.Object);
  398. smalltalk.addMethod(
  399. smalltalk.method({
  400. selector: "isImmutable",
  401. fn: function (){
  402. var self=this;
  403. return smalltalk.withContext(function($ctx1) {
  404. return false;
  405. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.Object)})},
  406. messageSends: []}),
  407. smalltalk.Object);
  408. smalltalk.addMethod(
  409. smalltalk.method({
  410. selector: "isKindOf:",
  411. fn: function (aClass){
  412. var self=this;
  413. return smalltalk.withContext(function($ctx1) {
  414. var $2,$1;
  415. $2=self._isMemberOf_(aClass);
  416. if(smalltalk.assert($2)){
  417. $1=true;
  418. } else {
  419. $1=_st(self._class())._inheritsFrom_(aClass);
  420. };
  421. return $1;
  422. }, function($ctx1) {$ctx1.fill(self,"isKindOf:",{aClass:aClass},smalltalk.Object)})},
  423. messageSends: ["ifTrue:ifFalse:", "inheritsFrom:", "class", "isMemberOf:"]}),
  424. smalltalk.Object);
  425. smalltalk.addMethod(
  426. smalltalk.method({
  427. selector: "isMemberOf:",
  428. fn: function (aClass){
  429. var self=this;
  430. return smalltalk.withContext(function($ctx1) {
  431. var $1;
  432. $1=_st(self._class()).__eq(aClass);
  433. return $1;
  434. }, function($ctx1) {$ctx1.fill(self,"isMemberOf:",{aClass:aClass},smalltalk.Object)})},
  435. messageSends: ["=", "class"]}),
  436. smalltalk.Object);
  437. smalltalk.addMethod(
  438. smalltalk.method({
  439. selector: "isMetaclass",
  440. fn: function (){
  441. var self=this;
  442. return smalltalk.withContext(function($ctx1) {
  443. return false;
  444. }, function($ctx1) {$ctx1.fill(self,"isMetaclass",{},smalltalk.Object)})},
  445. messageSends: []}),
  446. smalltalk.Object);
  447. smalltalk.addMethod(
  448. smalltalk.method({
  449. selector: "isNil",
  450. fn: function (){
  451. var self=this;
  452. return smalltalk.withContext(function($ctx1) {
  453. return false;
  454. }, function($ctx1) {$ctx1.fill(self,"isNil",{},smalltalk.Object)})},
  455. messageSends: []}),
  456. smalltalk.Object);
  457. smalltalk.addMethod(
  458. smalltalk.method({
  459. selector: "isNumber",
  460. fn: function (){
  461. var self=this;
  462. return smalltalk.withContext(function($ctx1) {
  463. return false;
  464. }, function($ctx1) {$ctx1.fill(self,"isNumber",{},smalltalk.Object)})},
  465. messageSends: []}),
  466. smalltalk.Object);
  467. smalltalk.addMethod(
  468. smalltalk.method({
  469. selector: "isPackage",
  470. fn: function (){
  471. var self=this;
  472. return smalltalk.withContext(function($ctx1) {
  473. return false;
  474. }, function($ctx1) {$ctx1.fill(self,"isPackage",{},smalltalk.Object)})},
  475. messageSends: []}),
  476. smalltalk.Object);
  477. smalltalk.addMethod(
  478. smalltalk.method({
  479. selector: "isParseFailure",
  480. fn: function (){
  481. var self=this;
  482. return smalltalk.withContext(function($ctx1) {
  483. return false;
  484. }, function($ctx1) {$ctx1.fill(self,"isParseFailure",{},smalltalk.Object)})},
  485. messageSends: []}),
  486. smalltalk.Object);
  487. smalltalk.addMethod(
  488. smalltalk.method({
  489. selector: "isString",
  490. fn: function (){
  491. var self=this;
  492. return smalltalk.withContext(function($ctx1) {
  493. return false;
  494. }, function($ctx1) {$ctx1.fill(self,"isString",{},smalltalk.Object)})},
  495. messageSends: []}),
  496. smalltalk.Object);
  497. smalltalk.addMethod(
  498. smalltalk.method({
  499. selector: "isSymbol",
  500. fn: function (){
  501. var self=this;
  502. return smalltalk.withContext(function($ctx1) {
  503. return false;
  504. }, function($ctx1) {$ctx1.fill(self,"isSymbol",{},smalltalk.Object)})},
  505. messageSends: []}),
  506. smalltalk.Object);
  507. smalltalk.addMethod(
  508. smalltalk.method({
  509. selector: "notNil",
  510. fn: function (){
  511. var self=this;
  512. return smalltalk.withContext(function($ctx1) {
  513. var $1;
  514. $1=_st(self._isNil())._not();
  515. return $1;
  516. }, function($ctx1) {$ctx1.fill(self,"notNil",{},smalltalk.Object)})},
  517. messageSends: ["not", "isNil"]}),
  518. smalltalk.Object);
  519. smalltalk.addMethod(
  520. smalltalk.method({
  521. selector: "perform:",
  522. fn: function (aString){
  523. var self=this;
  524. return smalltalk.withContext(function($ctx1) {
  525. var $1;
  526. $1=self._perform_withArguments_(aString,[]);
  527. return $1;
  528. }, function($ctx1) {$ctx1.fill(self,"perform:",{aString:aString},smalltalk.Object)})},
  529. messageSends: ["perform:withArguments:"]}),
  530. smalltalk.Object);
  531. smalltalk.addMethod(
  532. smalltalk.method({
  533. selector: "perform:withArguments:",
  534. fn: function (aString,aCollection){
  535. var self=this;
  536. return smalltalk.withContext(function($ctx1) {
  537. return smalltalk.send(self, aString._asSelector(), aCollection);
  538. return self}, function($ctx1) {$ctx1.fill(self,"perform:withArguments:",{aString:aString,aCollection:aCollection},smalltalk.Object)})},
  539. messageSends: []}),
  540. smalltalk.Object);
  541. smalltalk.addMethod(
  542. smalltalk.method({
  543. selector: "postCopy",
  544. fn: function (){
  545. var self=this;
  546. return smalltalk.withContext(function($ctx1) {
  547. return self}, function($ctx1) {$ctx1.fill(self,"postCopy",{},smalltalk.Object)})},
  548. messageSends: []}),
  549. smalltalk.Object);
  550. smalltalk.addMethod(
  551. smalltalk.method({
  552. selector: "printOn:",
  553. fn: function (aStream){
  554. var self=this;
  555. return smalltalk.withContext(function($ctx1) {
  556. var $1,$3,$2;
  557. $1=aStream;
  558. $3=_st(_st(_st(self._class())._name())._first())._isVowel();
  559. if(smalltalk.assert($3)){
  560. $2="an ";
  561. } else {
  562. $2="a ";
  563. };
  564. _st($1)._nextPutAll_($2);
  565. _st(aStream)._nextPutAll_(_st(self._class())._name());
  566. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Object)})},
  567. messageSends: ["nextPutAll:", "ifTrue:ifFalse:", "isVowel", "first", "name", "class"]}),
  568. smalltalk.Object);
  569. smalltalk.addMethod(
  570. smalltalk.method({
  571. selector: "printString",
  572. fn: function (){
  573. var self=this;
  574. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  575. return smalltalk.withContext(function($ctx1) {
  576. var $1;
  577. $1=_st($String())._streamContents_((function(stream){
  578. return smalltalk.withContext(function($ctx2) {
  579. return self._printOn_(stream);
  580. }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1)})}));
  581. return $1;
  582. }, function($ctx1) {$ctx1.fill(self,"printString",{},smalltalk.Object)})},
  583. messageSends: ["streamContents:", "printOn:"]}),
  584. smalltalk.Object);
  585. smalltalk.addMethod(
  586. smalltalk.method({
  587. selector: "putOn:",
  588. fn: function (aStream){
  589. var self=this;
  590. return smalltalk.withContext(function($ctx1) {
  591. _st(aStream)._nextPut_(self);
  592. return self}, function($ctx1) {$ctx1.fill(self,"putOn:",{aStream:aStream},smalltalk.Object)})},
  593. messageSends: ["nextPut:"]}),
  594. smalltalk.Object);
  595. smalltalk.addMethod(
  596. smalltalk.method({
  597. selector: "respondsTo:",
  598. fn: function (aSelector){
  599. var self=this;
  600. return smalltalk.withContext(function($ctx1) {
  601. var $1;
  602. $1=_st(self._class())._canUnderstand_(aSelector);
  603. return $1;
  604. }, function($ctx1) {$ctx1.fill(self,"respondsTo:",{aSelector:aSelector},smalltalk.Object)})},
  605. messageSends: ["canUnderstand:", "class"]}),
  606. smalltalk.Object);
  607. smalltalk.addMethod(
  608. smalltalk.method({
  609. selector: "shallowCopy",
  610. fn: function (){
  611. var self=this;
  612. return smalltalk.withContext(function($ctx1) {
  613. var copy = self.klass._new();
  614. for(var i in self) {
  615. if(/^@.+/.test(i)) {
  616. copy[i] = self[i];
  617. }
  618. }
  619. return copy;
  620. ;
  621. return self}, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.Object)})},
  622. messageSends: []}),
  623. smalltalk.Object);
  624. smalltalk.addMethod(
  625. smalltalk.method({
  626. selector: "shouldNotImplement",
  627. fn: function (){
  628. var self=this;
  629. return smalltalk.withContext(function($ctx1) {
  630. self._error_("This method should not be implemented in ".__comma(_st(self._class())._name()));
  631. return self}, function($ctx1) {$ctx1.fill(self,"shouldNotImplement",{},smalltalk.Object)})},
  632. messageSends: ["error:", ",", "name", "class"]}),
  633. smalltalk.Object);
  634. smalltalk.addMethod(
  635. smalltalk.method({
  636. selector: "size",
  637. fn: function (){
  638. var self=this;
  639. return smalltalk.withContext(function($ctx1) {
  640. self._error_("Object not indexable");
  641. return self}, function($ctx1) {$ctx1.fill(self,"size",{},smalltalk.Object)})},
  642. messageSends: ["error:"]}),
  643. smalltalk.Object);
  644. smalltalk.addMethod(
  645. smalltalk.method({
  646. selector: "subclassResponsibility",
  647. fn: function (){
  648. var self=this;
  649. return smalltalk.withContext(function($ctx1) {
  650. self._error_("This method is a responsibility of a subclass");
  651. return self}, function($ctx1) {$ctx1.fill(self,"subclassResponsibility",{},smalltalk.Object)})},
  652. messageSends: ["error:"]}),
  653. smalltalk.Object);
  654. smalltalk.addMethod(
  655. smalltalk.method({
  656. selector: "test",
  657. fn: function (){
  658. var self=this;
  659. var a;
  660. return smalltalk.withContext(function($ctx1) {
  661. a=(1);
  662. self._halt();
  663. return self}, function($ctx1) {$ctx1.fill(self,"test",{a:a},smalltalk.Object)})},
  664. messageSends: ["halt"]}),
  665. smalltalk.Object);
  666. smalltalk.addMethod(
  667. smalltalk.method({
  668. selector: "throw:",
  669. fn: function (anObject){
  670. var self=this;
  671. return smalltalk.withContext(function($ctx1) {
  672. throw anObject ;
  673. return self}, function($ctx1) {$ctx1.fill(self,"throw:",{anObject:anObject},smalltalk.Object)})},
  674. messageSends: []}),
  675. smalltalk.Object);
  676. smalltalk.addMethod(
  677. smalltalk.method({
  678. selector: "try:catch:",
  679. fn: function (aBlock,anotherBlock){
  680. var self=this;
  681. return smalltalk.withContext(function($ctx1) {
  682. try{return aBlock._value()} catch(e) {return anotherBlock._value_(e)};
  683. return self}, function($ctx1) {$ctx1.fill(self,"try:catch:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Object)})},
  684. messageSends: []}),
  685. smalltalk.Object);
  686. smalltalk.addMethod(
  687. smalltalk.method({
  688. selector: "value",
  689. fn: function (){
  690. var self=this;
  691. return smalltalk.withContext(function($ctx1) {
  692. return self.valueOf();
  693. return self}, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.Object)})},
  694. messageSends: []}),
  695. smalltalk.Object);
  696. smalltalk.addMethod(
  697. smalltalk.method({
  698. selector: "yourself",
  699. fn: function (){
  700. var self=this;
  701. return smalltalk.withContext(function($ctx1) {
  702. var $1;
  703. $1=self;
  704. return $1;
  705. }, function($ctx1) {$ctx1.fill(self,"yourself",{},smalltalk.Object)})},
  706. messageSends: []}),
  707. smalltalk.Object);
  708. smalltalk.addMethod(
  709. smalltalk.method({
  710. selector: "~=",
  711. fn: function (anObject){
  712. var self=this;
  713. return smalltalk.withContext(function($ctx1) {
  714. var $1;
  715. $1=_st(self.__eq(anObject)).__eq(false);
  716. return $1;
  717. }, function($ctx1) {$ctx1.fill(self,"~=",{anObject:anObject},smalltalk.Object)})},
  718. messageSends: ["="]}),
  719. smalltalk.Object);
  720. smalltalk.addMethod(
  721. smalltalk.method({
  722. selector: "~~",
  723. fn: function (anObject){
  724. var self=this;
  725. return smalltalk.withContext(function($ctx1) {
  726. var $1;
  727. $1=_st(self.__eq_eq(anObject)).__eq(false);
  728. return $1;
  729. }, function($ctx1) {$ctx1.fill(self,"~~",{anObject:anObject},smalltalk.Object)})},
  730. messageSends: ["=", "=="]}),
  731. smalltalk.Object);
  732. smalltalk.addMethod(
  733. smalltalk.method({
  734. selector: "heliosClass",
  735. fn: function (){
  736. var self=this;
  737. return smalltalk.withContext(function($ctx1) {
  738. return "class";
  739. }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Object.klass)})},
  740. messageSends: []}),
  741. smalltalk.Object.klass);
  742. smalltalk.addMethod(
  743. smalltalk.method({
  744. selector: "initialize",
  745. fn: function (){
  746. var self=this;
  747. return smalltalk.withContext(function($ctx1) {
  748. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Object.klass)})},
  749. messageSends: []}),
  750. smalltalk.Object.klass);
  751. smalltalk.addClass('Boolean', smalltalk.Object, [], 'Kernel-Objects');
  752. smalltalk.addMethod(
  753. smalltalk.method({
  754. selector: "&",
  755. fn: function (aBoolean){
  756. var self=this;
  757. return smalltalk.withContext(function($ctx1) {
  758. if(self == true) {
  759. return aBoolean;
  760. } else {
  761. return false;
  762. }
  763. ;
  764. return self}, function($ctx1) {$ctx1.fill(self,"&",{aBoolean:aBoolean},smalltalk.Boolean)})},
  765. messageSends: []}),
  766. smalltalk.Boolean);
  767. smalltalk.addMethod(
  768. smalltalk.method({
  769. selector: "=",
  770. fn: function (aBoolean){
  771. var self=this;
  772. return smalltalk.withContext(function($ctx1) {
  773. if(! aBoolean._isBoolean || ! aBoolean._isBoolean()) {
  774. return false;
  775. }
  776. return Boolean(self == true) == aBoolean
  777. ;
  778. return self}, function($ctx1) {$ctx1.fill(self,"=",{aBoolean:aBoolean},smalltalk.Boolean)})},
  779. messageSends: []}),
  780. smalltalk.Boolean);
  781. smalltalk.addMethod(
  782. smalltalk.method({
  783. selector: "==",
  784. fn: function (aBoolean){
  785. var self=this;
  786. return smalltalk.withContext(function($ctx1) {
  787. var $1;
  788. $1=self.__eq(aBoolean);
  789. return $1;
  790. }, function($ctx1) {$ctx1.fill(self,"==",{aBoolean:aBoolean},smalltalk.Boolean)})},
  791. messageSends: ["="]}),
  792. smalltalk.Boolean);
  793. smalltalk.addMethod(
  794. smalltalk.method({
  795. selector: "and:",
  796. fn: function (aBlock){
  797. var self=this;
  798. return smalltalk.withContext(function($ctx1) {
  799. var $2,$1;
  800. $2=self.__eq(true);
  801. $1=_st($2)._ifTrue_ifFalse_(aBlock,(function(){
  802. return smalltalk.withContext(function($ctx2) {
  803. return false;
  804. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  805. return $1;
  806. }, function($ctx1) {$ctx1.fill(self,"and:",{aBlock:aBlock},smalltalk.Boolean)})},
  807. messageSends: ["ifTrue:ifFalse:", "="]}),
  808. smalltalk.Boolean);
  809. smalltalk.addMethod(
  810. smalltalk.method({
  811. selector: "asBit",
  812. fn: function (){
  813. var self=this;
  814. return smalltalk.withContext(function($ctx1) {
  815. var $2,$1;
  816. $2=self;
  817. if(smalltalk.assert($2)){
  818. $1=(1);
  819. } else {
  820. $1=(0);
  821. };
  822. return $1;
  823. }, function($ctx1) {$ctx1.fill(self,"asBit",{},smalltalk.Boolean)})},
  824. messageSends: ["ifTrue:ifFalse:"]}),
  825. smalltalk.Boolean);
  826. smalltalk.addMethod(
  827. smalltalk.method({
  828. selector: "asJSON",
  829. fn: function (){
  830. var self=this;
  831. return smalltalk.withContext(function($ctx1) {
  832. var $1;
  833. $1=self;
  834. return $1;
  835. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Boolean)})},
  836. messageSends: []}),
  837. smalltalk.Boolean);
  838. smalltalk.addMethod(
  839. smalltalk.method({
  840. selector: "asString",
  841. fn: function (){
  842. var self=this;
  843. return smalltalk.withContext(function($ctx1) {
  844. return self.toString() ;
  845. return self}, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Boolean)})},
  846. messageSends: []}),
  847. smalltalk.Boolean);
  848. smalltalk.addMethod(
  849. smalltalk.method({
  850. selector: "deepCopy",
  851. fn: function (){
  852. var self=this;
  853. return smalltalk.withContext(function($ctx1) {
  854. var $1;
  855. $1=self;
  856. return $1;
  857. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Boolean)})},
  858. messageSends: []}),
  859. smalltalk.Boolean);
  860. smalltalk.addMethod(
  861. smalltalk.method({
  862. selector: "ifFalse:",
  863. fn: function (aBlock){
  864. var self=this;
  865. return smalltalk.withContext(function($ctx1) {
  866. var $2,$1;
  867. $2=self;
  868. $1=_st($2)._ifTrue_ifFalse_((function(){
  869. return smalltalk.withContext(function($ctx2) {
  870. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),aBlock);
  871. return $1;
  872. }, function($ctx1) {$ctx1.fill(self,"ifFalse:",{aBlock:aBlock},smalltalk.Boolean)})},
  873. messageSends: ["ifTrue:ifFalse:"]}),
  874. smalltalk.Boolean);
  875. smalltalk.addMethod(
  876. smalltalk.method({
  877. selector: "ifFalse:ifTrue:",
  878. fn: function (aBlock,anotherBlock){
  879. var self=this;
  880. return smalltalk.withContext(function($ctx1) {
  881. var $2,$1;
  882. $2=self;
  883. $1=_st($2)._ifTrue_ifFalse_(anotherBlock,aBlock);
  884. return $1;
  885. }, function($ctx1) {$ctx1.fill(self,"ifFalse:ifTrue:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Boolean)})},
  886. messageSends: ["ifTrue:ifFalse:"]}),
  887. smalltalk.Boolean);
  888. smalltalk.addMethod(
  889. smalltalk.method({
  890. selector: "ifTrue:",
  891. fn: function (aBlock){
  892. var self=this;
  893. return smalltalk.withContext(function($ctx1) {
  894. var $2,$1;
  895. $2=self;
  896. $1=_st($2)._ifTrue_ifFalse_(aBlock,(function(){
  897. return smalltalk.withContext(function($ctx2) {
  898. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  899. return $1;
  900. }, function($ctx1) {$ctx1.fill(self,"ifTrue:",{aBlock:aBlock},smalltalk.Boolean)})},
  901. messageSends: ["ifTrue:ifFalse:"]}),
  902. smalltalk.Boolean);
  903. smalltalk.addMethod(
  904. smalltalk.method({
  905. selector: "ifTrue:ifFalse:",
  906. fn: function (aBlock,anotherBlock){
  907. var self=this;
  908. return smalltalk.withContext(function($ctx1) {
  909. if(self == true) {
  910. return aBlock._value();
  911. } else {
  912. return anotherBlock._value();
  913. }
  914. ;
  915. return self}, function($ctx1) {$ctx1.fill(self,"ifTrue:ifFalse:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Boolean)})},
  916. messageSends: []}),
  917. smalltalk.Boolean);
  918. smalltalk.addMethod(
  919. smalltalk.method({
  920. selector: "isBoolean",
  921. fn: function (){
  922. var self=this;
  923. return smalltalk.withContext(function($ctx1) {
  924. return true;
  925. }, function($ctx1) {$ctx1.fill(self,"isBoolean",{},smalltalk.Boolean)})},
  926. messageSends: []}),
  927. smalltalk.Boolean);
  928. smalltalk.addMethod(
  929. smalltalk.method({
  930. selector: "isImmutable",
  931. fn: function (){
  932. var self=this;
  933. return smalltalk.withContext(function($ctx1) {
  934. return true;
  935. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.Boolean)})},
  936. messageSends: []}),
  937. smalltalk.Boolean);
  938. smalltalk.addMethod(
  939. smalltalk.method({
  940. selector: "not",
  941. fn: function (){
  942. var self=this;
  943. return smalltalk.withContext(function($ctx1) {
  944. var $1;
  945. $1=self.__eq(false);
  946. return $1;
  947. }, function($ctx1) {$ctx1.fill(self,"not",{},smalltalk.Boolean)})},
  948. messageSends: ["="]}),
  949. smalltalk.Boolean);
  950. smalltalk.addMethod(
  951. smalltalk.method({
  952. selector: "or:",
  953. fn: function (aBlock){
  954. var self=this;
  955. return smalltalk.withContext(function($ctx1) {
  956. var $2,$1;
  957. $2=self.__eq(true);
  958. $1=_st($2)._ifTrue_ifFalse_((function(){
  959. return smalltalk.withContext(function($ctx2) {
  960. return true;
  961. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),aBlock);
  962. return $1;
  963. }, function($ctx1) {$ctx1.fill(self,"or:",{aBlock:aBlock},smalltalk.Boolean)})},
  964. messageSends: ["ifTrue:ifFalse:", "="]}),
  965. smalltalk.Boolean);
  966. smalltalk.addMethod(
  967. smalltalk.method({
  968. selector: "printOn:",
  969. fn: function (aStream){
  970. var self=this;
  971. return smalltalk.withContext(function($ctx1) {
  972. _st(aStream)._nextPutAll_(self._asString());
  973. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Boolean)})},
  974. messageSends: ["nextPutAll:", "asString"]}),
  975. smalltalk.Boolean);
  976. smalltalk.addMethod(
  977. smalltalk.method({
  978. selector: "shallowCopy",
  979. fn: function (){
  980. var self=this;
  981. return smalltalk.withContext(function($ctx1) {
  982. var $1;
  983. $1=self;
  984. return $1;
  985. }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.Boolean)})},
  986. messageSends: []}),
  987. smalltalk.Boolean);
  988. smalltalk.addMethod(
  989. smalltalk.method({
  990. selector: "|",
  991. fn: function (aBoolean){
  992. var self=this;
  993. return smalltalk.withContext(function($ctx1) {
  994. if(self == true) {
  995. return true;
  996. } else {
  997. return aBoolean;
  998. }
  999. ;
  1000. return self}, function($ctx1) {$ctx1.fill(self,"|",{aBoolean:aBoolean},smalltalk.Boolean)})},
  1001. messageSends: []}),
  1002. smalltalk.Boolean);
  1003. smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel-Objects');
  1004. smalltalk.addMethod(
  1005. smalltalk.method({
  1006. selector: "+",
  1007. fn: function (aDate){
  1008. var self=this;
  1009. return smalltalk.withContext(function($ctx1) {
  1010. return self + aDate;
  1011. return self}, function($ctx1) {$ctx1.fill(self,"+",{aDate:aDate},smalltalk.Date)})},
  1012. messageSends: []}),
  1013. smalltalk.Date);
  1014. smalltalk.addMethod(
  1015. smalltalk.method({
  1016. selector: "-",
  1017. fn: function (aDate){
  1018. var self=this;
  1019. return smalltalk.withContext(function($ctx1) {
  1020. return self - aDate;
  1021. return self}, function($ctx1) {$ctx1.fill(self,"-",{aDate:aDate},smalltalk.Date)})},
  1022. messageSends: []}),
  1023. smalltalk.Date);
  1024. smalltalk.addMethod(
  1025. smalltalk.method({
  1026. selector: "<",
  1027. fn: function (aDate){
  1028. var self=this;
  1029. return smalltalk.withContext(function($ctx1) {
  1030. return self < aDate;
  1031. return self}, function($ctx1) {$ctx1.fill(self,"<",{aDate:aDate},smalltalk.Date)})},
  1032. messageSends: []}),
  1033. smalltalk.Date);
  1034. smalltalk.addMethod(
  1035. smalltalk.method({
  1036. selector: "<=",
  1037. fn: function (aDate){
  1038. var self=this;
  1039. return smalltalk.withContext(function($ctx1) {
  1040. return self <= aDate;
  1041. return self}, function($ctx1) {$ctx1.fill(self,"<=",{aDate:aDate},smalltalk.Date)})},
  1042. messageSends: []}),
  1043. smalltalk.Date);
  1044. smalltalk.addMethod(
  1045. smalltalk.method({
  1046. selector: ">",
  1047. fn: function (aDate){
  1048. var self=this;
  1049. return smalltalk.withContext(function($ctx1) {
  1050. return self > aDate;
  1051. return self}, function($ctx1) {$ctx1.fill(self,">",{aDate:aDate},smalltalk.Date)})},
  1052. messageSends: []}),
  1053. smalltalk.Date);
  1054. smalltalk.addMethod(
  1055. smalltalk.method({
  1056. selector: ">=",
  1057. fn: function (aDate){
  1058. var self=this;
  1059. return smalltalk.withContext(function($ctx1) {
  1060. return self >= aDate;
  1061. return self}, function($ctx1) {$ctx1.fill(self,">=",{aDate:aDate},smalltalk.Date)})},
  1062. messageSends: []}),
  1063. smalltalk.Date);
  1064. smalltalk.addMethod(
  1065. smalltalk.method({
  1066. selector: "asDateString",
  1067. fn: function (){
  1068. var self=this;
  1069. return smalltalk.withContext(function($ctx1) {
  1070. return self.toDateString();
  1071. return self}, function($ctx1) {$ctx1.fill(self,"asDateString",{},smalltalk.Date)})},
  1072. messageSends: []}),
  1073. smalltalk.Date);
  1074. smalltalk.addMethod(
  1075. smalltalk.method({
  1076. selector: "asLocaleString",
  1077. fn: function (){
  1078. var self=this;
  1079. return smalltalk.withContext(function($ctx1) {
  1080. return self.toLocaleString();
  1081. return self}, function($ctx1) {$ctx1.fill(self,"asLocaleString",{},smalltalk.Date)})},
  1082. messageSends: []}),
  1083. smalltalk.Date);
  1084. smalltalk.addMethod(
  1085. smalltalk.method({
  1086. selector: "asMilliseconds",
  1087. fn: function (){
  1088. var self=this;
  1089. return smalltalk.withContext(function($ctx1) {
  1090. var $1;
  1091. $1=self._time();
  1092. return $1;
  1093. }, function($ctx1) {$ctx1.fill(self,"asMilliseconds",{},smalltalk.Date)})},
  1094. messageSends: ["time"]}),
  1095. smalltalk.Date);
  1096. smalltalk.addMethod(
  1097. smalltalk.method({
  1098. selector: "asNumber",
  1099. fn: function (){
  1100. var self=this;
  1101. return smalltalk.withContext(function($ctx1) {
  1102. var $1;
  1103. $1=self._asMilliseconds();
  1104. return $1;
  1105. }, function($ctx1) {$ctx1.fill(self,"asNumber",{},smalltalk.Date)})},
  1106. messageSends: ["asMilliseconds"]}),
  1107. smalltalk.Date);
  1108. smalltalk.addMethod(
  1109. smalltalk.method({
  1110. selector: "asString",
  1111. fn: function (){
  1112. var self=this;
  1113. return smalltalk.withContext(function($ctx1) {
  1114. return self.toString();
  1115. return self}, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Date)})},
  1116. messageSends: []}),
  1117. smalltalk.Date);
  1118. smalltalk.addMethod(
  1119. smalltalk.method({
  1120. selector: "asTimeString",
  1121. fn: function (){
  1122. var self=this;
  1123. return smalltalk.withContext(function($ctx1) {
  1124. return self.toTimeString();
  1125. return self}, function($ctx1) {$ctx1.fill(self,"asTimeString",{},smalltalk.Date)})},
  1126. messageSends: []}),
  1127. smalltalk.Date);
  1128. smalltalk.addMethod(
  1129. smalltalk.method({
  1130. selector: "day",
  1131. fn: function (){
  1132. var self=this;
  1133. return smalltalk.withContext(function($ctx1) {
  1134. var $1;
  1135. $1=self._dayOfWeek();
  1136. return $1;
  1137. }, function($ctx1) {$ctx1.fill(self,"day",{},smalltalk.Date)})},
  1138. messageSends: ["dayOfWeek"]}),
  1139. smalltalk.Date);
  1140. smalltalk.addMethod(
  1141. smalltalk.method({
  1142. selector: "day:",
  1143. fn: function (aNumber){
  1144. var self=this;
  1145. return smalltalk.withContext(function($ctx1) {
  1146. self._dayOfWeek_(aNumber);
  1147. return self}, function($ctx1) {$ctx1.fill(self,"day:",{aNumber:aNumber},smalltalk.Date)})},
  1148. messageSends: ["dayOfWeek:"]}),
  1149. smalltalk.Date);
  1150. smalltalk.addMethod(
  1151. smalltalk.method({
  1152. selector: "dayOfMonth",
  1153. fn: function (){
  1154. var self=this;
  1155. return smalltalk.withContext(function($ctx1) {
  1156. return self.getDate();
  1157. return self}, function($ctx1) {$ctx1.fill(self,"dayOfMonth",{},smalltalk.Date)})},
  1158. messageSends: []}),
  1159. smalltalk.Date);
  1160. smalltalk.addMethod(
  1161. smalltalk.method({
  1162. selector: "dayOfMonth:",
  1163. fn: function (aNumber){
  1164. var self=this;
  1165. return smalltalk.withContext(function($ctx1) {
  1166. self.setDate(aNumber);
  1167. return self}, function($ctx1) {$ctx1.fill(self,"dayOfMonth:",{aNumber:aNumber},smalltalk.Date)})},
  1168. messageSends: []}),
  1169. smalltalk.Date);
  1170. smalltalk.addMethod(
  1171. smalltalk.method({
  1172. selector: "dayOfWeek",
  1173. fn: function (){
  1174. var self=this;
  1175. return smalltalk.withContext(function($ctx1) {
  1176. return self.getDay() + 1;
  1177. return self}, function($ctx1) {$ctx1.fill(self,"dayOfWeek",{},smalltalk.Date)})},
  1178. messageSends: []}),
  1179. smalltalk.Date);
  1180. smalltalk.addMethod(
  1181. smalltalk.method({
  1182. selector: "dayOfWeek:",
  1183. fn: function (aNumber){
  1184. var self=this;
  1185. return smalltalk.withContext(function($ctx1) {
  1186. return self.setDay(aNumber - 1);
  1187. return self}, function($ctx1) {$ctx1.fill(self,"dayOfWeek:",{aNumber:aNumber},smalltalk.Date)})},
  1188. messageSends: []}),
  1189. smalltalk.Date);
  1190. smalltalk.addMethod(
  1191. smalltalk.method({
  1192. selector: "hours",
  1193. fn: function (){
  1194. var self=this;
  1195. return smalltalk.withContext(function($ctx1) {
  1196. return self.getHours();
  1197. return self}, function($ctx1) {$ctx1.fill(self,"hours",{},smalltalk.Date)})},
  1198. messageSends: []}),
  1199. smalltalk.Date);
  1200. smalltalk.addMethod(
  1201. smalltalk.method({
  1202. selector: "hours:",
  1203. fn: function (aNumber){
  1204. var self=this;
  1205. return smalltalk.withContext(function($ctx1) {
  1206. self.setHours(aNumber);
  1207. return self}, function($ctx1) {$ctx1.fill(self,"hours:",{aNumber:aNumber},smalltalk.Date)})},
  1208. messageSends: []}),
  1209. smalltalk.Date);
  1210. smalltalk.addMethod(
  1211. smalltalk.method({
  1212. selector: "milliseconds",
  1213. fn: function (){
  1214. var self=this;
  1215. return smalltalk.withContext(function($ctx1) {
  1216. return self.getMilliseconds();
  1217. return self}, function($ctx1) {$ctx1.fill(self,"milliseconds",{},smalltalk.Date)})},
  1218. messageSends: []}),
  1219. smalltalk.Date);
  1220. smalltalk.addMethod(
  1221. smalltalk.method({
  1222. selector: "milliseconds:",
  1223. fn: function (aNumber){
  1224. var self=this;
  1225. return smalltalk.withContext(function($ctx1) {
  1226. self.setMilliseconds(aNumber);
  1227. return self}, function($ctx1) {$ctx1.fill(self,"milliseconds:",{aNumber:aNumber},smalltalk.Date)})},
  1228. messageSends: []}),
  1229. smalltalk.Date);
  1230. smalltalk.addMethod(
  1231. smalltalk.method({
  1232. selector: "minutes",
  1233. fn: function (){
  1234. var self=this;
  1235. return smalltalk.withContext(function($ctx1) {
  1236. return self.getMinutes();
  1237. return self}, function($ctx1) {$ctx1.fill(self,"minutes",{},smalltalk.Date)})},
  1238. messageSends: []}),
  1239. smalltalk.Date);
  1240. smalltalk.addMethod(
  1241. smalltalk.method({
  1242. selector: "minutes:",
  1243. fn: function (aNumber){
  1244. var self=this;
  1245. return smalltalk.withContext(function($ctx1) {
  1246. self.setMinutes(aNumber);
  1247. return self}, function($ctx1) {$ctx1.fill(self,"minutes:",{aNumber:aNumber},smalltalk.Date)})},
  1248. messageSends: []}),
  1249. smalltalk.Date);
  1250. smalltalk.addMethod(
  1251. smalltalk.method({
  1252. selector: "month",
  1253. fn: function (){
  1254. var self=this;
  1255. return smalltalk.withContext(function($ctx1) {
  1256. return self.getMonth() + 1;
  1257. return self}, function($ctx1) {$ctx1.fill(self,"month",{},smalltalk.Date)})},
  1258. messageSends: []}),
  1259. smalltalk.Date);
  1260. smalltalk.addMethod(
  1261. smalltalk.method({
  1262. selector: "month:",
  1263. fn: function (aNumber){
  1264. var self=this;
  1265. return smalltalk.withContext(function($ctx1) {
  1266. self.setMonth(aNumber - 1);
  1267. return self}, function($ctx1) {$ctx1.fill(self,"month:",{aNumber:aNumber},smalltalk.Date)})},
  1268. messageSends: []}),
  1269. smalltalk.Date);
  1270. smalltalk.addMethod(
  1271. smalltalk.method({
  1272. selector: "printOn:",
  1273. fn: function (aStream){
  1274. var self=this;
  1275. return smalltalk.withContext(function($ctx1) {
  1276. _st(aStream)._nextPutAll_(self._asString());
  1277. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Date)})},
  1278. messageSends: ["nextPutAll:", "asString"]}),
  1279. smalltalk.Date);
  1280. smalltalk.addMethod(
  1281. smalltalk.method({
  1282. selector: "seconds",
  1283. fn: function (){
  1284. var self=this;
  1285. return smalltalk.withContext(function($ctx1) {
  1286. return self.getSeconds();
  1287. return self}, function($ctx1) {$ctx1.fill(self,"seconds",{},smalltalk.Date)})},
  1288. messageSends: []}),
  1289. smalltalk.Date);
  1290. smalltalk.addMethod(
  1291. smalltalk.method({
  1292. selector: "seconds:",
  1293. fn: function (aNumber){
  1294. var self=this;
  1295. return smalltalk.withContext(function($ctx1) {
  1296. self.setSeconds(aNumber);
  1297. return self}, function($ctx1) {$ctx1.fill(self,"seconds:",{aNumber:aNumber},smalltalk.Date)})},
  1298. messageSends: []}),
  1299. smalltalk.Date);
  1300. smalltalk.addMethod(
  1301. smalltalk.method({
  1302. selector: "time",
  1303. fn: function (){
  1304. var self=this;
  1305. return smalltalk.withContext(function($ctx1) {
  1306. return self.getTime();
  1307. return self}, function($ctx1) {$ctx1.fill(self,"time",{},smalltalk.Date)})},
  1308. messageSends: []}),
  1309. smalltalk.Date);
  1310. smalltalk.addMethod(
  1311. smalltalk.method({
  1312. selector: "time:",
  1313. fn: function (aNumber){
  1314. var self=this;
  1315. return smalltalk.withContext(function($ctx1) {
  1316. self.setTime(aNumber);
  1317. return self}, function($ctx1) {$ctx1.fill(self,"time:",{aNumber:aNumber},smalltalk.Date)})},
  1318. messageSends: []}),
  1319. smalltalk.Date);
  1320. smalltalk.addMethod(
  1321. smalltalk.method({
  1322. selector: "year",
  1323. fn: function (){
  1324. var self=this;
  1325. return smalltalk.withContext(function($ctx1) {
  1326. return self.getFullYear();
  1327. return self}, function($ctx1) {$ctx1.fill(self,"year",{},smalltalk.Date)})},
  1328. messageSends: []}),
  1329. smalltalk.Date);
  1330. smalltalk.addMethod(
  1331. smalltalk.method({
  1332. selector: "year:",
  1333. fn: function (aNumber){
  1334. var self=this;
  1335. return smalltalk.withContext(function($ctx1) {
  1336. self.setFullYear(aNumber);
  1337. return self}, function($ctx1) {$ctx1.fill(self,"year:",{aNumber:aNumber},smalltalk.Date)})},
  1338. messageSends: []}),
  1339. smalltalk.Date);
  1340. smalltalk.addMethod(
  1341. smalltalk.method({
  1342. selector: "fromMilliseconds:",
  1343. fn: function (aNumber){
  1344. var self=this;
  1345. return smalltalk.withContext(function($ctx1) {
  1346. var $1;
  1347. $1=self._new_(aNumber);
  1348. return $1;
  1349. }, function($ctx1) {$ctx1.fill(self,"fromMilliseconds:",{aNumber:aNumber},smalltalk.Date.klass)})},
  1350. messageSends: ["new:"]}),
  1351. smalltalk.Date.klass);
  1352. smalltalk.addMethod(
  1353. smalltalk.method({
  1354. selector: "fromSeconds:",
  1355. fn: function (aNumber){
  1356. var self=this;
  1357. return smalltalk.withContext(function($ctx1) {
  1358. var $1;
  1359. $1=self._fromMilliseconds_(_st(aNumber).__star((1000)));
  1360. return $1;
  1361. }, function($ctx1) {$ctx1.fill(self,"fromSeconds:",{aNumber:aNumber},smalltalk.Date.klass)})},
  1362. messageSends: ["fromMilliseconds:", "*"]}),
  1363. smalltalk.Date.klass);
  1364. smalltalk.addMethod(
  1365. smalltalk.method({
  1366. selector: "fromString:",
  1367. fn: function (aString){
  1368. var self=this;
  1369. return smalltalk.withContext(function($ctx1) {
  1370. var $1;
  1371. $1=self._new_(aString);
  1372. return $1;
  1373. }, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString},smalltalk.Date.klass)})},
  1374. messageSends: ["new:"]}),
  1375. smalltalk.Date.klass);
  1376. smalltalk.addMethod(
  1377. smalltalk.method({
  1378. selector: "heliosClass",
  1379. fn: function (){
  1380. var self=this;
  1381. return smalltalk.withContext(function($ctx1) {
  1382. return "magnitude";
  1383. }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Date.klass)})},
  1384. messageSends: []}),
  1385. smalltalk.Date.klass);
  1386. smalltalk.addMethod(
  1387. smalltalk.method({
  1388. selector: "millisecondsToRun:",
  1389. fn: function (aBlock){
  1390. var self=this;
  1391. var t;
  1392. function $Date(){return smalltalk.Date||(typeof Date=="undefined"?nil:Date)}
  1393. return smalltalk.withContext(function($ctx1) {
  1394. var $1;
  1395. t=_st($Date())._now();
  1396. _st(aBlock)._value();
  1397. $1=_st(_st($Date())._now()).__minus(t);
  1398. return $1;
  1399. }, function($ctx1) {$ctx1.fill(self,"millisecondsToRun:",{aBlock:aBlock,t:t},smalltalk.Date.klass)})},
  1400. messageSends: ["now", "value", "-"]}),
  1401. smalltalk.Date.klass);
  1402. smalltalk.addMethod(
  1403. smalltalk.method({
  1404. selector: "new:",
  1405. fn: function (anObject){
  1406. var self=this;
  1407. return smalltalk.withContext(function($ctx1) {
  1408. return new Date(anObject);
  1409. return self}, function($ctx1) {$ctx1.fill(self,"new:",{anObject:anObject},smalltalk.Date.klass)})},
  1410. messageSends: []}),
  1411. smalltalk.Date.klass);
  1412. smalltalk.addMethod(
  1413. smalltalk.method({
  1414. selector: "now",
  1415. fn: function (){
  1416. var self=this;
  1417. return smalltalk.withContext(function($ctx1) {
  1418. var $1;
  1419. $1=self._today();
  1420. return $1;
  1421. }, function($ctx1) {$ctx1.fill(self,"now",{},smalltalk.Date.klass)})},
  1422. messageSends: ["today"]}),
  1423. smalltalk.Date.klass);
  1424. smalltalk.addMethod(
  1425. smalltalk.method({
  1426. selector: "today",
  1427. fn: function (){
  1428. var self=this;
  1429. return smalltalk.withContext(function($ctx1) {
  1430. var $1;
  1431. $1=self._new();
  1432. return $1;
  1433. }, function($ctx1) {$ctx1.fill(self,"today",{},smalltalk.Date.klass)})},
  1434. messageSends: ["new"]}),
  1435. smalltalk.Date.klass);
  1436. smalltalk.addClass('InspectorHandler', smalltalk.Object, [], 'Kernel-Objects');
  1437. smalltalk.InspectorHandler.klass.iVarNames = ['inspector'];
  1438. smalltalk.addMethod(
  1439. smalltalk.method({
  1440. selector: "inspect:",
  1441. fn: function (anObject){
  1442. var self=this;
  1443. return smalltalk.withContext(function($ctx1) {
  1444. var $1;
  1445. $1=_st(self._inspector())._inspect_(anObject);
  1446. return $1;
  1447. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.InspectorHandler.klass)})},
  1448. messageSends: ["inspect:", "inspector"]}),
  1449. smalltalk.InspectorHandler.klass);
  1450. smalltalk.addMethod(
  1451. smalltalk.method({
  1452. selector: "inspector",
  1453. fn: function (){
  1454. var self=this;
  1455. function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
  1456. return smalltalk.withContext(function($ctx1) {
  1457. var $2,$1;
  1458. $2=self["@inspector"];
  1459. if(($receiver = $2) == nil || $receiver == undefined){
  1460. self["@inspector"]=$Transcript();
  1461. $1=self["@inspector"];
  1462. } else {
  1463. $1=$2;
  1464. };
  1465. return $1;
  1466. }, function($ctx1) {$ctx1.fill(self,"inspector",{},smalltalk.InspectorHandler.klass)})},
  1467. messageSends: ["ifNil:"]}),
  1468. smalltalk.InspectorHandler.klass);
  1469. smalltalk.addMethod(
  1470. smalltalk.method({
  1471. selector: "register:",
  1472. fn: function (anInspector){
  1473. var self=this;
  1474. return smalltalk.withContext(function($ctx1) {
  1475. self["@inspector"]=anInspector;
  1476. return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.InspectorHandler.klass)})},
  1477. messageSends: []}),
  1478. smalltalk.InspectorHandler.klass);
  1479. smalltalk.addClass('InterfacingObject', smalltalk.Object, [], 'Kernel-Objects');
  1480. smalltalk.addMethod(
  1481. smalltalk.method({
  1482. selector: "ajax:",
  1483. fn: function (anObject){
  1484. var self=this;
  1485. function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
  1486. return smalltalk.withContext(function($ctx1) {
  1487. var $1;
  1488. $1=_st($PlatformInterface())._ajax_(anObject);
  1489. return $1;
  1490. }, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},smalltalk.InterfacingObject)})},
  1491. messageSends: ["ajax:"]}),
  1492. smalltalk.InterfacingObject);
  1493. smalltalk.addMethod(
  1494. smalltalk.method({
  1495. selector: "alert:",
  1496. fn: function (aString){
  1497. var self=this;
  1498. function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
  1499. return smalltalk.withContext(function($ctx1) {
  1500. var $1;
  1501. $1=_st($PlatformInterface())._alert_(aString);
  1502. return $1;
  1503. }, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.InterfacingObject)})},
  1504. messageSends: ["alert:"]}),
  1505. smalltalk.InterfacingObject);
  1506. smalltalk.addMethod(
  1507. smalltalk.method({
  1508. selector: "confirm:",
  1509. fn: function (aString){
  1510. var self=this;
  1511. function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
  1512. return smalltalk.withContext(function($ctx1) {
  1513. var $1;
  1514. $1=_st($PlatformInterface())._confirm_(aString);
  1515. return $1;
  1516. }, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},smalltalk.InterfacingObject)})},
  1517. messageSends: ["confirm:"]}),
  1518. smalltalk.InterfacingObject);
  1519. smalltalk.addMethod(
  1520. smalltalk.method({
  1521. selector: "prompt:",
  1522. fn: function (aString){
  1523. var self=this;
  1524. function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
  1525. return smalltalk.withContext(function($ctx1) {
  1526. var $1;
  1527. $1=_st($PlatformInterface())._prompt_(aString);
  1528. return $1;
  1529. }, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},smalltalk.InterfacingObject)})},
  1530. messageSends: ["prompt:"]}),
  1531. smalltalk.InterfacingObject);
  1532. smalltalk.addClass('Environment', smalltalk.InterfacingObject, [], 'Kernel-Objects');
  1533. smalltalk.addMethod(
  1534. smalltalk.method({
  1535. selector: "addInstVarNamed:to:",
  1536. fn: function (aString,aClass){
  1537. var self=this;
  1538. return smalltalk.withContext(function($ctx1) {
  1539. var $1,$2;
  1540. $1=_st(_st(aClass)._instanceVariableNames())._copy();
  1541. _st($1)._add_(aString);
  1542. $2=_st($1)._yourself();
  1543. _st(self._classBuilder())._addSubclassOf_named_instanceVariableNames_package_(_st(aClass)._superclass(),_st(aClass)._name(),$2,_st(_st(aClass)._package())._name());
  1544. return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:to:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
  1545. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package", "classBuilder"]}),
  1546. smalltalk.Environment);
  1547. smalltalk.addMethod(
  1548. smalltalk.method({
  1549. selector: "allSelectors",
  1550. fn: function (){
  1551. var self=this;
  1552. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1553. return smalltalk.withContext(function($ctx1) {
  1554. var $1;
  1555. $1=_st(_st(_st($Smalltalk())._current())._at_("allSelectors"))._value();
  1556. return $1;
  1557. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.Environment)})},
  1558. messageSends: ["value", "at:", "current"]}),
  1559. smalltalk.Environment);
  1560. smalltalk.addMethod(
  1561. smalltalk.method({
  1562. selector: "availableClassNames",
  1563. fn: function (){
  1564. var self=this;
  1565. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1566. return smalltalk.withContext(function($ctx1) {
  1567. var $1;
  1568. $1=_st(_st(_st($Smalltalk())._current())._classes())._collect_((function(each){
  1569. return smalltalk.withContext(function($ctx2) {
  1570. return _st(each)._name();
  1571. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1572. return $1;
  1573. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},smalltalk.Environment)})},
  1574. messageSends: ["collect:", "name", "classes", "current"]}),
  1575. smalltalk.Environment);
  1576. smalltalk.addMethod(
  1577. smalltalk.method({
  1578. selector: "availablePackageNames",
  1579. fn: function (){
  1580. var self=this;
  1581. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1582. return smalltalk.withContext(function($ctx1) {
  1583. var $1;
  1584. $1=_st(_st(_st($Smalltalk())._current())._packages())._collect_((function(each){
  1585. return smalltalk.withContext(function($ctx2) {
  1586. return _st(each)._name();
  1587. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1588. return $1;
  1589. }, function($ctx1) {$ctx1.fill(self,"availablePackageNames",{},smalltalk.Environment)})},
  1590. messageSends: ["collect:", "name", "packages", "current"]}),
  1591. smalltalk.Environment);
  1592. smalltalk.addMethod(
  1593. smalltalk.method({
  1594. selector: "availableProtocolsFor:",
  1595. fn: function (aClass){
  1596. var self=this;
  1597. var protocols;
  1598. return smalltalk.withContext(function($ctx1) {
  1599. var $1,$2;
  1600. protocols=_st(aClass)._protocols();
  1601. $1=_st(aClass)._superclass();
  1602. if(($receiver = $1) == nil || $receiver == undefined){
  1603. $1;
  1604. } else {
  1605. _st(protocols)._addAll_(self._availableProtocolsFor_(_st(aClass)._superclass()));
  1606. };
  1607. $2=_st(_st(protocols)._asSet())._asArray();
  1608. return $2;
  1609. }, function($ctx1) {$ctx1.fill(self,"availableProtocolsFor:",{aClass:aClass,protocols:protocols},smalltalk.Environment)})},
  1610. messageSends: ["protocols", "ifNotNil:", "addAll:", "availableProtocolsFor:", "superclass", "asArray", "asSet"]}),
  1611. smalltalk.Environment);
  1612. smalltalk.addMethod(
  1613. smalltalk.method({
  1614. selector: "classBuilder",
  1615. fn: function (){
  1616. var self=this;
  1617. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1618. return smalltalk.withContext(function($ctx1) {
  1619. var $1;
  1620. $1=_st($ClassBuilder())._new();
  1621. return $1;
  1622. }, function($ctx1) {$ctx1.fill(self,"classBuilder",{},smalltalk.Environment)})},
  1623. messageSends: ["new"]}),
  1624. smalltalk.Environment);
  1625. smalltalk.addMethod(
  1626. smalltalk.method({
  1627. selector: "classNamed:",
  1628. fn: function (aString){
  1629. var self=this;
  1630. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1631. return smalltalk.withContext(function($ctx1) {
  1632. var $2,$1;
  1633. $2=_st(_st($Smalltalk())._current())._at_(_st(aString)._asSymbol());
  1634. if(($receiver = $2) == nil || $receiver == undefined){
  1635. $1=self._error_("Invalid class name");
  1636. } else {
  1637. $1=$2;
  1638. };
  1639. return $1;
  1640. }, function($ctx1) {$ctx1.fill(self,"classNamed:",{aString:aString},smalltalk.Environment)})},
  1641. messageSends: ["ifNil:", "error:", "at:", "asSymbol", "current"]}),
  1642. smalltalk.Environment);
  1643. smalltalk.addMethod(
  1644. smalltalk.method({
  1645. selector: "classes",
  1646. fn: function (){
  1647. var self=this;
  1648. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1649. return smalltalk.withContext(function($ctx1) {
  1650. var $1;
  1651. $1=_st(_st($Smalltalk())._current())._classes();
  1652. return $1;
  1653. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Environment)})},
  1654. messageSends: ["classes", "current"]}),
  1655. smalltalk.Environment);
  1656. smalltalk.addMethod(
  1657. smalltalk.method({
  1658. selector: "commitPackage:",
  1659. fn: function (aPackage){
  1660. var self=this;
  1661. return smalltalk.withContext(function($ctx1) {
  1662. _st(aPackage)._commit();
  1663. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage:",{aPackage:aPackage},smalltalk.Environment)})},
  1664. messageSends: ["commit"]}),
  1665. smalltalk.Environment);
  1666. smalltalk.addMethod(
  1667. smalltalk.method({
  1668. selector: "compileClassComment:for:",
  1669. fn: function (aString,aClass){
  1670. var self=this;
  1671. return smalltalk.withContext(function($ctx1) {
  1672. _st(aClass)._comment_(aString);
  1673. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:for:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
  1674. messageSends: ["comment:"]}),
  1675. smalltalk.Environment);
  1676. smalltalk.addMethod(
  1677. smalltalk.method({
  1678. selector: "compileClassDefinition:",
  1679. fn: function (aString){
  1680. var self=this;
  1681. function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  1682. return smalltalk.withContext(function($ctx1) {
  1683. self._eval_on_(aString,_st($DoIt())._new());
  1684. return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},smalltalk.Environment)})},
  1685. messageSends: ["eval:on:", "new"]}),
  1686. smalltalk.Environment);
  1687. smalltalk.addMethod(
  1688. smalltalk.method({
  1689. selector: "compileMethod:for:protocol:",
  1690. fn: function (sourceCode,class_,protocol){
  1691. var self=this;
  1692. return smalltalk.withContext(function($ctx1) {
  1693. var $1;
  1694. $1=_st(class_)._compile_category_(sourceCode,protocol);
  1695. return $1;
  1696. }, function($ctx1) {$ctx1.fill(self,"compileMethod:for:protocol:",{sourceCode:sourceCode,class_:class_,protocol:protocol},smalltalk.Environment)})},
  1697. messageSends: ["compile:category:"]}),
  1698. smalltalk.Environment);
  1699. smalltalk.addMethod(
  1700. smalltalk.method({
  1701. selector: "copyClass:to:",
  1702. fn: function (aClass,aClassName){
  1703. var self=this;
  1704. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1705. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1706. return smalltalk.withContext(function($ctx1) {
  1707. var $1;
  1708. $1=_st(_st($Smalltalk())._current())._at_(aClassName);
  1709. if(($receiver = $1) == nil || $receiver == undefined){
  1710. $1;
  1711. } else {
  1712. self._error_(_st("A class named ".__comma(aClassName)).__comma(" already exists"));
  1713. };
  1714. _st(_st($ClassBuilder())._new())._copyClass_named_(aClass,aClassName);
  1715. return self}, function($ctx1) {$ctx1.fill(self,"copyClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.Environment)})},
  1716. messageSends: ["ifNotNil:", "error:", ",", "at:", "current", "copyClass:named:", "new"]}),
  1717. smalltalk.Environment);
  1718. smalltalk.addMethod(
  1719. smalltalk.method({
  1720. selector: "eval:on:",
  1721. fn: function (aString,aReceiver){
  1722. var self=this;
  1723. var compiler;
  1724. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  1725. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  1726. return smalltalk.withContext(function($ctx1) {
  1727. var $1,$2;
  1728. var $early={};
  1729. try {
  1730. compiler=_st($Compiler())._new();
  1731. _st((function(){
  1732. return smalltalk.withContext(function($ctx2) {
  1733. return _st(compiler)._parseExpression_(aString);
  1734. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($Error(),(function(ex){
  1735. return smalltalk.withContext(function($ctx2) {
  1736. $1=self._alert_(_st(ex)._messageText());
  1737. throw $early=[$1];
  1738. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  1739. $2=_st(compiler)._evaluateExpression_on_(aString,aReceiver);
  1740. return $2;
  1741. }
  1742. catch(e) {if(e===$early)return e[0]; throw e}
  1743. }, function($ctx1) {$ctx1.fill(self,"eval:on:",{aString:aString,aReceiver:aReceiver,compiler:compiler},smalltalk.Environment)})},
  1744. messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "evaluateExpression:on:"]}),
  1745. smalltalk.Environment);
  1746. smalltalk.addMethod(
  1747. smalltalk.method({
  1748. selector: "evaluate:on:do:",
  1749. fn: function (aBlock,anErrorClass,exceptionBlock){
  1750. var self=this;
  1751. return smalltalk.withContext(function($ctx1) {
  1752. var $1;
  1753. self._try_catch_(aBlock,(function(exception){
  1754. return smalltalk.withContext(function($ctx2) {
  1755. $1=_st(exception)._isKindOf_(self._classNamed_(_st(anErrorClass)._name()));
  1756. if(smalltalk.assert($1)){
  1757. return _st(exceptionBlock)._value_(exception);
  1758. } else {
  1759. return _st(exception)._signal();
  1760. };
  1761. }, function($ctx2) {$ctx2.fillBlock({exception:exception},$ctx1)})}));
  1762. return self}, function($ctx1) {$ctx1.fill(self,"evaluate:on:do:",{aBlock:aBlock,anErrorClass:anErrorClass,exceptionBlock:exceptionBlock},smalltalk.Environment)})},
  1763. messageSends: ["try:catch:", "ifTrue:ifFalse:", "value:", "signal", "isKindOf:", "classNamed:", "name"]}),
  1764. smalltalk.Environment);
  1765. smalltalk.addMethod(
  1766. smalltalk.method({
  1767. selector: "inspect:",
  1768. fn: function (anObject){
  1769. var self=this;
  1770. function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
  1771. return smalltalk.withContext(function($ctx1) {
  1772. _st(_st($InspectorHandler())._inspector())._inspect_(anObject);
  1773. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Environment)})},
  1774. messageSends: ["inspect:", "inspector"]}),
  1775. smalltalk.Environment);
  1776. smalltalk.addMethod(
  1777. smalltalk.method({
  1778. selector: "moveClass:toPackage:",
  1779. fn: function (aClass,aPackageName){
  1780. var self=this;
  1781. var package_;
  1782. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  1783. return smalltalk.withContext(function($ctx1) {
  1784. var $1,$2,$3;
  1785. package_=_st($Package())._named_(aPackageName);
  1786. $1=package_;
  1787. if(($receiver = $1) == nil || $receiver == undefined){
  1788. self._error_("Invalid package name");
  1789. } else {
  1790. $1;
  1791. };
  1792. $2=_st(package_).__eq_eq(_st(aClass)._package());
  1793. if(smalltalk.assert($2)){
  1794. $3=self;
  1795. return $3;
  1796. };
  1797. _st(aClass)._package_(package_);
  1798. return self}, function($ctx1) {$ctx1.fill(self,"moveClass:toPackage:",{aClass:aClass,aPackageName:aPackageName,package_:package_},smalltalk.Environment)})},
  1799. messageSends: ["named:", "ifNil:", "error:", "ifTrue:", "==", "package", "package:"]}),
  1800. smalltalk.Environment);
  1801. smalltalk.addMethod(
  1802. smalltalk.method({
  1803. selector: "moveMethod:toClass:",
  1804. fn: function (aMethod,aClassName){
  1805. var self=this;
  1806. var destinationClass;
  1807. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1808. return smalltalk.withContext(function($ctx1) {
  1809. var $1,$2,$3;
  1810. destinationClass=_st(_st($Smalltalk())._current())._at_(_st(aClassName)._asSymbol());
  1811. $1=destinationClass;
  1812. if(($receiver = $1) == nil || $receiver == undefined){
  1813. self._error_("Invalid class name");
  1814. } else {
  1815. $1;
  1816. };
  1817. $2=_st(destinationClass).__eq_eq(_st(aMethod)._methodClass());
  1818. if(smalltalk.assert($2)){
  1819. $3=self;
  1820. return $3;
  1821. };
  1822. _st(destinationClass)._compile_category_(_st(aMethod)._source(),_st(aMethod)._protocol());
  1823. _st(_st(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
  1824. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName,destinationClass:destinationClass},smalltalk.Environment)})},
  1825. messageSends: ["at:", "asSymbol", "current", "ifNil:", "error:", "ifTrue:", "==", "methodClass", "compile:category:", "source", "protocol", "removeCompiledMethod:"]}),
  1826. smalltalk.Environment);
  1827. smalltalk.addMethod(
  1828. smalltalk.method({
  1829. selector: "moveMethod:toProtocol:",
  1830. fn: function (aMethod,aProtocol){
  1831. var self=this;
  1832. return smalltalk.withContext(function($ctx1) {
  1833. _st(aMethod)._category_(aProtocol);
  1834. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toProtocol:",{aMethod:aMethod,aProtocol:aProtocol},smalltalk.Environment)})},
  1835. messageSends: ["category:"]}),
  1836. smalltalk.Environment);
  1837. smalltalk.addMethod(
  1838. smalltalk.method({
  1839. selector: "packages",
  1840. fn: function (){
  1841. var self=this;
  1842. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1843. return smalltalk.withContext(function($ctx1) {
  1844. var $1;
  1845. $1=_st(_st($Smalltalk())._current())._packages();
  1846. return $1;
  1847. }, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.Environment)})},
  1848. messageSends: ["packages", "current"]}),
  1849. smalltalk.Environment);
  1850. smalltalk.addMethod(
  1851. smalltalk.method({
  1852. selector: "registerErrorHandler:",
  1853. fn: function (anErrorHandler){
  1854. var self=this;
  1855. function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  1856. return smalltalk.withContext(function($ctx1) {
  1857. _st($ErrorHandler())._setCurrent_(anErrorHandler);
  1858. return self}, function($ctx1) {$ctx1.fill(self,"registerErrorHandler:",{anErrorHandler:anErrorHandler},smalltalk.Environment)})},
  1859. messageSends: ["setCurrent:"]}),
  1860. smalltalk.Environment);
  1861. smalltalk.addMethod(
  1862. smalltalk.method({
  1863. selector: "registerInspector:",
  1864. fn: function (anInspector){
  1865. var self=this;
  1866. function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
  1867. return smalltalk.withContext(function($ctx1) {
  1868. _st($InspectorHandler())._register_(anInspector);
  1869. return self}, function($ctx1) {$ctx1.fill(self,"registerInspector:",{anInspector:anInspector},smalltalk.Environment)})},
  1870. messageSends: ["register:"]}),
  1871. smalltalk.Environment);
  1872. smalltalk.addMethod(
  1873. smalltalk.method({
  1874. selector: "registerProgressHandler:",
  1875. fn: function (aProgressHandler){
  1876. var self=this;
  1877. function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
  1878. return smalltalk.withContext(function($ctx1) {
  1879. _st($ProgressHandler())._setCurrent_(aProgressHandler);
  1880. return self}, function($ctx1) {$ctx1.fill(self,"registerProgressHandler:",{aProgressHandler:aProgressHandler},smalltalk.Environment)})},
  1881. messageSends: ["setCurrent:"]}),
  1882. smalltalk.Environment);
  1883. smalltalk.addMethod(
  1884. smalltalk.method({
  1885. selector: "removeClass:",
  1886. fn: function (aClass){
  1887. var self=this;
  1888. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1889. return smalltalk.withContext(function($ctx1) {
  1890. _st(_st($Smalltalk())._current())._removeClass_(aClass);
  1891. return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.Environment)})},
  1892. messageSends: ["removeClass:", "current"]}),
  1893. smalltalk.Environment);
  1894. smalltalk.addMethod(
  1895. smalltalk.method({
  1896. selector: "removeMethod:",
  1897. fn: function (aMethod){
  1898. var self=this;
  1899. return smalltalk.withContext(function($ctx1) {
  1900. _st(_st(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
  1901. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod:",{aMethod:aMethod},smalltalk.Environment)})},
  1902. messageSends: ["removeCompiledMethod:", "methodClass"]}),
  1903. smalltalk.Environment);
  1904. smalltalk.addMethod(
  1905. smalltalk.method({
  1906. selector: "removeProtocol:from:",
  1907. fn: function (aString,aClass){
  1908. var self=this;
  1909. return smalltalk.withContext(function($ctx1) {
  1910. _st(_st(_st(aClass)._methods())._select_((function(each){
  1911. return smalltalk.withContext(function($ctx2) {
  1912. return _st(_st(each)._protocol()).__eq(aString);
  1913. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
  1914. return smalltalk.withContext(function($ctx2) {
  1915. return _st(aClass)._removeCompiledMethod_(each);
  1916. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1917. return self}, function($ctx1) {$ctx1.fill(self,"removeProtocol:from:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
  1918. messageSends: ["do:", "removeCompiledMethod:", "select:", "=", "protocol", "methods"]}),
  1919. smalltalk.Environment);
  1920. smalltalk.addMethod(
  1921. smalltalk.method({
  1922. selector: "renameClass:to:",
  1923. fn: function (aClass,aClassName){
  1924. var self=this;
  1925. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1926. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1927. return smalltalk.withContext(function($ctx1) {
  1928. var $1;
  1929. $1=_st(_st($Smalltalk())._current())._at_(aClassName);
  1930. if(($receiver = $1) == nil || $receiver == undefined){
  1931. $1;
  1932. } else {
  1933. self._error_(_st("A class named ".__comma(aClassName)).__comma(" already exists"));
  1934. };
  1935. _st(_st($ClassBuilder())._new())._renameClass_to_(aClass,aClassName);
  1936. return self}, function($ctx1) {$ctx1.fill(self,"renameClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.Environment)})},
  1937. messageSends: ["ifNotNil:", "error:", ",", "at:", "current", "renameClass:to:", "new"]}),
  1938. smalltalk.Environment);
  1939. smalltalk.addMethod(
  1940. smalltalk.method({
  1941. selector: "renameProtocol:to:in:",
  1942. fn: function (aString,anotherString,aClass){
  1943. var self=this;
  1944. return smalltalk.withContext(function($ctx1) {
  1945. _st(_st(_st(aClass)._methods())._select_((function(each){
  1946. return smalltalk.withContext(function($ctx2) {
  1947. return _st(_st(each)._protocol()).__eq(aString);
  1948. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
  1949. return smalltalk.withContext(function($ctx2) {
  1950. return _st(each)._protocol_(anotherString);
  1951. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1952. return self}, function($ctx1) {$ctx1.fill(self,"renameProtocol:to:in:",{aString:aString,anotherString:anotherString,aClass:aClass},smalltalk.Environment)})},
  1953. messageSends: ["do:", "protocol:", "select:", "=", "protocol", "methods"]}),
  1954. smalltalk.Environment);
  1955. smalltalk.addMethod(
  1956. smalltalk.method({
  1957. selector: "setClassCommentOf:to:",
  1958. fn: function (aClass,aString){
  1959. var self=this;
  1960. return smalltalk.withContext(function($ctx1) {
  1961. _st(aClass)._comment_(aString);
  1962. return self}, function($ctx1) {$ctx1.fill(self,"setClassCommentOf:to:",{aClass:aClass,aString:aString},smalltalk.Environment)})},
  1963. messageSends: ["comment:"]}),
  1964. smalltalk.Environment);
  1965. smalltalk.addMethod(
  1966. smalltalk.method({
  1967. selector: "systemAnnouncer",
  1968. fn: function (){
  1969. var self=this;
  1970. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1971. return smalltalk.withContext(function($ctx1) {
  1972. var $1;
  1973. $1=_st(_st(_st($Smalltalk())._current())._at_("SystemAnnouncer"))._current();
  1974. return $1;
  1975. }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},smalltalk.Environment)})},
  1976. messageSends: ["current", "at:"]}),
  1977. smalltalk.Environment);
  1978. smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Objects');
  1979. smalltalk.addMethod(
  1980. smalltalk.method({
  1981. selector: "addObjectVariablesTo:",
  1982. fn: function (aDictionary){
  1983. var self=this;
  1984. return smalltalk.withContext(function($ctx1) {
  1985. for(var i in self['@jsObject']) {
  1986. aDictionary._at_put_(i, self['@jsObject'][i]);
  1987. }
  1988. ;
  1989. return self}, function($ctx1) {$ctx1.fill(self,"addObjectVariablesTo:",{aDictionary:aDictionary},smalltalk.JSObjectProxy)})},
  1990. messageSends: []}),
  1991. smalltalk.JSObjectProxy);
  1992. smalltalk.addMethod(
  1993. smalltalk.method({
  1994. selector: "at:",
  1995. fn: function (aString){
  1996. var self=this;
  1997. return smalltalk.withContext(function($ctx1) {
  1998. return self['@jsObject'][aString];
  1999. return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.JSObjectProxy)})},
  2000. messageSends: []}),
  2001. smalltalk.JSObjectProxy);
  2002. smalltalk.addMethod(
  2003. smalltalk.method({
  2004. selector: "at:ifAbsent:",
  2005. fn: function (aString,aBlock){
  2006. var self=this;
  2007. return smalltalk.withContext(function($ctx1) {
  2008. var obj = self['@jsObject'];
  2009. return aString in obj ? obj[aString] : aBlock._value();
  2010. ;
  2011. return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
  2012. messageSends: []}),
  2013. smalltalk.JSObjectProxy);
  2014. smalltalk.addMethod(
  2015. smalltalk.method({
  2016. selector: "at:ifPresent:",
  2017. fn: function (aString,aBlock){
  2018. var self=this;
  2019. return smalltalk.withContext(function($ctx1) {
  2020. var obj = self['@jsObject'];
  2021. return aString in obj ? aBlock._value_(obj[aString]) : nil;
  2022. ;
  2023. return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
  2024. messageSends: []}),
  2025. smalltalk.JSObjectProxy);
  2026. smalltalk.addMethod(
  2027. smalltalk.method({
  2028. selector: "at:ifPresent:ifAbsent:",
  2029. fn: function (aString,aBlock,anotherBlock){
  2030. var self=this;
  2031. return smalltalk.withContext(function($ctx1) {
  2032. var obj = self['@jsObject'];
  2033. return aString in obj ? aBlock._value_(obj[aString]) : anotherBlock._value();
  2034. ;
  2035. return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.JSObjectProxy)})},
  2036. messageSends: []}),
  2037. smalltalk.JSObjectProxy);
  2038. smalltalk.addMethod(
  2039. smalltalk.method({
  2040. selector: "at:put:",
  2041. fn: function (aString,anObject){
  2042. var self=this;
  2043. return smalltalk.withContext(function($ctx1) {
  2044. self['@jsObject'][aString] = anObject;
  2045. return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{aString:aString,anObject:anObject},smalltalk.JSObjectProxy)})},
  2046. messageSends: []}),
  2047. smalltalk.JSObjectProxy);
  2048. smalltalk.addMethod(
  2049. smalltalk.method({
  2050. selector: "doesNotUnderstand:",
  2051. fn: function (aMessage){
  2052. var self=this;
  2053. return smalltalk.withContext(function($ctx1) {
  2054. var $2,$1;
  2055. $2=self._lookupProperty_(_st(_st(aMessage)._selector())._asJavaScriptSelector());
  2056. if(($receiver = $2) == nil || $receiver == undefined){
  2057. $1=smalltalk.Object.fn.prototype._doesNotUnderstand_.apply(_st(self), [aMessage]);
  2058. } else {
  2059. var jsSelector;
  2060. jsSelector=$receiver;
  2061. $1=self._forwardMessage_withArguments_(jsSelector,_st(aMessage)._arguments());
  2062. };
  2063. return $1;
  2064. }, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage},smalltalk.JSObjectProxy)})},
  2065. messageSends: ["ifNil:ifNotNil:", "doesNotUnderstand:", "forwardMessage:withArguments:", "arguments", "lookupProperty:", "asJavaScriptSelector", "selector"]}),
  2066. smalltalk.JSObjectProxy);
  2067. smalltalk.addMethod(
  2068. smalltalk.method({
  2069. selector: "forwardMessage:withArguments:",
  2070. fn: function (aString,anArray){
  2071. var self=this;
  2072. return smalltalk.withContext(function($ctx1) {
  2073. return smalltalk.send(self._jsObject(), aString, anArray);
  2074. ;
  2075. return self}, function($ctx1) {$ctx1.fill(self,"forwardMessage:withArguments:",{aString:aString,anArray:anArray},smalltalk.JSObjectProxy)})},
  2076. messageSends: []}),
  2077. smalltalk.JSObjectProxy);
  2078. smalltalk.addMethod(
  2079. smalltalk.method({
  2080. selector: "inspectOn:",
  2081. fn: function (anInspector){
  2082. var self=this;
  2083. var variables;
  2084. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  2085. return smalltalk.withContext(function($ctx1) {
  2086. variables=_st($Dictionary())._new();
  2087. _st(variables)._at_put_("#self",self._jsObject());
  2088. _st(anInspector)._setLabel_(self._printString());
  2089. self._addObjectVariablesTo_(variables);
  2090. _st(anInspector)._setVariables_(variables);
  2091. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.JSObjectProxy)})},
  2092. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "addObjectVariablesTo:", "setVariables:"]}),
  2093. smalltalk.JSObjectProxy);
  2094. smalltalk.addMethod(
  2095. smalltalk.method({
  2096. selector: "jsObject",
  2097. fn: function (){
  2098. var self=this;
  2099. return smalltalk.withContext(function($ctx1) {
  2100. var $1;
  2101. $1=self["@jsObject"];
  2102. return $1;
  2103. }, function($ctx1) {$ctx1.fill(self,"jsObject",{},smalltalk.JSObjectProxy)})},
  2104. messageSends: []}),
  2105. smalltalk.JSObjectProxy);
  2106. smalltalk.addMethod(
  2107. smalltalk.method({
  2108. selector: "jsObject:",
  2109. fn: function (aJSObject){
  2110. var self=this;
  2111. return smalltalk.withContext(function($ctx1) {
  2112. self["@jsObject"]=aJSObject;
  2113. return self}, function($ctx1) {$ctx1.fill(self,"jsObject:",{aJSObject:aJSObject},smalltalk.JSObjectProxy)})},
  2114. messageSends: []}),
  2115. smalltalk.JSObjectProxy);
  2116. smalltalk.addMethod(
  2117. smalltalk.method({
  2118. selector: "keysAndValuesDo:",
  2119. fn: function (aBlock){
  2120. var self=this;
  2121. return smalltalk.withContext(function($ctx1) {
  2122. var o = self['@jsObject'];
  2123. for(var i in o) {
  2124. aBlock._value_value_(i, o[i]);
  2125. }
  2126. ;
  2127. return self}, function($ctx1) {$ctx1.fill(self,"keysAndValuesDo:",{aBlock:aBlock},smalltalk.JSObjectProxy)})},
  2128. messageSends: []}),
  2129. smalltalk.JSObjectProxy);
  2130. smalltalk.addMethod(
  2131. smalltalk.method({
  2132. selector: "lookupProperty:",
  2133. fn: function (aString){
  2134. var self=this;
  2135. return smalltalk.withContext(function($ctx1) {
  2136. return aString in self._jsObject() ? aString : nil;
  2137. return self}, function($ctx1) {$ctx1.fill(self,"lookupProperty:",{aString:aString},smalltalk.JSObjectProxy)})},
  2138. messageSends: []}),
  2139. smalltalk.JSObjectProxy);
  2140. smalltalk.addMethod(
  2141. smalltalk.method({
  2142. selector: "printOn:",
  2143. fn: function (aStream){
  2144. var self=this;
  2145. return smalltalk.withContext(function($ctx1) {
  2146. _st(aStream)._nextPutAll_(_st(self._jsObject())._toString());
  2147. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.JSObjectProxy)})},
  2148. messageSends: ["nextPutAll:", "toString", "jsObject"]}),
  2149. smalltalk.JSObjectProxy);
  2150. smalltalk.addMethod(
  2151. smalltalk.method({
  2152. selector: "value",
  2153. fn: function (){
  2154. var self=this;
  2155. return smalltalk.withContext(function($ctx1) {
  2156. var $1;
  2157. $1=self._at_ifAbsent_("value",(function(){
  2158. return smalltalk.withContext(function($ctx2) {
  2159. return smalltalk.Object.fn.prototype._value.apply(_st(self), []);
  2160. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2161. return $1;
  2162. }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.JSObjectProxy)})},
  2163. messageSends: ["at:ifAbsent:", "value"]}),
  2164. smalltalk.JSObjectProxy);
  2165. smalltalk.addMethod(
  2166. smalltalk.method({
  2167. selector: "on:",
  2168. fn: function (aJSObject){
  2169. var self=this;
  2170. return smalltalk.withContext(function($ctx1) {
  2171. var $2,$3,$1;
  2172. $2=self._new();
  2173. _st($2)._jsObject_(aJSObject);
  2174. $3=_st($2)._yourself();
  2175. $1=$3;
  2176. return $1;
  2177. }, function($ctx1) {$ctx1.fill(self,"on:",{aJSObject:aJSObject},smalltalk.JSObjectProxy.klass)})},
  2178. messageSends: ["jsObject:", "new", "yourself"]}),
  2179. smalltalk.JSObjectProxy.klass);
  2180. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel-Objects');
  2181. smalltalk.addMethod(
  2182. smalltalk.method({
  2183. selector: "&",
  2184. fn: function (aNumber){
  2185. var self=this;
  2186. return smalltalk.withContext(function($ctx1) {
  2187. return self & aNumber;
  2188. return self}, function($ctx1) {$ctx1.fill(self,"&",{aNumber:aNumber},smalltalk.Number)})},
  2189. messageSends: []}),
  2190. smalltalk.Number);
  2191. smalltalk.addMethod(
  2192. smalltalk.method({
  2193. selector: "*",
  2194. fn: function (aNumber){
  2195. var self=this;
  2196. return smalltalk.withContext(function($ctx1) {
  2197. return self * aNumber;
  2198. return self}, function($ctx1) {$ctx1.fill(self,"*",{aNumber:aNumber},smalltalk.Number)})},
  2199. messageSends: []}),
  2200. smalltalk.Number);
  2201. smalltalk.addMethod(
  2202. smalltalk.method({
  2203. selector: "+",
  2204. fn: function (aNumber){
  2205. var self=this;
  2206. return smalltalk.withContext(function($ctx1) {
  2207. return self + aNumber;
  2208. return self}, function($ctx1) {$ctx1.fill(self,"+",{aNumber:aNumber},smalltalk.Number)})},
  2209. messageSends: []}),
  2210. smalltalk.Number);
  2211. smalltalk.addMethod(
  2212. smalltalk.method({
  2213. selector: "-",
  2214. fn: function (aNumber){
  2215. var self=this;
  2216. return smalltalk.withContext(function($ctx1) {
  2217. return self - aNumber;
  2218. return self}, function($ctx1) {$ctx1.fill(self,"-",{aNumber:aNumber},smalltalk.Number)})},
  2219. messageSends: []}),
  2220. smalltalk.Number);
  2221. smalltalk.addMethod(
  2222. smalltalk.method({
  2223. selector: "/",
  2224. fn: function (aNumber){
  2225. var self=this;
  2226. return smalltalk.withContext(function($ctx1) {
  2227. return self / aNumber;
  2228. return self}, function($ctx1) {$ctx1.fill(self,"/",{aNumber:aNumber},smalltalk.Number)})},
  2229. messageSends: []}),
  2230. smalltalk.Number);
  2231. smalltalk.addMethod(
  2232. smalltalk.method({
  2233. selector: "<",
  2234. fn: function (aNumber){
  2235. var self=this;
  2236. return smalltalk.withContext(function($ctx1) {
  2237. return self < aNumber;
  2238. return self}, function($ctx1) {$ctx1.fill(self,"<",{aNumber:aNumber},smalltalk.Number)})},
  2239. messageSends: []}),
  2240. smalltalk.Number);
  2241. smalltalk.addMethod(
  2242. smalltalk.method({
  2243. selector: "<=",
  2244. fn: function (aNumber){
  2245. var self=this;
  2246. return smalltalk.withContext(function($ctx1) {
  2247. return self <= aNumber;
  2248. return self}, function($ctx1) {$ctx1.fill(self,"<=",{aNumber:aNumber},smalltalk.Number)})},
  2249. messageSends: []}),
  2250. smalltalk.Number);
  2251. smalltalk.addMethod(
  2252. smalltalk.method({
  2253. selector: "=",
  2254. fn: function (aNumber){
  2255. var self=this;
  2256. return smalltalk.withContext(function($ctx1) {
  2257. if(! aNumber._isNumber || ! aNumber._isNumber()) {
  2258. return false;
  2259. }
  2260. return Number(self) == aNumber
  2261. ;
  2262. return self}, function($ctx1) {$ctx1.fill(self,"=",{aNumber:aNumber},smalltalk.Number)})},
  2263. messageSends: []}),
  2264. smalltalk.Number);
  2265. smalltalk.addMethod(
  2266. smalltalk.method({
  2267. selector: ">",
  2268. fn: function (aNumber){
  2269. var self=this;
  2270. return smalltalk.withContext(function($ctx1) {
  2271. return self > aNumber;
  2272. return self}, function($ctx1) {$ctx1.fill(self,">",{aNumber:aNumber},smalltalk.Number)})},
  2273. messageSends: []}),
  2274. smalltalk.Number);
  2275. smalltalk.addMethod(
  2276. smalltalk.method({
  2277. selector: ">=",
  2278. fn: function (aNumber){
  2279. var self=this;
  2280. return smalltalk.withContext(function($ctx1) {
  2281. return self >= aNumber;
  2282. return self}, function($ctx1) {$ctx1.fill(self,">=",{aNumber:aNumber},smalltalk.Number)})},
  2283. messageSends: []}),
  2284. smalltalk.Number);
  2285. smalltalk.addMethod(
  2286. smalltalk.method({
  2287. selector: "@",
  2288. fn: function (aNumber){
  2289. var self=this;
  2290. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2291. return smalltalk.withContext(function($ctx1) {
  2292. var $1;
  2293. $1=_st($Point())._x_y_(self,aNumber);
  2294. return $1;
  2295. }, function($ctx1) {$ctx1.fill(self,"@",{aNumber:aNumber},smalltalk.Number)})},
  2296. messageSends: ["x:y:"]}),
  2297. smalltalk.Number);
  2298. smalltalk.addMethod(
  2299. smalltalk.method({
  2300. selector: "\x5c\x5c",
  2301. fn: function (aNumber){
  2302. var self=this;
  2303. return smalltalk.withContext(function($ctx1) {
  2304. return self % aNumber;
  2305. return self}, function($ctx1) {$ctx1.fill(self,"\x5c\x5c",{aNumber:aNumber},smalltalk.Number)})},
  2306. messageSends: []}),
  2307. smalltalk.Number);
  2308. smalltalk.addMethod(
  2309. smalltalk.method({
  2310. selector: "abs",
  2311. fn: function (){
  2312. var self=this;
  2313. return smalltalk.withContext(function($ctx1) {
  2314. return Math.abs(self);;
  2315. return self}, function($ctx1) {$ctx1.fill(self,"abs",{},smalltalk.Number)})},
  2316. messageSends: []}),
  2317. smalltalk.Number);
  2318. smalltalk.addMethod(
  2319. smalltalk.method({
  2320. selector: "asJSON",
  2321. fn: function (){
  2322. var self=this;
  2323. return smalltalk.withContext(function($ctx1) {
  2324. var $1;
  2325. $1=self;
  2326. return $1;
  2327. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Number)})},
  2328. messageSends: []}),
  2329. smalltalk.Number);
  2330. smalltalk.addMethod(
  2331. smalltalk.method({
  2332. selector: "asJavascript",
  2333. fn: function (){
  2334. var self=this;
  2335. return smalltalk.withContext(function($ctx1) {
  2336. var $1;
  2337. $1=_st("(".__comma(self._printString())).__comma(")");
  2338. return $1;
  2339. }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Number)})},
  2340. messageSends: [",", "printString"]}),
  2341. smalltalk.Number);
  2342. smalltalk.addMethod(
  2343. smalltalk.method({
  2344. selector: "asPoint",
  2345. fn: function (){
  2346. var self=this;
  2347. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2348. return smalltalk.withContext(function($ctx1) {
  2349. var $1;
  2350. $1=_st($Point())._x_y_(self,self);
  2351. return $1;
  2352. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Number)})},
  2353. messageSends: ["x:y:"]}),
  2354. smalltalk.Number);
  2355. smalltalk.addMethod(
  2356. smalltalk.method({
  2357. selector: "asString",
  2358. fn: function (){
  2359. var self=this;
  2360. return smalltalk.withContext(function($ctx1) {
  2361. return String(self) ;
  2362. return self}, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Number)})},
  2363. messageSends: []}),
  2364. smalltalk.Number);
  2365. smalltalk.addMethod(
  2366. smalltalk.method({
  2367. selector: "atRandom",
  2368. fn: function (){
  2369. var self=this;
  2370. function $Random(){return smalltalk.Random||(typeof Random=="undefined"?nil:Random)}
  2371. return smalltalk.withContext(function($ctx1) {
  2372. var $1;
  2373. $1=_st(_st(_st(_st(_st($Random())._new())._next()).__star(self))._truncated()).__plus((1));
  2374. return $1;
  2375. }, function($ctx1) {$ctx1.fill(self,"atRandom",{},smalltalk.Number)})},
  2376. messageSends: ["+", "truncated", "*", "next", "new"]}),
  2377. smalltalk.Number);
  2378. smalltalk.addMethod(
  2379. smalltalk.method({
  2380. selector: "copy",
  2381. fn: function (){
  2382. var self=this;
  2383. return smalltalk.withContext(function($ctx1) {
  2384. var $1;
  2385. $1=self;
  2386. return $1;
  2387. }, function($ctx1) {$ctx1.fill(self,"copy",{},smalltalk.Number)})},
  2388. messageSends: []}),
  2389. smalltalk.Number);
  2390. smalltalk.addMethod(
  2391. smalltalk.method({
  2392. selector: "deepCopy",
  2393. fn: function (){
  2394. var self=this;
  2395. return smalltalk.withContext(function($ctx1) {
  2396. var $1;
  2397. $1=self._copy();
  2398. return $1;
  2399. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Number)})},
  2400. messageSends: ["copy"]}),
  2401. smalltalk.Number);
  2402. smalltalk.addMethod(
  2403. smalltalk.method({
  2404. selector: "even",
  2405. fn: function (){
  2406. var self=this;
  2407. return smalltalk.withContext(function($ctx1) {
  2408. var $1;
  2409. $1=(0).__eq(self.__backslash_backslash((2)));
  2410. return $1;
  2411. }, function($ctx1) {$ctx1.fill(self,"even",{},smalltalk.Number)})},
  2412. messageSends: ["=", "\x5c\x5c"]}),
  2413. smalltalk.Number);
  2414. smalltalk.addMethod(
  2415. smalltalk.method({
  2416. selector: "identityHash",
  2417. fn: function (){
  2418. var self=this;
  2419. return smalltalk.withContext(function($ctx1) {
  2420. var $1;
  2421. $1=_st(self._asString()).__comma("n");
  2422. return $1;
  2423. }, function($ctx1) {$ctx1.fill(self,"identityHash",{},smalltalk.Number)})},
  2424. messageSends: [",", "asString"]}),
  2425. smalltalk.Number);
  2426. smalltalk.addMethod(
  2427. smalltalk.method({
  2428. selector: "isImmutable",
  2429. fn: function (){
  2430. var self=this;
  2431. return smalltalk.withContext(function($ctx1) {
  2432. return true;
  2433. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.Number)})},
  2434. messageSends: []}),
  2435. smalltalk.Number);
  2436. smalltalk.addMethod(
  2437. smalltalk.method({
  2438. selector: "isNumber",
  2439. fn: function (){
  2440. var self=this;
  2441. return smalltalk.withContext(function($ctx1) {
  2442. return true;
  2443. }, function($ctx1) {$ctx1.fill(self,"isNumber",{},smalltalk.Number)})},
  2444. messageSends: []}),
  2445. smalltalk.Number);
  2446. smalltalk.addMethod(
  2447. smalltalk.method({
  2448. selector: "isZero",
  2449. fn: function (){
  2450. var self=this;
  2451. return smalltalk.withContext(function($ctx1) {
  2452. var $1;
  2453. $1=self.__eq((0));
  2454. return $1;
  2455. }, function($ctx1) {$ctx1.fill(self,"isZero",{},smalltalk.Number)})},
  2456. messageSends: ["="]}),
  2457. smalltalk.Number);
  2458. smalltalk.addMethod(
  2459. smalltalk.method({
  2460. selector: "max:",
  2461. fn: function (aNumber){
  2462. var self=this;
  2463. return smalltalk.withContext(function($ctx1) {
  2464. return Math.max(self, aNumber);;
  2465. return self}, function($ctx1) {$ctx1.fill(self,"max:",{aNumber:aNumber},smalltalk.Number)})},
  2466. messageSends: []}),
  2467. smalltalk.Number);
  2468. smalltalk.addMethod(
  2469. smalltalk.method({
  2470. selector: "min:",
  2471. fn: function (aNumber){
  2472. var self=this;
  2473. return smalltalk.withContext(function($ctx1) {
  2474. return Math.min(self, aNumber);;
  2475. return self}, function($ctx1) {$ctx1.fill(self,"min:",{aNumber:aNumber},smalltalk.Number)})},
  2476. messageSends: []}),
  2477. smalltalk.Number);
  2478. smalltalk.addMethod(
  2479. smalltalk.method({
  2480. selector: "negated",
  2481. fn: function (){
  2482. var self=this;
  2483. return smalltalk.withContext(function($ctx1) {
  2484. var $1;
  2485. $1=(0).__minus(self);
  2486. return $1;
  2487. }, function($ctx1) {$ctx1.fill(self,"negated",{},smalltalk.Number)})},
  2488. messageSends: ["-"]}),
  2489. smalltalk.Number);
  2490. smalltalk.addMethod(
  2491. smalltalk.method({
  2492. selector: "negative",
  2493. fn: function (){
  2494. var self=this;
  2495. return smalltalk.withContext(function($ctx1) {
  2496. var $1;
  2497. $1=self.__lt((0));
  2498. return $1;
  2499. }, function($ctx1) {$ctx1.fill(self,"negative",{},smalltalk.Number)})},
  2500. messageSends: ["<"]}),
  2501. smalltalk.Number);
  2502. smalltalk.addMethod(
  2503. smalltalk.method({
  2504. selector: "odd",
  2505. fn: function (){
  2506. var self=this;
  2507. return smalltalk.withContext(function($ctx1) {
  2508. var $1;
  2509. $1=_st(self._even())._not();
  2510. return $1;
  2511. }, function($ctx1) {$ctx1.fill(self,"odd",{},smalltalk.Number)})},
  2512. messageSends: ["not", "even"]}),
  2513. smalltalk.Number);
  2514. smalltalk.addMethod(
  2515. smalltalk.method({
  2516. selector: "positive",
  2517. fn: function (){
  2518. var self=this;
  2519. return smalltalk.withContext(function($ctx1) {
  2520. var $1;
  2521. $1=self.__gt_eq((0));
  2522. return $1;
  2523. }, function($ctx1) {$ctx1.fill(self,"positive",{},smalltalk.Number)})},
  2524. messageSends: [">="]}),
  2525. smalltalk.Number);
  2526. smalltalk.addMethod(
  2527. smalltalk.method({
  2528. selector: "printOn:",
  2529. fn: function (aStream){
  2530. var self=this;
  2531. return smalltalk.withContext(function($ctx1) {
  2532. _st(aStream)._nextPutAll_(self._asString());
  2533. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Number)})},
  2534. messageSends: ["nextPutAll:", "asString"]}),
  2535. smalltalk.Number);
  2536. smalltalk.addMethod(
  2537. smalltalk.method({
  2538. selector: "printShowingDecimalPlaces:",
  2539. fn: function (placesDesired){
  2540. var self=this;
  2541. return smalltalk.withContext(function($ctx1) {
  2542. return self.toFixed(placesDesired);
  2543. return self}, function($ctx1) {$ctx1.fill(self,"printShowingDecimalPlaces:",{placesDesired:placesDesired},smalltalk.Number)})},
  2544. messageSends: []}),
  2545. smalltalk.Number);
  2546. smalltalk.addMethod(
  2547. smalltalk.method({
  2548. selector: "rounded",
  2549. fn: function (){
  2550. var self=this;
  2551. return smalltalk.withContext(function($ctx1) {
  2552. return Math.round(self);;
  2553. return self}, function($ctx1) {$ctx1.fill(self,"rounded",{},smalltalk.Number)})},
  2554. messageSends: []}),
  2555. smalltalk.Number);
  2556. smalltalk.addMethod(
  2557. smalltalk.method({
  2558. selector: "sqrt",
  2559. fn: function (){
  2560. var self=this;
  2561. return smalltalk.withContext(function($ctx1) {
  2562. return Math.sqrt(self);
  2563. return self}, function($ctx1) {$ctx1.fill(self,"sqrt",{},smalltalk.Number)})},
  2564. messageSends: []}),
  2565. smalltalk.Number);
  2566. smalltalk.addMethod(
  2567. smalltalk.method({
  2568. selector: "squared",
  2569. fn: function (){
  2570. var self=this;
  2571. return smalltalk.withContext(function($ctx1) {
  2572. var $1;
  2573. $1=self.__star(self);
  2574. return $1;
  2575. }, function($ctx1) {$ctx1.fill(self,"squared",{},smalltalk.Number)})},
  2576. messageSends: ["*"]}),
  2577. smalltalk.Number);
  2578. smalltalk.addMethod(
  2579. smalltalk.method({
  2580. selector: "timesRepeat:",
  2581. fn: function (aBlock){
  2582. var self=this;
  2583. var count;
  2584. return smalltalk.withContext(function($ctx1) {
  2585. count=(1);
  2586. _st((function(){
  2587. return smalltalk.withContext(function($ctx2) {
  2588. return _st(count).__gt(self);
  2589. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
  2590. return smalltalk.withContext(function($ctx2) {
  2591. _st(aBlock)._value();
  2592. count=_st(count).__plus((1));
  2593. return count;
  2594. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2595. return self}, function($ctx1) {$ctx1.fill(self,"timesRepeat:",{aBlock:aBlock,count:count},smalltalk.Number)})},
  2596. messageSends: ["whileFalse:", "value", "+", ">"]}),
  2597. smalltalk.Number);
  2598. smalltalk.addMethod(
  2599. smalltalk.method({
  2600. selector: "to:",
  2601. fn: function (aNumber){
  2602. var self=this;
  2603. var array,first,last,count;
  2604. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2605. return smalltalk.withContext(function($ctx1) {
  2606. var $1;
  2607. first=self._truncated();
  2608. last=_st(_st(aNumber)._truncated()).__plus((1));
  2609. count=(1);
  2610. array=_st($Array())._new();
  2611. _st(_st(last).__minus(first))._timesRepeat_((function(){
  2612. return smalltalk.withContext(function($ctx2) {
  2613. _st(array)._at_put_(count,first);
  2614. count=_st(count).__plus((1));
  2615. count;
  2616. first=_st(first).__plus((1));
  2617. return first;
  2618. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2619. $1=array;
  2620. return $1;
  2621. }, function($ctx1) {$ctx1.fill(self,"to:",{aNumber:aNumber,array:array,first:first,last:last,count:count},smalltalk.Number)})},
  2622. messageSends: ["truncated", "+", "new", "timesRepeat:", "at:put:", "-"]}),
  2623. smalltalk.Number);
  2624. smalltalk.addMethod(
  2625. smalltalk.method({
  2626. selector: "to:by:",
  2627. fn: function (stop,step){
  2628. var self=this;
  2629. var array,value,pos;
  2630. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2631. return smalltalk.withContext(function($ctx1) {
  2632. var $1,$2,$3;
  2633. value=self;
  2634. array=_st($Array())._new();
  2635. pos=(1);
  2636. $1=_st(step).__eq((0));
  2637. if(smalltalk.assert($1)){
  2638. self._error_("step must be non-zero");
  2639. };
  2640. $2=_st(step).__lt((0));
  2641. if(smalltalk.assert($2)){
  2642. _st((function(){
  2643. return smalltalk.withContext(function($ctx2) {
  2644. return _st(value).__gt_eq(stop);
  2645. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2646. return smalltalk.withContext(function($ctx2) {
  2647. _st(array)._at_put_(pos,value);
  2648. pos=_st(pos).__plus((1));
  2649. pos;
  2650. value=_st(value).__plus(step);
  2651. return value;
  2652. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2653. } else {
  2654. _st((function(){
  2655. return smalltalk.withContext(function($ctx2) {
  2656. return _st(value).__lt_eq(stop);
  2657. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2658. return smalltalk.withContext(function($ctx2) {
  2659. _st(array)._at_put_(pos,value);
  2660. pos=_st(pos).__plus((1));
  2661. pos;
  2662. value=_st(value).__plus(step);
  2663. return value;
  2664. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2665. };
  2666. $3=array;
  2667. return $3;
  2668. }, function($ctx1) {$ctx1.fill(self,"to:by:",{stop:stop,step:step,array:array,value:value,pos:pos},smalltalk.Number)})},
  2669. messageSends: ["new", "ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "at:put:", "+", ">=", "<=", "<"]}),
  2670. smalltalk.Number);
  2671. smalltalk.addMethod(
  2672. smalltalk.method({
  2673. selector: "to:by:do:",
  2674. fn: function (stop,step,aBlock){
  2675. var self=this;
  2676. var value;
  2677. return smalltalk.withContext(function($ctx1) {
  2678. var $1,$2;
  2679. value=self;
  2680. $1=_st(step).__eq((0));
  2681. if(smalltalk.assert($1)){
  2682. self._error_("step must be non-zero");
  2683. };
  2684. $2=_st(step).__lt((0));
  2685. if(smalltalk.assert($2)){
  2686. _st((function(){
  2687. return smalltalk.withContext(function($ctx2) {
  2688. return _st(value).__gt_eq(stop);
  2689. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2690. return smalltalk.withContext(function($ctx2) {
  2691. _st(aBlock)._value_(value);
  2692. value=_st(value).__plus(step);
  2693. return value;
  2694. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2695. } else {
  2696. _st((function(){
  2697. return smalltalk.withContext(function($ctx2) {
  2698. return _st(value).__lt_eq(stop);
  2699. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2700. return smalltalk.withContext(function($ctx2) {
  2701. _st(aBlock)._value_(value);
  2702. value=_st(value).__plus(step);
  2703. return value;
  2704. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2705. };
  2706. return self}, function($ctx1) {$ctx1.fill(self,"to:by:do:",{stop:stop,step:step,aBlock:aBlock,value:value},smalltalk.Number)})},
  2707. messageSends: ["ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "value:", "+", ">=", "<=", "<"]}),
  2708. smalltalk.Number);
  2709. smalltalk.addMethod(
  2710. smalltalk.method({
  2711. selector: "to:do:",
  2712. fn: function (stop,aBlock){
  2713. var self=this;
  2714. var nextValue;
  2715. return smalltalk.withContext(function($ctx1) {
  2716. nextValue=self;
  2717. _st((function(){
  2718. return smalltalk.withContext(function($ctx2) {
  2719. return _st(nextValue).__lt_eq(stop);
  2720. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2721. return smalltalk.withContext(function($ctx2) {
  2722. _st(aBlock)._value_(nextValue);
  2723. nextValue=_st(nextValue).__plus((1));
  2724. return nextValue;
  2725. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2726. return self}, function($ctx1) {$ctx1.fill(self,"to:do:",{stop:stop,aBlock:aBlock,nextValue:nextValue},smalltalk.Number)})},
  2727. messageSends: ["whileTrue:", "value:", "+", "<="]}),
  2728. smalltalk.Number);
  2729. smalltalk.addMethod(
  2730. smalltalk.method({
  2731. selector: "truncated",
  2732. fn: function (){
  2733. var self=this;
  2734. return smalltalk.withContext(function($ctx1) {
  2735. if(self >= 0) {
  2736. return Math.floor(self);
  2737. } else {
  2738. return Math.floor(self * (-1)) * (-1);
  2739. };
  2740. ;
  2741. return self}, function($ctx1) {$ctx1.fill(self,"truncated",{},smalltalk.Number)})},
  2742. messageSends: []}),
  2743. smalltalk.Number);
  2744. smalltalk.addMethod(
  2745. smalltalk.method({
  2746. selector: "|",
  2747. fn: function (aNumber){
  2748. var self=this;
  2749. return smalltalk.withContext(function($ctx1) {
  2750. return self | aNumber;
  2751. return self}, function($ctx1) {$ctx1.fill(self,"|",{aNumber:aNumber},smalltalk.Number)})},
  2752. messageSends: []}),
  2753. smalltalk.Number);
  2754. smalltalk.addMethod(
  2755. smalltalk.method({
  2756. selector: "heliosClass",
  2757. fn: function (){
  2758. var self=this;
  2759. return smalltalk.withContext(function($ctx1) {
  2760. return "magnitude";
  2761. }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Number.klass)})},
  2762. messageSends: []}),
  2763. smalltalk.Number.klass);
  2764. smalltalk.addMethod(
  2765. smalltalk.method({
  2766. selector: "pi",
  2767. fn: function (){
  2768. var self=this;
  2769. return smalltalk.withContext(function($ctx1) {
  2770. return Math.PI;
  2771. return self}, function($ctx1) {$ctx1.fill(self,"pi",{},smalltalk.Number.klass)})},
  2772. messageSends: []}),
  2773. smalltalk.Number.klass);
  2774. smalltalk.addClass('Organizer', smalltalk.Object, [], 'Kernel-Objects');
  2775. smalltalk.addMethod(
  2776. smalltalk.method({
  2777. selector: "addElement:",
  2778. fn: function (anObject){
  2779. var self=this;
  2780. return smalltalk.withContext(function($ctx1) {
  2781. self.elements.addElement(anObject);
  2782. return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{anObject:anObject},smalltalk.Organizer)})},
  2783. messageSends: []}),
  2784. smalltalk.Organizer);
  2785. smalltalk.addMethod(
  2786. smalltalk.method({
  2787. selector: "elements",
  2788. fn: function (){
  2789. var self=this;
  2790. return smalltalk.withContext(function($ctx1) {
  2791. var $1;
  2792. $1=_st(self._basicAt_("elements"))._copy();
  2793. return $1;
  2794. }, function($ctx1) {$ctx1.fill(self,"elements",{},smalltalk.Organizer)})},
  2795. messageSends: ["copy", "basicAt:"]}),
  2796. smalltalk.Organizer);
  2797. smalltalk.addMethod(
  2798. smalltalk.method({
  2799. selector: "removeElement:",
  2800. fn: function (anObject){
  2801. var self=this;
  2802. return smalltalk.withContext(function($ctx1) {
  2803. self.elements.removeElement(anObject);
  2804. return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{anObject:anObject},smalltalk.Organizer)})},
  2805. messageSends: []}),
  2806. smalltalk.Organizer);
  2807. smalltalk.addClass('ClassOrganizer', smalltalk.Organizer, [], 'Kernel-Objects');
  2808. smalltalk.addMethod(
  2809. smalltalk.method({
  2810. selector: "addElement:",
  2811. fn: function (aString){
  2812. var self=this;
  2813. function $ProtocolAdded(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
  2814. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  2815. return smalltalk.withContext(function($ctx1) {
  2816. var $1,$2;
  2817. smalltalk.Organizer.fn.prototype._addElement_.apply(_st(self), [aString]);
  2818. $1=_st($ProtocolAdded())._new();
  2819. _st($1)._protocol_(aString);
  2820. _st($1)._theClass_(self._theClass());
  2821. $2=_st($1)._yourself();
  2822. _st(_st($SystemAnnouncer())._current())._announce_($2);
  2823. return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{aString:aString},smalltalk.ClassOrganizer)})},
  2824. messageSends: ["addElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"]}),
  2825. smalltalk.ClassOrganizer);
  2826. smalltalk.addMethod(
  2827. smalltalk.method({
  2828. selector: "removeElement:",
  2829. fn: function (aString){
  2830. var self=this;
  2831. function $ProtocolRemoved(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
  2832. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  2833. return smalltalk.withContext(function($ctx1) {
  2834. var $1,$2;
  2835. smalltalk.Organizer.fn.prototype._removeElement_.apply(_st(self), [aString]);
  2836. $1=_st($ProtocolRemoved())._new();
  2837. _st($1)._protocol_(aString);
  2838. _st($1)._theClass_(self._theClass());
  2839. $2=_st($1)._yourself();
  2840. _st(_st($SystemAnnouncer())._current())._announce_($2);
  2841. return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{aString:aString},smalltalk.ClassOrganizer)})},
  2842. messageSends: ["removeElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"]}),
  2843. smalltalk.ClassOrganizer);
  2844. smalltalk.addMethod(
  2845. smalltalk.method({
  2846. selector: "theClass",
  2847. fn: function (){
  2848. var self=this;
  2849. return smalltalk.withContext(function($ctx1) {
  2850. return self.theClass ;
  2851. return self}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassOrganizer)})},
  2852. messageSends: []}),
  2853. smalltalk.ClassOrganizer);
  2854. smalltalk.addClass('PackageOrganizer', smalltalk.Organizer, [], 'Kernel-Objects');
  2855. smalltalk.addClass('Package', smalltalk.Object, ['extension'], 'Kernel-Objects');
  2856. smalltalk.addMethod(
  2857. smalltalk.method({
  2858. selector: "classes",
  2859. fn: function (){
  2860. var self=this;
  2861. return smalltalk.withContext(function($ctx1) {
  2862. var $1;
  2863. $1=_st(self._organization())._elements();
  2864. return $1;
  2865. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Package)})},
  2866. messageSends: ["elements", "organization"]}),
  2867. smalltalk.Package);
  2868. smalltalk.addMethod(
  2869. smalltalk.method({
  2870. selector: "isPackage",
  2871. fn: function (){
  2872. var self=this;
  2873. return smalltalk.withContext(function($ctx1) {
  2874. return true;
  2875. }, function($ctx1) {$ctx1.fill(self,"isPackage",{},smalltalk.Package)})},
  2876. messageSends: []}),
  2877. smalltalk.Package);
  2878. smalltalk.addMethod(
  2879. smalltalk.method({
  2880. selector: "name",
  2881. fn: function (){
  2882. var self=this;
  2883. return smalltalk.withContext(function($ctx1) {
  2884. return self.pkgName;
  2885. return self}, function($ctx1) {$ctx1.fill(self,"name",{},smalltalk.Package)})},
  2886. messageSends: []}),
  2887. smalltalk.Package);
  2888. smalltalk.addMethod(
  2889. smalltalk.method({
  2890. selector: "name:",
  2891. fn: function (aString){
  2892. var self=this;
  2893. return smalltalk.withContext(function($ctx1) {
  2894. self.pkgName = aString;
  2895. return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString},smalltalk.Package)})},
  2896. messageSends: []}),
  2897. smalltalk.Package);
  2898. smalltalk.addMethod(
  2899. smalltalk.method({
  2900. selector: "organization",
  2901. fn: function (){
  2902. var self=this;
  2903. return smalltalk.withContext(function($ctx1) {
  2904. var $1;
  2905. $1=self._basicAt_("organization");
  2906. return $1;
  2907. }, function($ctx1) {$ctx1.fill(self,"organization",{},smalltalk.Package)})},
  2908. messageSends: ["basicAt:"]}),
  2909. smalltalk.Package);
  2910. smalltalk.addMethod(
  2911. smalltalk.method({
  2912. selector: "printOn:",
  2913. fn: function (aStream){
  2914. var self=this;
  2915. return smalltalk.withContext(function($ctx1) {
  2916. var $1,$2;
  2917. smalltalk.Object.fn.prototype._printOn_.apply(_st(self), [aStream]);
  2918. $1=aStream;
  2919. _st($1)._nextPutAll_(" (");
  2920. _st($1)._nextPutAll_(self._name());
  2921. $2=_st($1)._nextPutAll_(")");
  2922. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Package)})},
  2923. messageSends: ["printOn:", "nextPutAll:", "name"]}),
  2924. smalltalk.Package);
  2925. smalltalk.addMethod(
  2926. smalltalk.method({
  2927. selector: "setupClasses",
  2928. fn: function (){
  2929. var self=this;
  2930. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2931. return smalltalk.withContext(function($ctx1) {
  2932. var $1,$2;
  2933. $1=self._classes();
  2934. _st($1)._do_((function(each){
  2935. return smalltalk.withContext(function($ctx2) {
  2936. return _st(_st($ClassBuilder())._new())._setupClass_(each);
  2937. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2938. $2=_st($1)._do_((function(each){
  2939. return smalltalk.withContext(function($ctx2) {
  2940. return _st(each)._initialize();
  2941. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2942. return self}, function($ctx1) {$ctx1.fill(self,"setupClasses",{},smalltalk.Package)})},
  2943. messageSends: ["do:", "setupClass:", "new", "classes", "initialize"]}),
  2944. smalltalk.Package);
  2945. smalltalk.addMethod(
  2946. smalltalk.method({
  2947. selector: "sortedClasses",
  2948. fn: function (){
  2949. var self=this;
  2950. return smalltalk.withContext(function($ctx1) {
  2951. var $1;
  2952. $1=_st(self._class())._sortedClasses_(self._classes());
  2953. return $1;
  2954. }, function($ctx1) {$ctx1.fill(self,"sortedClasses",{},smalltalk.Package)})},
  2955. messageSends: ["sortedClasses:", "classes", "class"]}),
  2956. smalltalk.Package);
  2957. smalltalk.Package.klass.iVarNames = ['defaultCommitPathJs','defaultCommitPathSt'];
  2958. smalltalk.addMethod(
  2959. smalltalk.method({
  2960. selector: "load:",
  2961. fn: function (aPackageName){
  2962. var self=this;
  2963. return smalltalk.withContext(function($ctx1) {
  2964. self._deprecatedAPI();
  2965. self._load_prefix_(aPackageName,_st(self._defaultCommitPathJs()).__comma("/"));
  2966. return self}, function($ctx1) {$ctx1.fill(self,"load:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
  2967. messageSends: ["deprecatedAPI", "load:prefix:", ",", "defaultCommitPathJs"]}),
  2968. smalltalk.Package.klass);
  2969. smalltalk.addMethod(
  2970. smalltalk.method({
  2971. selector: "load:prefix:",
  2972. fn: function (aPackageName,aPrefix){
  2973. var self=this;
  2974. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  2975. function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
  2976. return smalltalk.withContext(function($ctx1) {
  2977. self._deprecatedAPI();
  2978. _st($PlatformInterface())._ajax_(smalltalk.HashedCollection._from_(["url".__minus_gt(_st(_st(aPrefix).__comma(aPackageName)).__comma(".js")),"dataType".__minus_gt("script"),"success".__minus_gt((function(){
  2979. return smalltalk.withContext(function($ctx2) {
  2980. return _st(_st($Package())._named_(aPackageName))._setupClasses();
  2981. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))]));
  2982. return self}, function($ctx1) {$ctx1.fill(self,"load:prefix:",{aPackageName:aPackageName,aPrefix:aPrefix},smalltalk.Package.klass)})},
  2983. messageSends: ["deprecatedAPI", "ajax:", "->", ",", "setupClasses", "named:"]}),
  2984. smalltalk.Package.klass);
  2985. smalltalk.addMethod(
  2986. smalltalk.method({
  2987. selector: "named:",
  2988. fn: function (aPackageName){
  2989. var self=this;
  2990. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2991. return smalltalk.withContext(function($ctx1) {
  2992. var $1;
  2993. $1=_st(_st($Smalltalk())._current())._packageAt_(aPackageName);
  2994. return $1;
  2995. }, function($ctx1) {$ctx1.fill(self,"named:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
  2996. messageSends: ["packageAt:", "current"]}),
  2997. smalltalk.Package.klass);
  2998. smalltalk.addMethod(
  2999. smalltalk.method({
  3000. selector: "named:ifAbsent:",
  3001. fn: function (aPackageName,aBlock){
  3002. var self=this;
  3003. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  3004. return smalltalk.withContext(function($ctx1) {
  3005. var $1;
  3006. $1=_st(_st($Smalltalk())._current())._packageAt_ifAbsent_(aPackageName,aBlock);
  3007. return $1;
  3008. }, function($ctx1) {$ctx1.fill(self,"named:ifAbsent:",{aPackageName:aPackageName,aBlock:aBlock},smalltalk.Package.klass)})},
  3009. messageSends: ["packageAt:ifAbsent:", "current"]}),
  3010. smalltalk.Package.klass);
  3011. smalltalk.addMethod(
  3012. smalltalk.method({
  3013. selector: "sortedClasses:",
  3014. fn: function (classes){
  3015. var self=this;
  3016. var children,others,nodes,expandedClasses;
  3017. function $ClassSorterNode(){return smalltalk.ClassSorterNode||(typeof ClassSorterNode=="undefined"?nil:ClassSorterNode)}
  3018. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  3019. return smalltalk.withContext(function($ctx1) {
  3020. var $1,$2;
  3021. children=[];
  3022. others=[];
  3023. _st(classes)._do_((function(each){
  3024. return smalltalk.withContext(function($ctx2) {
  3025. $1=_st(classes)._includes_(_st(each)._superclass());
  3026. if(smalltalk.assert($1)){
  3027. return _st(others)._add_(each);
  3028. } else {
  3029. return _st(children)._add_(each);
  3030. };
  3031. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3032. nodes=_st(children)._collect_((function(each){
  3033. return smalltalk.withContext(function($ctx2) {
  3034. return _st($ClassSorterNode())._on_classes_level_(each,others,(0));
  3035. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3036. nodes=_st(nodes)._sorted_((function(a,b){
  3037. return smalltalk.withContext(function($ctx2) {
  3038. return _st(_st(_st(a)._theClass())._name()).__lt_eq(_st(_st(b)._theClass())._name());
  3039. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  3040. expandedClasses=_st($Array())._new();
  3041. _st(nodes)._do_((function(aNode){
  3042. return smalltalk.withContext(function($ctx2) {
  3043. return _st(aNode)._traverseClassesWith_(expandedClasses);
  3044. }, function($ctx2) {$ctx2.fillBlock({aNode:aNode},$ctx1)})}));
  3045. $2=expandedClasses;
  3046. return $2;
  3047. }, function($ctx1) {$ctx1.fill(self,"sortedClasses:",{classes:classes,children:children,others:others,nodes:nodes,expandedClasses:expandedClasses},smalltalk.Package.klass)})},
  3048. messageSends: ["do:", "ifFalse:ifTrue:", "add:", "includes:", "superclass", "collect:", "on:classes:level:", "sorted:", "<=", "name", "theClass", "new", "traverseClassesWith:"]}),
  3049. smalltalk.Package.klass);
  3050. smalltalk.addClass('PlatformInterface', smalltalk.Object, [], 'Kernel-Objects');
  3051. smalltalk.PlatformInterface.klass.iVarNames = ['worker'];
  3052. smalltalk.addMethod(
  3053. smalltalk.method({
  3054. selector: "ajax:",
  3055. fn: function (anObject){
  3056. var self=this;
  3057. return smalltalk.withContext(function($ctx1) {
  3058. var $2,$1;
  3059. $2=self["@worker"];
  3060. if(($receiver = $2) == nil || $receiver == undefined){
  3061. $1=self._error_("ajax: not available");
  3062. } else {
  3063. $1=_st(self["@worker"])._ajax_(anObject);
  3064. };
  3065. return $1;
  3066. }, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},smalltalk.PlatformInterface.klass)})},
  3067. messageSends: ["ifNotNil:ifNil:", "ajax:", "error:"]}),
  3068. smalltalk.PlatformInterface.klass);
  3069. smalltalk.addMethod(
  3070. smalltalk.method({
  3071. selector: "alert:",
  3072. fn: function (aString){
  3073. var self=this;
  3074. return smalltalk.withContext(function($ctx1) {
  3075. var $2,$1;
  3076. $2=self["@worker"];
  3077. if(($receiver = $2) == nil || $receiver == undefined){
  3078. $1=self._error_("alert: not available");
  3079. } else {
  3080. $1=_st(self["@worker"])._alert_(aString);
  3081. };
  3082. return $1;
  3083. }, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.PlatformInterface.klass)})},
  3084. messageSends: ["ifNotNil:ifNil:", "alert:", "error:"]}),
  3085. smalltalk.PlatformInterface.klass);
  3086. smalltalk.addMethod(
  3087. smalltalk.method({
  3088. selector: "confirm:",
  3089. fn: function (aString){
  3090. var self=this;
  3091. return smalltalk.withContext(function($ctx1) {
  3092. var $2,$1;
  3093. $2=self["@worker"];
  3094. if(($receiver = $2) == nil || $receiver == undefined){
  3095. $1=self._error_("confirm: not available");
  3096. } else {
  3097. $1=_st(self["@worker"])._confirm_(aString);
  3098. };
  3099. return $1;
  3100. }, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},smalltalk.PlatformInterface.klass)})},
  3101. messageSends: ["ifNotNil:ifNil:", "confirm:", "error:"]}),
  3102. smalltalk.PlatformInterface.klass);
  3103. smalltalk.addMethod(
  3104. smalltalk.method({
  3105. selector: "initialize",
  3106. fn: function (){
  3107. var self=this;
  3108. var candidate;
  3109. function $BrowserInterface(){return smalltalk.BrowserInterface||(typeof BrowserInterface=="undefined"?nil:BrowserInterface)}
  3110. return smalltalk.withContext(function($ctx1) {
  3111. var $1,$2,$3;
  3112. smalltalk.PlatformInterface.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
  3113. $1=$BrowserInterface();
  3114. if(($receiver = $1) == nil || $receiver == undefined){
  3115. $1;
  3116. } else {
  3117. candidate=_st($BrowserInterface())._new();
  3118. candidate;
  3119. $2=_st(candidate)._isAvailable();
  3120. if(smalltalk.assert($2)){
  3121. self._setWorker_(candidate);
  3122. $3=self;
  3123. return $3;
  3124. };
  3125. };
  3126. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{candidate:candidate},smalltalk.PlatformInterface.klass)})},
  3127. messageSends: ["initialize", "ifNotNil:", "new", "ifTrue:", "setWorker:", "isAvailable"]}),
  3128. smalltalk.PlatformInterface.klass);
  3129. smalltalk.addMethod(
  3130. smalltalk.method({
  3131. selector: "prompt:",
  3132. fn: function (aString){
  3133. var self=this;
  3134. return smalltalk.withContext(function($ctx1) {
  3135. var $2,$1;
  3136. $2=self["@worker"];
  3137. if(($receiver = $2) == nil || $receiver == undefined){
  3138. $1=self._error_("prompt: not available");
  3139. } else {
  3140. $1=_st(self["@worker"])._prompt_(aString);
  3141. };
  3142. return $1;
  3143. }, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},smalltalk.PlatformInterface.klass)})},
  3144. messageSends: ["ifNotNil:ifNil:", "prompt:", "error:"]}),
  3145. smalltalk.PlatformInterface.klass);
  3146. smalltalk.addMethod(
  3147. smalltalk.method({
  3148. selector: "setWorker:",
  3149. fn: function (anObject){
  3150. var self=this;
  3151. return smalltalk.withContext(function($ctx1) {
  3152. self["@worker"]=anObject;
  3153. return self}, function($ctx1) {$ctx1.fill(self,"setWorker:",{anObject:anObject},smalltalk.PlatformInterface.klass)})},
  3154. messageSends: []}),
  3155. smalltalk.PlatformInterface.klass);
  3156. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel-Objects');
  3157. smalltalk.addMethod(
  3158. smalltalk.method({
  3159. selector: "*",
  3160. fn: function (aPoint){
  3161. var self=this;
  3162. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3163. return smalltalk.withContext(function($ctx1) {
  3164. var $1;
  3165. $1=_st($Point())._x_y_(_st(self._x()).__star(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__star(_st(_st(aPoint)._asPoint())._y()));
  3166. return $1;
  3167. }, function($ctx1) {$ctx1.fill(self,"*",{aPoint:aPoint},smalltalk.Point)})},
  3168. messageSends: ["x:y:", "*", "x", "asPoint", "y"]}),
  3169. smalltalk.Point);
  3170. smalltalk.addMethod(
  3171. smalltalk.method({
  3172. selector: "+",
  3173. fn: function (aPoint){
  3174. var self=this;
  3175. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3176. return smalltalk.withContext(function($ctx1) {
  3177. var $1;
  3178. $1=_st($Point())._x_y_(_st(self._x()).__plus(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__plus(_st(_st(aPoint)._asPoint())._y()));
  3179. return $1;
  3180. }, function($ctx1) {$ctx1.fill(self,"+",{aPoint:aPoint},smalltalk.Point)})},
  3181. messageSends: ["x:y:", "+", "x", "asPoint", "y"]}),
  3182. smalltalk.Point);
  3183. smalltalk.addMethod(
  3184. smalltalk.method({
  3185. selector: "-",
  3186. fn: function (aPoint){
  3187. var self=this;
  3188. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3189. return smalltalk.withContext(function($ctx1) {
  3190. var $1;
  3191. $1=_st($Point())._x_y_(_st(self._x()).__minus(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__minus(_st(_st(aPoint)._asPoint())._y()));
  3192. return $1;
  3193. }, function($ctx1) {$ctx1.fill(self,"-",{aPoint:aPoint},smalltalk.Point)})},
  3194. messageSends: ["x:y:", "-", "x", "asPoint", "y"]}),
  3195. smalltalk.Point);
  3196. smalltalk.addMethod(
  3197. smalltalk.method({
  3198. selector: "/",
  3199. fn: function (aPoint){
  3200. var self=this;
  3201. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3202. return smalltalk.withContext(function($ctx1) {
  3203. var $1;
  3204. $1=_st($Point())._x_y_(_st(self._x()).__slash(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__slash(_st(_st(aPoint)._asPoint())._y()));
  3205. return $1;
  3206. }, function($ctx1) {$ctx1.fill(self,"/",{aPoint:aPoint},smalltalk.Point)})},
  3207. messageSends: ["x:y:", "/", "x", "asPoint", "y"]}),
  3208. smalltalk.Point);
  3209. smalltalk.addMethod(
  3210. smalltalk.method({
  3211. selector: "=",
  3212. fn: function (aPoint){
  3213. var self=this;
  3214. return smalltalk.withContext(function($ctx1) {
  3215. var $1;
  3216. $1=_st(_st(_st(aPoint)._class()).__eq(self._class()))._and_((function(){
  3217. return smalltalk.withContext(function($ctx2) {
  3218. return _st(_st(_st(aPoint)._x()).__eq(self._x())).__and(_st(_st(aPoint)._y()).__eq(self._y()));
  3219. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3220. return $1;
  3221. }, function($ctx1) {$ctx1.fill(self,"=",{aPoint:aPoint},smalltalk.Point)})},
  3222. messageSends: ["and:", "&", "=", "y", "x", "class"]}),
  3223. smalltalk.Point);
  3224. smalltalk.addMethod(
  3225. smalltalk.method({
  3226. selector: "asPoint",
  3227. fn: function (){
  3228. var self=this;
  3229. return smalltalk.withContext(function($ctx1) {
  3230. var $1;
  3231. $1=self;
  3232. return $1;
  3233. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Point)})},
  3234. messageSends: []}),
  3235. smalltalk.Point);
  3236. smalltalk.addMethod(
  3237. smalltalk.method({
  3238. selector: "printOn:",
  3239. fn: function (aStream){
  3240. var self=this;
  3241. return smalltalk.withContext(function($ctx1) {
  3242. var $1;
  3243. _st(self["@x"])._printOn_(aStream);
  3244. _st(aStream)._nextPutAll_("@");
  3245. $1=_st(_st(self["@y"])._notNil())._and_((function(){
  3246. return smalltalk.withContext(function($ctx2) {
  3247. return _st(self["@y"])._negative();
  3248. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3249. if(smalltalk.assert($1)){
  3250. _st(aStream)._space();
  3251. };
  3252. _st(self["@y"])._printOn_(aStream);
  3253. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Point)})},
  3254. messageSends: ["printOn:", "nextPutAll:", "ifTrue:", "space", "and:", "negative", "notNil"]}),
  3255. smalltalk.Point);
  3256. smalltalk.addMethod(
  3257. smalltalk.method({
  3258. selector: "translateBy:",
  3259. fn: function (delta){
  3260. var self=this;
  3261. return smalltalk.withContext(function($ctx1) {
  3262. var $1;
  3263. $1=_st(_st(_st(delta)._x()).__plus(self["@x"])).__at(_st(_st(delta)._y()).__plus(self["@y"]));
  3264. return $1;
  3265. }, function($ctx1) {$ctx1.fill(self,"translateBy:",{delta:delta},smalltalk.Point)})},
  3266. messageSends: ["@", "+", "y", "x"]}),
  3267. smalltalk.Point);
  3268. smalltalk.addMethod(
  3269. smalltalk.method({
  3270. selector: "x",
  3271. fn: function (){
  3272. var self=this;
  3273. return smalltalk.withContext(function($ctx1) {
  3274. var $1;
  3275. $1=self["@x"];
  3276. return $1;
  3277. }, function($ctx1) {$ctx1.fill(self,"x",{},smalltalk.Point)})},
  3278. messageSends: []}),
  3279. smalltalk.Point);
  3280. smalltalk.addMethod(
  3281. smalltalk.method({
  3282. selector: "x:",
  3283. fn: function (aNumber){
  3284. var self=this;
  3285. return smalltalk.withContext(function($ctx1) {
  3286. self["@x"]=aNumber;
  3287. return self}, function($ctx1) {$ctx1.fill(self,"x:",{aNumber:aNumber},smalltalk.Point)})},
  3288. messageSends: []}),
  3289. smalltalk.Point);
  3290. smalltalk.addMethod(
  3291. smalltalk.method({
  3292. selector: "y",
  3293. fn: function (){
  3294. var self=this;
  3295. return smalltalk.withContext(function($ctx1) {
  3296. var $1;
  3297. $1=self["@y"];
  3298. return $1;
  3299. }, function($ctx1) {$ctx1.fill(self,"y",{},smalltalk.Point)})},
  3300. messageSends: []}),
  3301. smalltalk.Point);
  3302. smalltalk.addMethod(
  3303. smalltalk.method({
  3304. selector: "y:",
  3305. fn: function (aNumber){
  3306. var self=this;
  3307. return smalltalk.withContext(function($ctx1) {
  3308. self["@y"]=aNumber;
  3309. return self}, function($ctx1) {$ctx1.fill(self,"y:",{aNumber:aNumber},smalltalk.Point)})},
  3310. messageSends: []}),
  3311. smalltalk.Point);
  3312. smalltalk.addMethod(
  3313. smalltalk.method({
  3314. selector: "heliosClass",
  3315. fn: function (){
  3316. var self=this;
  3317. return smalltalk.withContext(function($ctx1) {
  3318. return "magnitude";
  3319. }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Point.klass)})},
  3320. messageSends: []}),
  3321. smalltalk.Point.klass);
  3322. smalltalk.addMethod(
  3323. smalltalk.method({
  3324. selector: "x:y:",
  3325. fn: function (aNumber,anotherNumber){
  3326. var self=this;
  3327. return smalltalk.withContext(function($ctx1) {
  3328. var $2,$3,$1;
  3329. $2=self._new();
  3330. _st($2)._x_(aNumber);
  3331. _st($2)._y_(anotherNumber);
  3332. $3=_st($2)._yourself();
  3333. $1=$3;
  3334. return $1;
  3335. }, function($ctx1) {$ctx1.fill(self,"x:y:",{aNumber:aNumber,anotherNumber:anotherNumber},smalltalk.Point.klass)})},
  3336. messageSends: ["x:", "new", "y:", "yourself"]}),
  3337. smalltalk.Point.klass);
  3338. smalltalk.addClass('ProgressHandler', smalltalk.Object, [], 'Kernel-Objects');
  3339. smalltalk.addMethod(
  3340. smalltalk.method({
  3341. selector: "do:on:displaying:",
  3342. fn: function (aBlock,aCollection,aString){
  3343. var self=this;
  3344. return smalltalk.withContext(function($ctx1) {
  3345. _st(aCollection)._do_(aBlock);
  3346. return self}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},smalltalk.ProgressHandler)})},
  3347. messageSends: ["do:"]}),
  3348. smalltalk.ProgressHandler);
  3349. smalltalk.ProgressHandler.klass.iVarNames = ['current'];
  3350. smalltalk.addMethod(
  3351. smalltalk.method({
  3352. selector: "current",
  3353. fn: function (){
  3354. var self=this;
  3355. return smalltalk.withContext(function($ctx1) {
  3356. var $2,$1;
  3357. $2=self["@current"];
  3358. if(($receiver = $2) == nil || $receiver == undefined){
  3359. self["@current"]=self._new();
  3360. $1=self["@current"];
  3361. } else {
  3362. $1=$2;
  3363. };
  3364. return $1;
  3365. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.ProgressHandler.klass)})},
  3366. messageSends: ["ifNil:", "new"]}),
  3367. smalltalk.ProgressHandler.klass);
  3368. smalltalk.addMethod(
  3369. smalltalk.method({
  3370. selector: "existsGlobal:",
  3371. fn: function (aString){
  3372. var self=this;
  3373. return smalltalk.withContext(function($ctx1) {
  3374. var f = new Function('aString',
  3375. 'if (/^[0-9]/.test(aString) || !/^[\\w_]+$/.test(aString))\n'+
  3376. ' return false;\n'+
  3377. 'try { eval(aString); return true; } catch (ex) {}\n'+
  3378. 'return false;');
  3379. return f(aString);;
  3380. return self}, function($ctx1) {$ctx1.fill(self,"existsGlobal:",{aString:aString},smalltalk.PlatformInterface.klass)})},
  3381. messageSends: []}),
  3382. smalltalk.PlatformInterface.klass);
  3383. smalltalk.addMethod(
  3384. smalltalk.method({
  3385. selector: "initialize",
  3386. fn: function (){
  3387. var self=this;
  3388. return smalltalk.withContext(function($ctx1) {
  3389. self._register();
  3390. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ProgressHandler.klass)})},
  3391. messageSends: ["register"]}),
  3392. smalltalk.ProgressHandler.klass);
  3393. smalltalk.addMethod(
  3394. smalltalk.method({
  3395. selector: "register",
  3396. fn: function (){
  3397. var self=this;
  3398. function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
  3399. return smalltalk.withContext(function($ctx1) {
  3400. _st($ProgressHandler())._setCurrent_(self._new());
  3401. return self}, function($ctx1) {$ctx1.fill(self,"register",{},smalltalk.ProgressHandler.klass)})},
  3402. messageSends: ["setCurrent:", "new"]}),
  3403. smalltalk.ProgressHandler.klass);
  3404. smalltalk.addMethod(
  3405. smalltalk.method({
  3406. selector: "setCurrent:",
  3407. fn: function (anHandler){
  3408. var self=this;
  3409. return smalltalk.withContext(function($ctx1) {
  3410. self["@current"]=anHandler;
  3411. return self}, function($ctx1) {$ctx1.fill(self,"setCurrent:",{anHandler:anHandler},smalltalk.ProgressHandler.klass)})},
  3412. messageSends: []}),
  3413. smalltalk.ProgressHandler.klass);
  3414. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel-Objects');
  3415. smalltalk.addMethod(
  3416. smalltalk.method({
  3417. selector: "next",
  3418. fn: function (){
  3419. var self=this;
  3420. return smalltalk.withContext(function($ctx1) {
  3421. return Math.random();
  3422. return self}, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.Random)})},
  3423. messageSends: []}),
  3424. smalltalk.Random);
  3425. smalltalk.addMethod(
  3426. smalltalk.method({
  3427. selector: "next:",
  3428. fn: function (anInteger){
  3429. var self=this;
  3430. return smalltalk.withContext(function($ctx1) {
  3431. var $1;
  3432. $1=_st((1)._to_(anInteger))._collect_((function(each){
  3433. return smalltalk.withContext(function($ctx2) {
  3434. return self._next();
  3435. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3436. return $1;
  3437. }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger},smalltalk.Random)})},
  3438. messageSends: ["collect:", "next", "to:"]}),
  3439. smalltalk.Random);
  3440. smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel-Objects');
  3441. smalltalk.addMethod(
  3442. smalltalk.method({
  3443. selector: "addGlobalJsVariable:",
  3444. fn: function (aString){
  3445. var self=this;
  3446. return smalltalk.withContext(function($ctx1) {
  3447. _st(self._globalJsVariables())._add_(aString);
  3448. return self}, function($ctx1) {$ctx1.fill(self,"addGlobalJsVariable:",{aString:aString},smalltalk.Smalltalk)})},
  3449. messageSends: ["add:", "globalJsVariables"]}),
  3450. smalltalk.Smalltalk);
  3451. smalltalk.addMethod(
  3452. smalltalk.method({
  3453. selector: "asSmalltalkException:",
  3454. fn: function (anObject){
  3455. var self=this;
  3456. function $JavaScriptException(){return smalltalk.JavaScriptException||(typeof JavaScriptException=="undefined"?nil:JavaScriptException)}
  3457. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  3458. return smalltalk.withContext(function($ctx1) {
  3459. var $2,$1;
  3460. $2=_st(self._isSmalltalkObject_(anObject))._and_((function(){
  3461. return smalltalk.withContext(function($ctx2) {
  3462. return _st(anObject)._isKindOf_($Error());
  3463. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3464. if(smalltalk.assert($2)){
  3465. $1=anObject;
  3466. } else {
  3467. $1=_st($JavaScriptException())._on_(anObject);
  3468. };
  3469. return $1;
  3470. }, function($ctx1) {$ctx1.fill(self,"asSmalltalkException:",{anObject:anObject},smalltalk.Smalltalk)})},
  3471. messageSends: ["ifTrue:ifFalse:", "on:", "and:", "isKindOf:", "isSmalltalkObject:"]}),
  3472. smalltalk.Smalltalk);
  3473. smalltalk.addMethod(
  3474. smalltalk.method({
  3475. selector: "at:",
  3476. fn: function (aString){
  3477. var self=this;
  3478. return smalltalk.withContext(function($ctx1) {
  3479. return self[aString];
  3480. return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.Smalltalk)})},
  3481. messageSends: []}),
  3482. smalltalk.Smalltalk);
  3483. smalltalk.addMethod(
  3484. smalltalk.method({
  3485. selector: "basicParse:",
  3486. fn: function (aString){
  3487. var self=this;
  3488. return smalltalk.withContext(function($ctx1) {
  3489. return smalltalk.parser.parse(aString);
  3490. return self}, function($ctx1) {$ctx1.fill(self,"basicParse:",{aString:aString},smalltalk.Smalltalk)})},
  3491. messageSends: []}),
  3492. smalltalk.Smalltalk);
  3493. smalltalk.addMethod(
  3494. smalltalk.method({
  3495. selector: "classes",
  3496. fn: function (){
  3497. var self=this;
  3498. return smalltalk.withContext(function($ctx1) {
  3499. return self.classes();
  3500. return self}, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Smalltalk)})},
  3501. messageSends: []}),
  3502. smalltalk.Smalltalk);
  3503. smalltalk.addMethod(
  3504. smalltalk.method({
  3505. selector: "createPackage:",
  3506. fn: function (packageName){
  3507. var self=this;
  3508. return smalltalk.withContext(function($ctx1) {
  3509. return smalltalk.addPackage(packageName);
  3510. return self}, function($ctx1) {$ctx1.fill(self,"createPackage:",{packageName:packageName},smalltalk.Smalltalk)})},
  3511. messageSends: []}),
  3512. smalltalk.Smalltalk);
  3513. smalltalk.addMethod(
  3514. smalltalk.method({
  3515. selector: "createPackage:properties:",
  3516. fn: function (packageName,aDict){
  3517. var self=this;
  3518. return smalltalk.withContext(function($ctx1) {
  3519. var $1,$2;
  3520. self._deprecatedAPI();
  3521. $1=_st(aDict)._isEmpty();
  3522. if(! smalltalk.assert($1)){
  3523. self._error_("createPackage:properties: called with nonempty properties");
  3524. };
  3525. $2=self._createPackage_(packageName);
  3526. return $2;
  3527. }, function($ctx1) {$ctx1.fill(self,"createPackage:properties:",{packageName:packageName,aDict:aDict},smalltalk.Smalltalk)})},
  3528. messageSends: ["deprecatedAPI", "ifFalse:", "error:", "isEmpty", "createPackage:"]}),
  3529. smalltalk.Smalltalk);
  3530. smalltalk.addMethod(
  3531. smalltalk.method({
  3532. selector: "deleteClass:",
  3533. fn: function (aClass){
  3534. var self=this;
  3535. return smalltalk.withContext(function($ctx1) {
  3536. self.removeClass(aClass);
  3537. return self}, function($ctx1) {$ctx1.fill(self,"deleteClass:",{aClass:aClass},smalltalk.Smalltalk)})},
  3538. messageSends: []}),
  3539. smalltalk.Smalltalk);
  3540. smalltalk.addMethod(
  3541. smalltalk.method({
  3542. selector: "deleteGlobalJsVariable:",
  3543. fn: function (aString){
  3544. var self=this;
  3545. return smalltalk.withContext(function($ctx1) {
  3546. _st(self._globalJsVariables())._remove_ifAbsent_(aString,(function(){
  3547. return smalltalk.withContext(function($ctx2) {
  3548. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3549. return self}, function($ctx1) {$ctx1.fill(self,"deleteGlobalJsVariable:",{aString:aString},smalltalk.Smalltalk)})},
  3550. messageSends: ["remove:ifAbsent:", "globalJsVariables"]}),
  3551. smalltalk.Smalltalk);
  3552. smalltalk.addMethod(
  3553. smalltalk.method({
  3554. selector: "deletePackage:",
  3555. fn: function (packageName){
  3556. var self=this;
  3557. return smalltalk.withContext(function($ctx1) {
  3558. delete smalltalk.packages[packageName];
  3559. return self}, function($ctx1) {$ctx1.fill(self,"deletePackage:",{packageName:packageName},smalltalk.Smalltalk)})},
  3560. messageSends: []}),
  3561. smalltalk.Smalltalk);
  3562. smalltalk.addMethod(
  3563. smalltalk.method({
  3564. selector: "globalJsVariables",
  3565. fn: function (){
  3566. var self=this;
  3567. return smalltalk.withContext(function($ctx1) {
  3568. return self.globalJsVariables;
  3569. return self}, function($ctx1) {$ctx1.fill(self,"globalJsVariables",{},smalltalk.Smalltalk)})},
  3570. messageSends: []}),
  3571. smalltalk.Smalltalk);
  3572. smalltalk.addMethod(
  3573. smalltalk.method({
  3574. selector: "isSmalltalkObject:",
  3575. fn: function (anObject){
  3576. var self=this;
  3577. return smalltalk.withContext(function($ctx1) {
  3578. return typeof anObject.klass !== 'undefined';
  3579. return self}, function($ctx1) {$ctx1.fill(self,"isSmalltalkObject:",{anObject:anObject},smalltalk.Smalltalk)})},
  3580. messageSends: []}),
  3581. smalltalk.Smalltalk);
  3582. smalltalk.addMethod(
  3583. smalltalk.method({
  3584. selector: "packageAt:",
  3585. fn: function (packageName){
  3586. var self=this;
  3587. return smalltalk.withContext(function($ctx1) {
  3588. return self.packages[packageName];
  3589. return self}, function($ctx1) {$ctx1.fill(self,"packageAt:",{packageName:packageName},smalltalk.Smalltalk)})},
  3590. messageSends: []}),
  3591. smalltalk.Smalltalk);
  3592. smalltalk.addMethod(
  3593. smalltalk.method({
  3594. selector: "packageAt:ifAbsent:",
  3595. fn: function (packageName,aBlock){
  3596. var self=this;
  3597. return smalltalk.withContext(function($ctx1) {
  3598. var $2,$1;
  3599. $2=self._packageAt_(packageName);
  3600. $1=_st($2)._ifNil_(aBlock);
  3601. return $1;
  3602. }, function($ctx1) {$ctx1.fill(self,"packageAt:ifAbsent:",{packageName:packageName,aBlock:aBlock},smalltalk.Smalltalk)})},
  3603. messageSends: ["ifNil:", "packageAt:"]}),
  3604. smalltalk.Smalltalk);
  3605. smalltalk.addMethod(
  3606. smalltalk.method({
  3607. selector: "packages",
  3608. fn: function (){
  3609. var self=this;
  3610. return smalltalk.withContext(function($ctx1) {
  3611. return self.packages.all();
  3612. return self}, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.Smalltalk)})},
  3613. messageSends: []}),
  3614. smalltalk.Smalltalk);
  3615. smalltalk.addMethod(
  3616. smalltalk.method({
  3617. selector: "parse:",
  3618. fn: function (aString){
  3619. var self=this;
  3620. var result;
  3621. return smalltalk.withContext(function($ctx1) {
  3622. var $2,$3,$1;
  3623. self._try_catch_((function(){
  3624. return smalltalk.withContext(function($ctx2) {
  3625. result=self._basicParse_(aString);
  3626. return result;
  3627. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(ex){
  3628. return smalltalk.withContext(function($ctx2) {
  3629. return _st(self._parseError_parsing_(ex,aString))._signal();
  3630. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  3631. $2=result;
  3632. _st($2)._source_(aString);
  3633. $3=_st($2)._yourself();
  3634. $1=$3;
  3635. return $1;
  3636. }, function($ctx1) {$ctx1.fill(self,"parse:",{aString:aString,result:result},smalltalk.Smalltalk)})},
  3637. messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:", "source:", "yourself"]}),
  3638. smalltalk.Smalltalk);
  3639. smalltalk.addMethod(
  3640. smalltalk.method({
  3641. selector: "parseError:parsing:",
  3642. fn: function (anException,aString){
  3643. var self=this;
  3644. function $ParseError(){return smalltalk.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
  3645. return smalltalk.withContext(function($ctx1) {
  3646. var $1;
  3647. $1=_st(_st($ParseError())._new())._messageText_(_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")));
  3648. return $1;
  3649. }, function($ctx1) {$ctx1.fill(self,"parseError:parsing:",{anException:anException,aString:aString},smalltalk.Smalltalk)})},
  3650. messageSends: ["messageText:", ",", "basicAt:", "new"]}),
  3651. smalltalk.Smalltalk);
  3652. smalltalk.addMethod(
  3653. smalltalk.method({
  3654. selector: "pseudoVariableNames",
  3655. fn: function (){
  3656. var self=this;
  3657. return smalltalk.withContext(function($ctx1) {
  3658. var $1;
  3659. $1=["self", "super", "nil", "true", "false", "thisContext"];
  3660. return $1;
  3661. }, function($ctx1) {$ctx1.fill(self,"pseudoVariableNames",{},smalltalk.Smalltalk)})},
  3662. messageSends: []}),
  3663. smalltalk.Smalltalk);
  3664. smalltalk.addMethod(
  3665. smalltalk.method({
  3666. selector: "readJSObject:",
  3667. fn: function (anObject){
  3668. var self=this;
  3669. return smalltalk.withContext(function($ctx1) {
  3670. return self.readJSObject(anObject);
  3671. return self}, function($ctx1) {$ctx1.fill(self,"readJSObject:",{anObject:anObject},smalltalk.Smalltalk)})},
  3672. messageSends: []}),
  3673. smalltalk.Smalltalk);
  3674. smalltalk.addMethod(
  3675. smalltalk.method({
  3676. selector: "removeClass:",
  3677. fn: function (aClass){
  3678. var self=this;
  3679. function $ClassRemoved(){return smalltalk.ClassRemoved||(typeof ClassRemoved=="undefined"?nil:ClassRemoved)}
  3680. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  3681. return smalltalk.withContext(function($ctx1) {
  3682. var $1,$2,$3;
  3683. $1=_st(aClass)._isMetaclass();
  3684. if(smalltalk.assert($1)){
  3685. self._error_(_st(_st(aClass)._asString()).__comma(" is a Metaclass and cannot be removed!"));
  3686. };
  3687. self._deleteClass_(aClass);
  3688. $2=_st($ClassRemoved())._new();
  3689. _st($2)._theClass_(aClass);
  3690. $3=_st($2)._yourself();
  3691. _st(_st($SystemAnnouncer())._current())._announce_($3);
  3692. return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.Smalltalk)})},
  3693. messageSends: ["ifTrue:", "error:", ",", "asString", "isMetaclass", "deleteClass:", "announce:", "theClass:", "new", "yourself", "current"]}),
  3694. smalltalk.Smalltalk);
  3695. smalltalk.addMethod(
  3696. smalltalk.method({
  3697. selector: "removePackage:",
  3698. fn: function (packageName){
  3699. var self=this;
  3700. var pkg;
  3701. return smalltalk.withContext(function($ctx1) {
  3702. pkg=self._packageAt_ifAbsent_(packageName,(function(){
  3703. return smalltalk.withContext(function($ctx2) {
  3704. return self._error_("Missing package: ".__comma(packageName));
  3705. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3706. _st(_st(pkg)._classes())._do_((function(each){
  3707. return smalltalk.withContext(function($ctx2) {
  3708. return self._removeClass_(each);
  3709. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3710. self._deletePackage_(packageName);
  3711. return self}, function($ctx1) {$ctx1.fill(self,"removePackage:",{packageName:packageName,pkg:pkg},smalltalk.Smalltalk)})},
  3712. messageSends: ["packageAt:ifAbsent:", "error:", ",", "do:", "removeClass:", "classes", "deletePackage:"]}),
  3713. smalltalk.Smalltalk);
  3714. smalltalk.addMethod(
  3715. smalltalk.method({
  3716. selector: "renamePackage:to:",
  3717. fn: function (packageName,newName){
  3718. var self=this;
  3719. var pkg;
  3720. return smalltalk.withContext(function($ctx1) {
  3721. var $1;
  3722. pkg=self._packageAt_ifAbsent_(packageName,(function(){
  3723. return smalltalk.withContext(function($ctx2) {
  3724. return self._error_("Missing package: ".__comma(packageName));
  3725. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3726. $1=self._packageAt_(newName);
  3727. if(($receiver = $1) == nil || $receiver == undefined){
  3728. $1;
  3729. } else {
  3730. self._error_("Already exists a package called: ".__comma(newName));
  3731. };
  3732. _st(self._basicAt_("packages"))._at_put_(newName,pkg);
  3733. _st(pkg)._name_(newName);
  3734. self._deletePackage_(packageName);
  3735. return self}, function($ctx1) {$ctx1.fill(self,"renamePackage:to:",{packageName:packageName,newName:newName,pkg:pkg},smalltalk.Smalltalk)})},
  3736. messageSends: ["packageAt:ifAbsent:", "error:", ",", "ifNotNil:", "packageAt:", "at:put:", "basicAt:", "name:", "deletePackage:"]}),
  3737. smalltalk.Smalltalk);
  3738. smalltalk.addMethod(
  3739. smalltalk.method({
  3740. selector: "reservedWords",
  3741. fn: function (){
  3742. var self=this;
  3743. return smalltalk.withContext(function($ctx1) {
  3744. return self.reservedWords;
  3745. return self}, function($ctx1) {$ctx1.fill(self,"reservedWords",{},smalltalk.Smalltalk)})},
  3746. messageSends: []}),
  3747. smalltalk.Smalltalk);
  3748. smalltalk.addMethod(
  3749. smalltalk.method({
  3750. selector: "version",
  3751. fn: function (){
  3752. var self=this;
  3753. return smalltalk.withContext(function($ctx1) {
  3754. return "0.11.0";
  3755. }, function($ctx1) {$ctx1.fill(self,"version",{},smalltalk.Smalltalk)})},
  3756. messageSends: []}),
  3757. smalltalk.Smalltalk);
  3758. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  3759. smalltalk.addMethod(
  3760. smalltalk.method({
  3761. selector: "current",
  3762. fn: function (){
  3763. var self=this;
  3764. return smalltalk.withContext(function($ctx1) {
  3765. return smalltalk;
  3766. return self}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.Smalltalk.klass)})},
  3767. messageSends: []}),
  3768. smalltalk.Smalltalk.klass);
  3769. smalltalk.addClass('Timeout', smalltalk.Object, ['rawTimeout'], 'Kernel-Objects');
  3770. smalltalk.addMethod(
  3771. smalltalk.method({
  3772. selector: "clearInterval",
  3773. fn: function (){
  3774. var self=this;
  3775. return smalltalk.withContext(function($ctx1) {
  3776. var interval = self["@rawTimeout"];
  3777. clearInterval(interval);
  3778. ;
  3779. return self}, function($ctx1) {$ctx1.fill(self,"clearInterval",{},smalltalk.Timeout)})},
  3780. messageSends: []}),
  3781. smalltalk.Timeout);
  3782. smalltalk.addMethod(
  3783. smalltalk.method({
  3784. selector: "clearTimeout",
  3785. fn: function (){
  3786. var self=this;
  3787. return smalltalk.withContext(function($ctx1) {
  3788. var timeout = self["@rawTimeout"];
  3789. clearTimeout(timeout);
  3790. ;
  3791. return self}, function($ctx1) {$ctx1.fill(self,"clearTimeout",{},smalltalk.Timeout)})},
  3792. messageSends: []}),
  3793. smalltalk.Timeout);
  3794. smalltalk.addMethod(
  3795. smalltalk.method({
  3796. selector: "rawTimeout:",
  3797. fn: function (anObject){
  3798. var self=this;
  3799. return smalltalk.withContext(function($ctx1) {
  3800. self["@rawTimeout"]=anObject;
  3801. return self}, function($ctx1) {$ctx1.fill(self,"rawTimeout:",{anObject:anObject},smalltalk.Timeout)})},
  3802. messageSends: []}),
  3803. smalltalk.Timeout);
  3804. smalltalk.addMethod(
  3805. smalltalk.method({
  3806. selector: "on:",
  3807. fn: function (anObject){
  3808. var self=this;
  3809. return smalltalk.withContext(function($ctx1) {
  3810. var $2,$3,$1;
  3811. $2=self._new();
  3812. _st($2)._rawTimeout_(anObject);
  3813. $3=_st($2)._yourself();
  3814. $1=$3;
  3815. return $1;
  3816. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Timeout.klass)})},
  3817. messageSends: ["rawTimeout:", "new", "yourself"]}),
  3818. smalltalk.Timeout.klass);
  3819. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel-Objects');
  3820. smalltalk.addMethod(
  3821. smalltalk.method({
  3822. selector: "asJSON",
  3823. fn: function (){
  3824. var self=this;
  3825. return smalltalk.withContext(function($ctx1) {
  3826. var $1;
  3827. $1=null;
  3828. return $1;
  3829. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.UndefinedObject)})},
  3830. messageSends: []}),
  3831. smalltalk.UndefinedObject);
  3832. smalltalk.addMethod(
  3833. smalltalk.method({
  3834. selector: "deepCopy",
  3835. fn: function (){
  3836. var self=this;
  3837. return smalltalk.withContext(function($ctx1) {
  3838. var $1;
  3839. $1=self;
  3840. return $1;
  3841. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.UndefinedObject)})},
  3842. messageSends: []}),
  3843. smalltalk.UndefinedObject);
  3844. smalltalk.addMethod(
  3845. smalltalk.method({
  3846. selector: "ifNil:",
  3847. fn: function (aBlock){
  3848. var self=this;
  3849. return smalltalk.withContext(function($ctx1) {
  3850. var $2,$1;
  3851. $2=self;
  3852. $1=_st($2)._ifNil_ifNotNil_(aBlock,(function(){
  3853. return smalltalk.withContext(function($ctx2) {
  3854. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3855. return $1;
  3856. }, function($ctx1) {$ctx1.fill(self,"ifNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  3857. messageSends: ["ifNil:ifNotNil:"]}),
  3858. smalltalk.UndefinedObject);
  3859. smalltalk.addMethod(
  3860. smalltalk.method({
  3861. selector: "ifNil:ifNotNil:",
  3862. fn: function (aBlock,anotherBlock){
  3863. var self=this;
  3864. return smalltalk.withContext(function($ctx1) {
  3865. var $1;
  3866. $1=_st(aBlock)._value();
  3867. return $1;
  3868. }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  3869. messageSends: ["value"]}),
  3870. smalltalk.UndefinedObject);
  3871. smalltalk.addMethod(
  3872. smalltalk.method({
  3873. selector: "ifNotNil:",
  3874. fn: function (aBlock){
  3875. var self=this;
  3876. return smalltalk.withContext(function($ctx1) {
  3877. var $1;
  3878. $1=self;
  3879. return $1;
  3880. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  3881. messageSends: []}),
  3882. smalltalk.UndefinedObject);
  3883. smalltalk.addMethod(
  3884. smalltalk.method({
  3885. selector: "ifNotNil:ifNil:",
  3886. fn: function (aBlock,anotherBlock){
  3887. var self=this;
  3888. return smalltalk.withContext(function($ctx1) {
  3889. var $1;
  3890. $1=_st(anotherBlock)._value();
  3891. return $1;
  3892. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  3893. messageSends: ["value"]}),
  3894. smalltalk.UndefinedObject);
  3895. smalltalk.addMethod(
  3896. smalltalk.method({
  3897. selector: "isImmutable",
  3898. fn: function (){
  3899. var self=this;
  3900. return smalltalk.withContext(function($ctx1) {
  3901. return true;
  3902. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.UndefinedObject)})},
  3903. messageSends: []}),
  3904. smalltalk.UndefinedObject);
  3905. smalltalk.addMethod(
  3906. smalltalk.method({
  3907. selector: "isNil",
  3908. fn: function (){
  3909. var self=this;
  3910. return smalltalk.withContext(function($ctx1) {
  3911. return true;
  3912. }, function($ctx1) {$ctx1.fill(self,"isNil",{},smalltalk.UndefinedObject)})},
  3913. messageSends: []}),
  3914. smalltalk.UndefinedObject);
  3915. smalltalk.addMethod(
  3916. smalltalk.method({
  3917. selector: "notNil",
  3918. fn: function (){
  3919. var self=this;
  3920. return smalltalk.withContext(function($ctx1) {
  3921. return false;
  3922. }, function($ctx1) {$ctx1.fill(self,"notNil",{},smalltalk.UndefinedObject)})},
  3923. messageSends: []}),
  3924. smalltalk.UndefinedObject);
  3925. smalltalk.addMethod(
  3926. smalltalk.method({
  3927. selector: "printOn:",
  3928. fn: function (aStream){
  3929. var self=this;
  3930. return smalltalk.withContext(function($ctx1) {
  3931. _st(aStream)._nextPutAll_("nil");
  3932. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.UndefinedObject)})},
  3933. messageSends: ["nextPutAll:"]}),
  3934. smalltalk.UndefinedObject);
  3935. smalltalk.addMethod(
  3936. smalltalk.method({
  3937. selector: "shallowCopy",
  3938. fn: function (){
  3939. var self=this;
  3940. return smalltalk.withContext(function($ctx1) {
  3941. var $1;
  3942. $1=self;
  3943. return $1;
  3944. }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.UndefinedObject)})},
  3945. messageSends: []}),
  3946. smalltalk.UndefinedObject);
  3947. smalltalk.addMethod(
  3948. smalltalk.method({
  3949. selector: "subclass:instanceVariableNames:",
  3950. fn: function (aString,anotherString){
  3951. var self=this;
  3952. return smalltalk.withContext(function($ctx1) {
  3953. var $1;
  3954. $1=self._subclass_instanceVariableNames_package_(aString,anotherString,nil);
  3955. return $1;
  3956. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString},smalltalk.UndefinedObject)})},
  3957. messageSends: ["subclass:instanceVariableNames:package:"]}),
  3958. smalltalk.UndefinedObject);
  3959. smalltalk.addMethod(
  3960. smalltalk.method({
  3961. selector: "subclass:instanceVariableNames:category:",
  3962. fn: function (aString,aString2,aString3){
  3963. var self=this;
  3964. return smalltalk.withContext(function($ctx1) {
  3965. var $1;
  3966. self._deprecatedAPI();
  3967. $1=self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
  3968. return $1;
  3969. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:category:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  3970. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"]}),
  3971. smalltalk.UndefinedObject);
  3972. smalltalk.addMethod(
  3973. smalltalk.method({
  3974. selector: "subclass:instanceVariableNames:package:",
  3975. fn: function (aString,aString2,aString3){
  3976. var self=this;
  3977. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  3978. return smalltalk.withContext(function($ctx1) {
  3979. var $1;
  3980. $1=_st(_st($ClassBuilder())._new())._superclass_subclass_instanceVariableNames_package_(self,_st(aString)._asString(),aString2,aString3);
  3981. return $1;
  3982. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  3983. messageSends: ["superclass:subclass:instanceVariableNames:package:", "asString", "new"]}),
  3984. smalltalk.UndefinedObject);
  3985. smalltalk.addMethod(
  3986. smalltalk.method({
  3987. selector: "new",
  3988. fn: function (){
  3989. var self=this;
  3990. return smalltalk.withContext(function($ctx1) {
  3991. self._error_("You cannot create new instances of UndefinedObject. Use nil");
  3992. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.UndefinedObject.klass)})},
  3993. messageSends: ["error:"]}),
  3994. smalltalk.UndefinedObject.klass);
  3995. smalltalk.addMethod(
  3996. smalltalk.method({
  3997. selector: "asJavaScriptSelector",
  3998. fn: function (){
  3999. var self=this;
  4000. return smalltalk.withContext(function($ctx1) {
  4001. var $1;
  4002. $1=self._replace_with_("^([a-zA-Z0-9]*).*$","$1");
  4003. return $1;
  4004. }, function($ctx1) {$ctx1.fill(self,"asJavaScriptSelector",{},smalltalk.String)})},
  4005. messageSends: ["replace:with:"]}),
  4006. smalltalk.String);
  4007. })(global_smalltalk,global_nil,global__st);