Kernel-Objects.deploy.js 131 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353
  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('Environment', smalltalk.Object, [], 'Kernel-Objects');
  1437. smalltalk.addMethod(
  1438. smalltalk.method({
  1439. selector: "addInstVarNamed:to:",
  1440. fn: function (aString,aClass){
  1441. var self=this;
  1442. return smalltalk.withContext(function($ctx1) {
  1443. var $1,$2;
  1444. $1=_st(_st(aClass)._instanceVariableNames())._copy();
  1445. _st($1)._add_(aString);
  1446. $2=_st($1)._yourself();
  1447. _st(self._classBuilder())._addSubclassOf_named_instanceVariableNames_package_(_st(aClass)._superclass(),_st(aClass)._name(),$2,_st(_st(aClass)._package())._name());
  1448. return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:to:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
  1449. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package", "classBuilder"]}),
  1450. smalltalk.Environment);
  1451. smalltalk.addMethod(
  1452. smalltalk.method({
  1453. selector: "allSelectors",
  1454. fn: function (){
  1455. var self=this;
  1456. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1457. return smalltalk.withContext(function($ctx1) {
  1458. var $1;
  1459. $1=_st(_st(_st($Smalltalk())._current())._at_("allSelectors"))._value();
  1460. return $1;
  1461. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.Environment)})},
  1462. messageSends: ["value", "at:", "current"]}),
  1463. smalltalk.Environment);
  1464. smalltalk.addMethod(
  1465. smalltalk.method({
  1466. selector: "availableClassNames",
  1467. fn: function (){
  1468. var self=this;
  1469. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1470. return smalltalk.withContext(function($ctx1) {
  1471. var $1;
  1472. $1=_st(_st(_st($Smalltalk())._current())._classes())._collect_((function(each){
  1473. return smalltalk.withContext(function($ctx2) {
  1474. return _st(each)._name();
  1475. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1476. return $1;
  1477. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},smalltalk.Environment)})},
  1478. messageSends: ["collect:", "name", "classes", "current"]}),
  1479. smalltalk.Environment);
  1480. smalltalk.addMethod(
  1481. smalltalk.method({
  1482. selector: "availablePackageNames",
  1483. fn: function (){
  1484. var self=this;
  1485. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1486. return smalltalk.withContext(function($ctx1) {
  1487. var $1;
  1488. $1=_st(_st(_st($Smalltalk())._current())._packages())._collect_((function(each){
  1489. return smalltalk.withContext(function($ctx2) {
  1490. return _st(each)._name();
  1491. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1492. return $1;
  1493. }, function($ctx1) {$ctx1.fill(self,"availablePackageNames",{},smalltalk.Environment)})},
  1494. messageSends: ["collect:", "name", "packages", "current"]}),
  1495. smalltalk.Environment);
  1496. smalltalk.addMethod(
  1497. smalltalk.method({
  1498. selector: "availableProtocolsFor:",
  1499. fn: function (aClass){
  1500. var self=this;
  1501. var protocols;
  1502. return smalltalk.withContext(function($ctx1) {
  1503. var $1,$2;
  1504. protocols=_st(aClass)._protocols();
  1505. $1=_st(aClass)._superclass();
  1506. if(($receiver = $1) == nil || $receiver == undefined){
  1507. $1;
  1508. } else {
  1509. _st(protocols)._addAll_(self._availableProtocolsFor_(_st(aClass)._superclass()));
  1510. };
  1511. $2=_st(_st(protocols)._asSet())._asArray();
  1512. return $2;
  1513. }, function($ctx1) {$ctx1.fill(self,"availableProtocolsFor:",{aClass:aClass,protocols:protocols},smalltalk.Environment)})},
  1514. messageSends: ["protocols", "ifNotNil:", "addAll:", "availableProtocolsFor:", "superclass", "asArray", "asSet"]}),
  1515. smalltalk.Environment);
  1516. smalltalk.addMethod(
  1517. smalltalk.method({
  1518. selector: "classBuilder",
  1519. fn: function (){
  1520. var self=this;
  1521. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1522. return smalltalk.withContext(function($ctx1) {
  1523. var $1;
  1524. $1=_st($ClassBuilder())._new();
  1525. return $1;
  1526. }, function($ctx1) {$ctx1.fill(self,"classBuilder",{},smalltalk.Environment)})},
  1527. messageSends: ["new"]}),
  1528. smalltalk.Environment);
  1529. smalltalk.addMethod(
  1530. smalltalk.method({
  1531. selector: "classNamed:",
  1532. fn: function (aString){
  1533. var self=this;
  1534. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1535. return smalltalk.withContext(function($ctx1) {
  1536. var $2,$1;
  1537. $2=_st(_st($Smalltalk())._current())._at_(_st(aString)._asSymbol());
  1538. if(($receiver = $2) == nil || $receiver == undefined){
  1539. $1=self._error_("Invalid class name");
  1540. } else {
  1541. $1=$2;
  1542. };
  1543. return $1;
  1544. }, function($ctx1) {$ctx1.fill(self,"classNamed:",{aString:aString},smalltalk.Environment)})},
  1545. messageSends: ["ifNil:", "error:", "at:", "asSymbol", "current"]}),
  1546. smalltalk.Environment);
  1547. smalltalk.addMethod(
  1548. smalltalk.method({
  1549. selector: "classes",
  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($Smalltalk())._current())._classes();
  1556. return $1;
  1557. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Environment)})},
  1558. messageSends: ["classes", "current"]}),
  1559. smalltalk.Environment);
  1560. smalltalk.addMethod(
  1561. smalltalk.method({
  1562. selector: "commitPackage:",
  1563. fn: function (aPackage){
  1564. var self=this;
  1565. return smalltalk.withContext(function($ctx1) {
  1566. _st(aPackage)._commit();
  1567. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage:",{aPackage:aPackage},smalltalk.Environment)})},
  1568. messageSends: ["commit"]}),
  1569. smalltalk.Environment);
  1570. smalltalk.addMethod(
  1571. smalltalk.method({
  1572. selector: "compileClassComment:for:",
  1573. fn: function (aString,aClass){
  1574. var self=this;
  1575. return smalltalk.withContext(function($ctx1) {
  1576. _st(aClass)._comment_(aString);
  1577. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:for:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
  1578. messageSends: ["comment:"]}),
  1579. smalltalk.Environment);
  1580. smalltalk.addMethod(
  1581. smalltalk.method({
  1582. selector: "compileClassDefinition:",
  1583. fn: function (aString){
  1584. var self=this;
  1585. function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  1586. return smalltalk.withContext(function($ctx1) {
  1587. self._eval_on_(aString,_st($DoIt())._new());
  1588. return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},smalltalk.Environment)})},
  1589. messageSends: ["eval:on:", "new"]}),
  1590. smalltalk.Environment);
  1591. smalltalk.addMethod(
  1592. smalltalk.method({
  1593. selector: "compileMethod:for:protocol:",
  1594. fn: function (sourceCode,class_,protocol){
  1595. var self=this;
  1596. return smalltalk.withContext(function($ctx1) {
  1597. var $1;
  1598. $1=_st(class_)._compile_category_(sourceCode,protocol);
  1599. return $1;
  1600. }, function($ctx1) {$ctx1.fill(self,"compileMethod:for:protocol:",{sourceCode:sourceCode,class_:class_,protocol:protocol},smalltalk.Environment)})},
  1601. messageSends: ["compile:category:"]}),
  1602. smalltalk.Environment);
  1603. smalltalk.addMethod(
  1604. smalltalk.method({
  1605. selector: "copyClass:to:",
  1606. fn: function (aClass,aClassName){
  1607. var self=this;
  1608. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1609. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1610. return smalltalk.withContext(function($ctx1) {
  1611. var $1;
  1612. $1=_st(_st($Smalltalk())._current())._at_(aClassName);
  1613. if(($receiver = $1) == nil || $receiver == undefined){
  1614. $1;
  1615. } else {
  1616. self._error_(_st("A class named ".__comma(aClassName)).__comma(" already exists"));
  1617. };
  1618. _st(_st($ClassBuilder())._new())._copyClass_named_(aClass,aClassName);
  1619. return self}, function($ctx1) {$ctx1.fill(self,"copyClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.Environment)})},
  1620. messageSends: ["ifNotNil:", "error:", ",", "at:", "current", "copyClass:named:", "new"]}),
  1621. smalltalk.Environment);
  1622. smalltalk.addMethod(
  1623. smalltalk.method({
  1624. selector: "eval:on:",
  1625. fn: function (aString,aReceiver){
  1626. var self=this;
  1627. var compiler;
  1628. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  1629. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  1630. return smalltalk.withContext(function($ctx1) {
  1631. var $1,$2;
  1632. var $early={};
  1633. try {
  1634. compiler=_st($Compiler())._new();
  1635. _st((function(){
  1636. return smalltalk.withContext(function($ctx2) {
  1637. return _st(compiler)._parseExpression_(aString);
  1638. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($Error(),(function(ex){
  1639. return smalltalk.withContext(function($ctx2) {
  1640. $1=_st(window)._alert_(_st(ex)._messageText());
  1641. throw $early=[$1];
  1642. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  1643. $2=_st(compiler)._evaluateExpression_on_(aString,aReceiver);
  1644. return $2;
  1645. }
  1646. catch(e) {if(e===$early)return e[0]; throw e}
  1647. }, function($ctx1) {$ctx1.fill(self,"eval:on:",{aString:aString,aReceiver:aReceiver,compiler:compiler},smalltalk.Environment)})},
  1648. messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "evaluateExpression:on:"]}),
  1649. smalltalk.Environment);
  1650. smalltalk.addMethod(
  1651. smalltalk.method({
  1652. selector: "evaluate:on:do:",
  1653. fn: function (aBlock,anErrorClass,exceptionBlock){
  1654. var self=this;
  1655. return smalltalk.withContext(function($ctx1) {
  1656. var $1;
  1657. self._try_catch_(aBlock,(function(exception){
  1658. return smalltalk.withContext(function($ctx2) {
  1659. $1=_st(exception)._isKindOf_(self._classNamed_(_st(anErrorClass)._name()));
  1660. if(smalltalk.assert($1)){
  1661. return _st(exceptionBlock)._value_(exception);
  1662. } else {
  1663. return _st(exception)._signal();
  1664. };
  1665. }, function($ctx2) {$ctx2.fillBlock({exception:exception},$ctx1)})}));
  1666. return self}, function($ctx1) {$ctx1.fill(self,"evaluate:on:do:",{aBlock:aBlock,anErrorClass:anErrorClass,exceptionBlock:exceptionBlock},smalltalk.Environment)})},
  1667. messageSends: ["try:catch:", "ifTrue:ifFalse:", "value:", "signal", "isKindOf:", "classNamed:", "name"]}),
  1668. smalltalk.Environment);
  1669. smalltalk.addMethod(
  1670. smalltalk.method({
  1671. selector: "inspect:",
  1672. fn: function (anObject){
  1673. var self=this;
  1674. function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
  1675. return smalltalk.withContext(function($ctx1) {
  1676. _st(_st($InspectorHandler())._inspector())._inspect_(anObject);
  1677. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Environment)})},
  1678. messageSends: ["inspect:", "inspector"]}),
  1679. smalltalk.Environment);
  1680. smalltalk.addMethod(
  1681. smalltalk.method({
  1682. selector: "moveClass:toPackage:",
  1683. fn: function (aClass,aPackageName){
  1684. var self=this;
  1685. var package_;
  1686. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  1687. return smalltalk.withContext(function($ctx1) {
  1688. var $1,$2,$3;
  1689. package_=_st($Package())._named_(aPackageName);
  1690. $1=package_;
  1691. if(($receiver = $1) == nil || $receiver == undefined){
  1692. self._error_("Invalid package name");
  1693. } else {
  1694. $1;
  1695. };
  1696. $2=_st(package_).__eq_eq(_st(aClass)._package());
  1697. if(smalltalk.assert($2)){
  1698. $3=self;
  1699. return $3;
  1700. };
  1701. _st(aClass)._package_(package_);
  1702. return self}, function($ctx1) {$ctx1.fill(self,"moveClass:toPackage:",{aClass:aClass,aPackageName:aPackageName,package_:package_},smalltalk.Environment)})},
  1703. messageSends: ["named:", "ifNil:", "error:", "ifTrue:", "==", "package", "package:"]}),
  1704. smalltalk.Environment);
  1705. smalltalk.addMethod(
  1706. smalltalk.method({
  1707. selector: "moveMethod:toClass:",
  1708. fn: function (aMethod,aClassName){
  1709. var self=this;
  1710. var destinationClass;
  1711. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1712. return smalltalk.withContext(function($ctx1) {
  1713. var $1,$2,$3;
  1714. destinationClass=_st(_st($Smalltalk())._current())._at_(_st(aClassName)._asSymbol());
  1715. $1=destinationClass;
  1716. if(($receiver = $1) == nil || $receiver == undefined){
  1717. self._error_("Invalid class name");
  1718. } else {
  1719. $1;
  1720. };
  1721. $2=_st(destinationClass).__eq_eq(_st(aMethod)._methodClass());
  1722. if(smalltalk.assert($2)){
  1723. $3=self;
  1724. return $3;
  1725. };
  1726. _st(destinationClass)._compile_category_(_st(aMethod)._source(),_st(aMethod)._protocol());
  1727. _st(_st(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
  1728. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName,destinationClass:destinationClass},smalltalk.Environment)})},
  1729. messageSends: ["at:", "asSymbol", "current", "ifNil:", "error:", "ifTrue:", "==", "methodClass", "compile:category:", "source", "protocol", "removeCompiledMethod:"]}),
  1730. smalltalk.Environment);
  1731. smalltalk.addMethod(
  1732. smalltalk.method({
  1733. selector: "moveMethod:toProtocol:",
  1734. fn: function (aMethod,aProtocol){
  1735. var self=this;
  1736. return smalltalk.withContext(function($ctx1) {
  1737. _st(aMethod)._category_(aProtocol);
  1738. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toProtocol:",{aMethod:aMethod,aProtocol:aProtocol},smalltalk.Environment)})},
  1739. messageSends: ["category:"]}),
  1740. smalltalk.Environment);
  1741. smalltalk.addMethod(
  1742. smalltalk.method({
  1743. selector: "packages",
  1744. fn: function (){
  1745. var self=this;
  1746. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1747. return smalltalk.withContext(function($ctx1) {
  1748. var $1;
  1749. $1=_st(_st($Smalltalk())._current())._packages();
  1750. return $1;
  1751. }, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.Environment)})},
  1752. messageSends: ["packages", "current"]}),
  1753. smalltalk.Environment);
  1754. smalltalk.addMethod(
  1755. smalltalk.method({
  1756. selector: "registerErrorHandler:",
  1757. fn: function (anErrorHandler){
  1758. var self=this;
  1759. function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  1760. return smalltalk.withContext(function($ctx1) {
  1761. _st($ErrorHandler())._setCurrent_(anErrorHandler);
  1762. return self}, function($ctx1) {$ctx1.fill(self,"registerErrorHandler:",{anErrorHandler:anErrorHandler},smalltalk.Environment)})},
  1763. messageSends: ["setCurrent:"]}),
  1764. smalltalk.Environment);
  1765. smalltalk.addMethod(
  1766. smalltalk.method({
  1767. selector: "registerInspector:",
  1768. fn: function (anInspector){
  1769. var self=this;
  1770. function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
  1771. return smalltalk.withContext(function($ctx1) {
  1772. _st($InspectorHandler())._register_(anInspector);
  1773. return self}, function($ctx1) {$ctx1.fill(self,"registerInspector:",{anInspector:anInspector},smalltalk.Environment)})},
  1774. messageSends: ["register:"]}),
  1775. smalltalk.Environment);
  1776. smalltalk.addMethod(
  1777. smalltalk.method({
  1778. selector: "registerProgressHandler:",
  1779. fn: function (aProgressHandler){
  1780. var self=this;
  1781. function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
  1782. return smalltalk.withContext(function($ctx1) {
  1783. _st($ProgressHandler())._setCurrent_(aProgressHandler);
  1784. return self}, function($ctx1) {$ctx1.fill(self,"registerProgressHandler:",{aProgressHandler:aProgressHandler},smalltalk.Environment)})},
  1785. messageSends: ["setCurrent:"]}),
  1786. smalltalk.Environment);
  1787. smalltalk.addMethod(
  1788. smalltalk.method({
  1789. selector: "removeClass:",
  1790. fn: function (aClass){
  1791. var self=this;
  1792. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1793. return smalltalk.withContext(function($ctx1) {
  1794. _st(_st($Smalltalk())._current())._removeClass_(aClass);
  1795. return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.Environment)})},
  1796. messageSends: ["removeClass:", "current"]}),
  1797. smalltalk.Environment);
  1798. smalltalk.addMethod(
  1799. smalltalk.method({
  1800. selector: "removeMethod:",
  1801. fn: function (aMethod){
  1802. var self=this;
  1803. return smalltalk.withContext(function($ctx1) {
  1804. _st(_st(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
  1805. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod:",{aMethod:aMethod},smalltalk.Environment)})},
  1806. messageSends: ["removeCompiledMethod:", "methodClass"]}),
  1807. smalltalk.Environment);
  1808. smalltalk.addMethod(
  1809. smalltalk.method({
  1810. selector: "removeProtocol:from:",
  1811. fn: function (aString,aClass){
  1812. var self=this;
  1813. return smalltalk.withContext(function($ctx1) {
  1814. _st(_st(_st(aClass)._methods())._select_((function(each){
  1815. return smalltalk.withContext(function($ctx2) {
  1816. return _st(_st(each)._protocol()).__eq(aString);
  1817. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
  1818. return smalltalk.withContext(function($ctx2) {
  1819. return _st(aClass)._removeCompiledMethod_(each);
  1820. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1821. return self}, function($ctx1) {$ctx1.fill(self,"removeProtocol:from:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
  1822. messageSends: ["do:", "removeCompiledMethod:", "select:", "=", "protocol", "methods"]}),
  1823. smalltalk.Environment);
  1824. smalltalk.addMethod(
  1825. smalltalk.method({
  1826. selector: "renameClass:to:",
  1827. fn: function (aClass,aClassName){
  1828. var self=this;
  1829. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1830. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1831. return smalltalk.withContext(function($ctx1) {
  1832. var $1;
  1833. $1=_st(_st($Smalltalk())._current())._at_(aClassName);
  1834. if(($receiver = $1) == nil || $receiver == undefined){
  1835. $1;
  1836. } else {
  1837. self._error_(_st("A class named ".__comma(aClassName)).__comma(" already exists"));
  1838. };
  1839. _st(_st($ClassBuilder())._new())._renameClass_to_(aClass,aClassName);
  1840. return self}, function($ctx1) {$ctx1.fill(self,"renameClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.Environment)})},
  1841. messageSends: ["ifNotNil:", "error:", ",", "at:", "current", "renameClass:to:", "new"]}),
  1842. smalltalk.Environment);
  1843. smalltalk.addMethod(
  1844. smalltalk.method({
  1845. selector: "renameProtocol:to:in:",
  1846. fn: function (aString,anotherString,aClass){
  1847. var self=this;
  1848. return smalltalk.withContext(function($ctx1) {
  1849. _st(_st(_st(aClass)._methods())._select_((function(each){
  1850. return smalltalk.withContext(function($ctx2) {
  1851. return _st(_st(each)._protocol()).__eq(aString);
  1852. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
  1853. return smalltalk.withContext(function($ctx2) {
  1854. return _st(each)._protocol_(anotherString);
  1855. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1856. return self}, function($ctx1) {$ctx1.fill(self,"renameProtocol:to:in:",{aString:aString,anotherString:anotherString,aClass:aClass},smalltalk.Environment)})},
  1857. messageSends: ["do:", "protocol:", "select:", "=", "protocol", "methods"]}),
  1858. smalltalk.Environment);
  1859. smalltalk.addMethod(
  1860. smalltalk.method({
  1861. selector: "setClassCommentOf:to:",
  1862. fn: function (aClass,aString){
  1863. var self=this;
  1864. return smalltalk.withContext(function($ctx1) {
  1865. _st(aClass)._comment_(aString);
  1866. return self}, function($ctx1) {$ctx1.fill(self,"setClassCommentOf:to:",{aClass:aClass,aString:aString},smalltalk.Environment)})},
  1867. messageSends: ["comment:"]}),
  1868. smalltalk.Environment);
  1869. smalltalk.addMethod(
  1870. smalltalk.method({
  1871. selector: "systemAnnouncer",
  1872. fn: function (){
  1873. var self=this;
  1874. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1875. return smalltalk.withContext(function($ctx1) {
  1876. var $1;
  1877. $1=_st(_st(_st($Smalltalk())._current())._at_("SystemAnnouncer"))._current();
  1878. return $1;
  1879. }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},smalltalk.Environment)})},
  1880. messageSends: ["current", "at:"]}),
  1881. smalltalk.Environment);
  1882. smalltalk.addClass('InspectorHandler', smalltalk.Object, [], 'Kernel-Objects');
  1883. smalltalk.InspectorHandler.klass.iVarNames = ['inspector'];
  1884. smalltalk.addMethod(
  1885. smalltalk.method({
  1886. selector: "inspect:",
  1887. fn: function (anObject){
  1888. var self=this;
  1889. return smalltalk.withContext(function($ctx1) {
  1890. var $1;
  1891. $1=_st(self._inspector())._inspect_(anObject);
  1892. return $1;
  1893. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.InspectorHandler.klass)})},
  1894. messageSends: ["inspect:", "inspector"]}),
  1895. smalltalk.InspectorHandler.klass);
  1896. smalltalk.addMethod(
  1897. smalltalk.method({
  1898. selector: "inspector",
  1899. fn: function (){
  1900. var self=this;
  1901. function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
  1902. return smalltalk.withContext(function($ctx1) {
  1903. var $2,$1;
  1904. $2=self["@inspector"];
  1905. if(($receiver = $2) == nil || $receiver == undefined){
  1906. self["@inspector"]=$Transcript();
  1907. $1=self["@inspector"];
  1908. } else {
  1909. $1=$2;
  1910. };
  1911. return $1;
  1912. }, function($ctx1) {$ctx1.fill(self,"inspector",{},smalltalk.InspectorHandler.klass)})},
  1913. messageSends: ["ifNil:"]}),
  1914. smalltalk.InspectorHandler.klass);
  1915. smalltalk.addMethod(
  1916. smalltalk.method({
  1917. selector: "register:",
  1918. fn: function (anInspector){
  1919. var self=this;
  1920. return smalltalk.withContext(function($ctx1) {
  1921. self["@inspector"]=anInspector;
  1922. return self}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.InspectorHandler.klass)})},
  1923. messageSends: []}),
  1924. smalltalk.InspectorHandler.klass);
  1925. smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Objects');
  1926. smalltalk.addMethod(
  1927. smalltalk.method({
  1928. selector: "addObjectVariablesTo:",
  1929. fn: function (aDictionary){
  1930. var self=this;
  1931. return smalltalk.withContext(function($ctx1) {
  1932. for(var i in self['@jsObject']) {
  1933. aDictionary._at_put_(i, self['@jsObject'][i]);
  1934. }
  1935. ;
  1936. return self}, function($ctx1) {$ctx1.fill(self,"addObjectVariablesTo:",{aDictionary:aDictionary},smalltalk.JSObjectProxy)})},
  1937. messageSends: []}),
  1938. smalltalk.JSObjectProxy);
  1939. smalltalk.addMethod(
  1940. smalltalk.method({
  1941. selector: "at:",
  1942. fn: function (aString){
  1943. var self=this;
  1944. return smalltalk.withContext(function($ctx1) {
  1945. return self['@jsObject'][aString];
  1946. return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.JSObjectProxy)})},
  1947. messageSends: []}),
  1948. smalltalk.JSObjectProxy);
  1949. smalltalk.addMethod(
  1950. smalltalk.method({
  1951. selector: "at:ifAbsent:",
  1952. fn: function (aString,aBlock){
  1953. var self=this;
  1954. return smalltalk.withContext(function($ctx1) {
  1955. var obj = self['@jsObject'];
  1956. return aString in obj ? obj[aString] : aBlock._value();
  1957. ;
  1958. return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
  1959. messageSends: []}),
  1960. smalltalk.JSObjectProxy);
  1961. smalltalk.addMethod(
  1962. smalltalk.method({
  1963. selector: "at:ifPresent:",
  1964. fn: function (aString,aBlock){
  1965. var self=this;
  1966. return smalltalk.withContext(function($ctx1) {
  1967. var obj = self['@jsObject'];
  1968. return aString in obj ? aBlock._value_(obj[aString]) : nil;
  1969. ;
  1970. return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
  1971. messageSends: []}),
  1972. smalltalk.JSObjectProxy);
  1973. smalltalk.addMethod(
  1974. smalltalk.method({
  1975. selector: "at:ifPresent:ifAbsent:",
  1976. fn: function (aString,aBlock,anotherBlock){
  1977. var self=this;
  1978. return smalltalk.withContext(function($ctx1) {
  1979. var obj = self['@jsObject'];
  1980. return aString in obj ? aBlock._value_(obj[aString]) : anotherBlock._value();
  1981. ;
  1982. return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.JSObjectProxy)})},
  1983. messageSends: []}),
  1984. smalltalk.JSObjectProxy);
  1985. smalltalk.addMethod(
  1986. smalltalk.method({
  1987. selector: "at:put:",
  1988. fn: function (aString,anObject){
  1989. var self=this;
  1990. return smalltalk.withContext(function($ctx1) {
  1991. self['@jsObject'][aString] = anObject;
  1992. return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{aString:aString,anObject:anObject},smalltalk.JSObjectProxy)})},
  1993. messageSends: []}),
  1994. smalltalk.JSObjectProxy);
  1995. smalltalk.addMethod(
  1996. smalltalk.method({
  1997. selector: "doesNotUnderstand:",
  1998. fn: function (aMessage){
  1999. var self=this;
  2000. return smalltalk.withContext(function($ctx1) {
  2001. var $2,$1;
  2002. $2=self._lookupProperty_(_st(_st(aMessage)._selector())._asJavaScriptSelector());
  2003. if(($receiver = $2) == nil || $receiver == undefined){
  2004. $1=smalltalk.Object.fn.prototype._doesNotUnderstand_.apply(_st(self), [aMessage]);
  2005. } else {
  2006. var jsSelector;
  2007. jsSelector=$receiver;
  2008. $1=self._forwardMessage_withArguments_(jsSelector,_st(aMessage)._arguments());
  2009. };
  2010. return $1;
  2011. }, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage},smalltalk.JSObjectProxy)})},
  2012. messageSends: ["ifNil:ifNotNil:", "doesNotUnderstand:", "forwardMessage:withArguments:", "arguments", "lookupProperty:", "asJavaScriptSelector", "selector"]}),
  2013. smalltalk.JSObjectProxy);
  2014. smalltalk.addMethod(
  2015. smalltalk.method({
  2016. selector: "forwardMessage:withArguments:",
  2017. fn: function (aString,anArray){
  2018. var self=this;
  2019. return smalltalk.withContext(function($ctx1) {
  2020. return smalltalk.send(self._jsObject(), aString, anArray);
  2021. ;
  2022. return self}, function($ctx1) {$ctx1.fill(self,"forwardMessage:withArguments:",{aString:aString,anArray:anArray},smalltalk.JSObjectProxy)})},
  2023. messageSends: []}),
  2024. smalltalk.JSObjectProxy);
  2025. smalltalk.addMethod(
  2026. smalltalk.method({
  2027. selector: "inspectOn:",
  2028. fn: function (anInspector){
  2029. var self=this;
  2030. var variables;
  2031. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  2032. return smalltalk.withContext(function($ctx1) {
  2033. variables=_st($Dictionary())._new();
  2034. _st(variables)._at_put_("#self",self._jsObject());
  2035. _st(anInspector)._setLabel_(self._printString());
  2036. self._addObjectVariablesTo_(variables);
  2037. _st(anInspector)._setVariables_(variables);
  2038. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.JSObjectProxy)})},
  2039. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "addObjectVariablesTo:", "setVariables:"]}),
  2040. smalltalk.JSObjectProxy);
  2041. smalltalk.addMethod(
  2042. smalltalk.method({
  2043. selector: "jsObject",
  2044. fn: function (){
  2045. var self=this;
  2046. return smalltalk.withContext(function($ctx1) {
  2047. var $1;
  2048. $1=self["@jsObject"];
  2049. return $1;
  2050. }, function($ctx1) {$ctx1.fill(self,"jsObject",{},smalltalk.JSObjectProxy)})},
  2051. messageSends: []}),
  2052. smalltalk.JSObjectProxy);
  2053. smalltalk.addMethod(
  2054. smalltalk.method({
  2055. selector: "jsObject:",
  2056. fn: function (aJSObject){
  2057. var self=this;
  2058. return smalltalk.withContext(function($ctx1) {
  2059. self["@jsObject"]=aJSObject;
  2060. return self}, function($ctx1) {$ctx1.fill(self,"jsObject:",{aJSObject:aJSObject},smalltalk.JSObjectProxy)})},
  2061. messageSends: []}),
  2062. smalltalk.JSObjectProxy);
  2063. smalltalk.addMethod(
  2064. smalltalk.method({
  2065. selector: "keysAndValuesDo:",
  2066. fn: function (aBlock){
  2067. var self=this;
  2068. return smalltalk.withContext(function($ctx1) {
  2069. var o = self['@jsObject'];
  2070. for(var i in o) {
  2071. aBlock._value_value_(i, o[i]);
  2072. }
  2073. ;
  2074. return self}, function($ctx1) {$ctx1.fill(self,"keysAndValuesDo:",{aBlock:aBlock},smalltalk.JSObjectProxy)})},
  2075. messageSends: []}),
  2076. smalltalk.JSObjectProxy);
  2077. smalltalk.addMethod(
  2078. smalltalk.method({
  2079. selector: "lookupProperty:",
  2080. fn: function (aString){
  2081. var self=this;
  2082. return smalltalk.withContext(function($ctx1) {
  2083. return aString in self._jsObject() ? aString : nil;
  2084. return self}, function($ctx1) {$ctx1.fill(self,"lookupProperty:",{aString:aString},smalltalk.JSObjectProxy)})},
  2085. messageSends: []}),
  2086. smalltalk.JSObjectProxy);
  2087. smalltalk.addMethod(
  2088. smalltalk.method({
  2089. selector: "printOn:",
  2090. fn: function (aStream){
  2091. var self=this;
  2092. return smalltalk.withContext(function($ctx1) {
  2093. _st(aStream)._nextPutAll_(_st(self._jsObject())._toString());
  2094. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.JSObjectProxy)})},
  2095. messageSends: ["nextPutAll:", "toString", "jsObject"]}),
  2096. smalltalk.JSObjectProxy);
  2097. smalltalk.addMethod(
  2098. smalltalk.method({
  2099. selector: "value",
  2100. fn: function (){
  2101. var self=this;
  2102. return smalltalk.withContext(function($ctx1) {
  2103. var $1;
  2104. $1=self._at_ifAbsent_("value",(function(){
  2105. return smalltalk.withContext(function($ctx2) {
  2106. return smalltalk.Object.fn.prototype._value.apply(_st(self), []);
  2107. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2108. return $1;
  2109. }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.JSObjectProxy)})},
  2110. messageSends: ["at:ifAbsent:", "value"]}),
  2111. smalltalk.JSObjectProxy);
  2112. smalltalk.addMethod(
  2113. smalltalk.method({
  2114. selector: "on:",
  2115. fn: function (aJSObject){
  2116. var self=this;
  2117. return smalltalk.withContext(function($ctx1) {
  2118. var $2,$3,$1;
  2119. $2=self._new();
  2120. _st($2)._jsObject_(aJSObject);
  2121. $3=_st($2)._yourself();
  2122. $1=$3;
  2123. return $1;
  2124. }, function($ctx1) {$ctx1.fill(self,"on:",{aJSObject:aJSObject},smalltalk.JSObjectProxy.klass)})},
  2125. messageSends: ["jsObject:", "new", "yourself"]}),
  2126. smalltalk.JSObjectProxy.klass);
  2127. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel-Objects');
  2128. smalltalk.addMethod(
  2129. smalltalk.method({
  2130. selector: "&",
  2131. fn: function (aNumber){
  2132. var self=this;
  2133. return smalltalk.withContext(function($ctx1) {
  2134. return self & aNumber;
  2135. return self}, function($ctx1) {$ctx1.fill(self,"&",{aNumber:aNumber},smalltalk.Number)})},
  2136. messageSends: []}),
  2137. smalltalk.Number);
  2138. smalltalk.addMethod(
  2139. smalltalk.method({
  2140. selector: "*",
  2141. fn: function (aNumber){
  2142. var self=this;
  2143. return smalltalk.withContext(function($ctx1) {
  2144. return self * aNumber;
  2145. return self}, function($ctx1) {$ctx1.fill(self,"*",{aNumber:aNumber},smalltalk.Number)})},
  2146. messageSends: []}),
  2147. smalltalk.Number);
  2148. smalltalk.addMethod(
  2149. smalltalk.method({
  2150. selector: "+",
  2151. fn: function (aNumber){
  2152. var self=this;
  2153. return smalltalk.withContext(function($ctx1) {
  2154. return self + aNumber;
  2155. return self}, function($ctx1) {$ctx1.fill(self,"+",{aNumber:aNumber},smalltalk.Number)})},
  2156. messageSends: []}),
  2157. smalltalk.Number);
  2158. smalltalk.addMethod(
  2159. smalltalk.method({
  2160. selector: "-",
  2161. fn: function (aNumber){
  2162. var self=this;
  2163. return smalltalk.withContext(function($ctx1) {
  2164. return self - aNumber;
  2165. return self}, function($ctx1) {$ctx1.fill(self,"-",{aNumber:aNumber},smalltalk.Number)})},
  2166. messageSends: []}),
  2167. smalltalk.Number);
  2168. smalltalk.addMethod(
  2169. smalltalk.method({
  2170. selector: "/",
  2171. fn: function (aNumber){
  2172. var self=this;
  2173. return smalltalk.withContext(function($ctx1) {
  2174. return self / aNumber;
  2175. return self}, function($ctx1) {$ctx1.fill(self,"/",{aNumber:aNumber},smalltalk.Number)})},
  2176. messageSends: []}),
  2177. smalltalk.Number);
  2178. smalltalk.addMethod(
  2179. smalltalk.method({
  2180. selector: "<",
  2181. fn: function (aNumber){
  2182. var self=this;
  2183. return smalltalk.withContext(function($ctx1) {
  2184. return self < aNumber;
  2185. return self}, function($ctx1) {$ctx1.fill(self,"<",{aNumber:aNumber},smalltalk.Number)})},
  2186. messageSends: []}),
  2187. smalltalk.Number);
  2188. smalltalk.addMethod(
  2189. smalltalk.method({
  2190. selector: "<=",
  2191. fn: function (aNumber){
  2192. var self=this;
  2193. return smalltalk.withContext(function($ctx1) {
  2194. return self <= aNumber;
  2195. return self}, function($ctx1) {$ctx1.fill(self,"<=",{aNumber:aNumber},smalltalk.Number)})},
  2196. messageSends: []}),
  2197. smalltalk.Number);
  2198. smalltalk.addMethod(
  2199. smalltalk.method({
  2200. selector: "=",
  2201. fn: function (aNumber){
  2202. var self=this;
  2203. return smalltalk.withContext(function($ctx1) {
  2204. if(! aNumber._isNumber || ! aNumber._isNumber()) {
  2205. return false;
  2206. }
  2207. return Number(self) == aNumber
  2208. ;
  2209. return self}, function($ctx1) {$ctx1.fill(self,"=",{aNumber:aNumber},smalltalk.Number)})},
  2210. messageSends: []}),
  2211. smalltalk.Number);
  2212. smalltalk.addMethod(
  2213. smalltalk.method({
  2214. selector: ">",
  2215. fn: function (aNumber){
  2216. var self=this;
  2217. return smalltalk.withContext(function($ctx1) {
  2218. return self > aNumber;
  2219. return self}, function($ctx1) {$ctx1.fill(self,">",{aNumber:aNumber},smalltalk.Number)})},
  2220. messageSends: []}),
  2221. smalltalk.Number);
  2222. smalltalk.addMethod(
  2223. smalltalk.method({
  2224. selector: ">=",
  2225. fn: function (aNumber){
  2226. var self=this;
  2227. return smalltalk.withContext(function($ctx1) {
  2228. return self >= aNumber;
  2229. return self}, function($ctx1) {$ctx1.fill(self,">=",{aNumber:aNumber},smalltalk.Number)})},
  2230. messageSends: []}),
  2231. smalltalk.Number);
  2232. smalltalk.addMethod(
  2233. smalltalk.method({
  2234. selector: "@",
  2235. fn: function (aNumber){
  2236. var self=this;
  2237. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2238. return smalltalk.withContext(function($ctx1) {
  2239. var $1;
  2240. $1=_st($Point())._x_y_(self,aNumber);
  2241. return $1;
  2242. }, function($ctx1) {$ctx1.fill(self,"@",{aNumber:aNumber},smalltalk.Number)})},
  2243. messageSends: ["x:y:"]}),
  2244. smalltalk.Number);
  2245. smalltalk.addMethod(
  2246. smalltalk.method({
  2247. selector: "\x5c\x5c",
  2248. fn: function (aNumber){
  2249. var self=this;
  2250. return smalltalk.withContext(function($ctx1) {
  2251. return self % aNumber;
  2252. return self}, function($ctx1) {$ctx1.fill(self,"\x5c\x5c",{aNumber:aNumber},smalltalk.Number)})},
  2253. messageSends: []}),
  2254. smalltalk.Number);
  2255. smalltalk.addMethod(
  2256. smalltalk.method({
  2257. selector: "abs",
  2258. fn: function (){
  2259. var self=this;
  2260. return smalltalk.withContext(function($ctx1) {
  2261. return Math.abs(self);;
  2262. return self}, function($ctx1) {$ctx1.fill(self,"abs",{},smalltalk.Number)})},
  2263. messageSends: []}),
  2264. smalltalk.Number);
  2265. smalltalk.addMethod(
  2266. smalltalk.method({
  2267. selector: "asJSON",
  2268. fn: function (){
  2269. var self=this;
  2270. return smalltalk.withContext(function($ctx1) {
  2271. var $1;
  2272. $1=self;
  2273. return $1;
  2274. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Number)})},
  2275. messageSends: []}),
  2276. smalltalk.Number);
  2277. smalltalk.addMethod(
  2278. smalltalk.method({
  2279. selector: "asJavascript",
  2280. fn: function (){
  2281. var self=this;
  2282. return smalltalk.withContext(function($ctx1) {
  2283. var $1;
  2284. $1=_st("(".__comma(self._printString())).__comma(")");
  2285. return $1;
  2286. }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Number)})},
  2287. messageSends: [",", "printString"]}),
  2288. smalltalk.Number);
  2289. smalltalk.addMethod(
  2290. smalltalk.method({
  2291. selector: "asPoint",
  2292. fn: function (){
  2293. var self=this;
  2294. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2295. return smalltalk.withContext(function($ctx1) {
  2296. var $1;
  2297. $1=_st($Point())._x_y_(self,self);
  2298. return $1;
  2299. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Number)})},
  2300. messageSends: ["x:y:"]}),
  2301. smalltalk.Number);
  2302. smalltalk.addMethod(
  2303. smalltalk.method({
  2304. selector: "asString",
  2305. fn: function (){
  2306. var self=this;
  2307. return smalltalk.withContext(function($ctx1) {
  2308. return String(self) ;
  2309. return self}, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Number)})},
  2310. messageSends: []}),
  2311. smalltalk.Number);
  2312. smalltalk.addMethod(
  2313. smalltalk.method({
  2314. selector: "atRandom",
  2315. fn: function (){
  2316. var self=this;
  2317. function $Random(){return smalltalk.Random||(typeof Random=="undefined"?nil:Random)}
  2318. return smalltalk.withContext(function($ctx1) {
  2319. var $1;
  2320. $1=_st(_st(_st(_st(_st($Random())._new())._next()).__star(self))._truncated()).__plus((1));
  2321. return $1;
  2322. }, function($ctx1) {$ctx1.fill(self,"atRandom",{},smalltalk.Number)})},
  2323. messageSends: ["+", "truncated", "*", "next", "new"]}),
  2324. smalltalk.Number);
  2325. smalltalk.addMethod(
  2326. smalltalk.method({
  2327. selector: "copy",
  2328. fn: function (){
  2329. var self=this;
  2330. return smalltalk.withContext(function($ctx1) {
  2331. var $1;
  2332. $1=self;
  2333. return $1;
  2334. }, function($ctx1) {$ctx1.fill(self,"copy",{},smalltalk.Number)})},
  2335. messageSends: []}),
  2336. smalltalk.Number);
  2337. smalltalk.addMethod(
  2338. smalltalk.method({
  2339. selector: "deepCopy",
  2340. fn: function (){
  2341. var self=this;
  2342. return smalltalk.withContext(function($ctx1) {
  2343. var $1;
  2344. $1=self._copy();
  2345. return $1;
  2346. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Number)})},
  2347. messageSends: ["copy"]}),
  2348. smalltalk.Number);
  2349. smalltalk.addMethod(
  2350. smalltalk.method({
  2351. selector: "even",
  2352. fn: function (){
  2353. var self=this;
  2354. return smalltalk.withContext(function($ctx1) {
  2355. var $1;
  2356. $1=(0).__eq(self.__backslash_backslash((2)));
  2357. return $1;
  2358. }, function($ctx1) {$ctx1.fill(self,"even",{},smalltalk.Number)})},
  2359. messageSends: ["=", "\x5c\x5c"]}),
  2360. smalltalk.Number);
  2361. smalltalk.addMethod(
  2362. smalltalk.method({
  2363. selector: "identityHash",
  2364. fn: function (){
  2365. var self=this;
  2366. return smalltalk.withContext(function($ctx1) {
  2367. var $1;
  2368. $1=_st(self._asString()).__comma("n");
  2369. return $1;
  2370. }, function($ctx1) {$ctx1.fill(self,"identityHash",{},smalltalk.Number)})},
  2371. messageSends: [",", "asString"]}),
  2372. smalltalk.Number);
  2373. smalltalk.addMethod(
  2374. smalltalk.method({
  2375. selector: "isImmutable",
  2376. fn: function (){
  2377. var self=this;
  2378. return smalltalk.withContext(function($ctx1) {
  2379. return true;
  2380. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.Number)})},
  2381. messageSends: []}),
  2382. smalltalk.Number);
  2383. smalltalk.addMethod(
  2384. smalltalk.method({
  2385. selector: "isNumber",
  2386. fn: function (){
  2387. var self=this;
  2388. return smalltalk.withContext(function($ctx1) {
  2389. return true;
  2390. }, function($ctx1) {$ctx1.fill(self,"isNumber",{},smalltalk.Number)})},
  2391. messageSends: []}),
  2392. smalltalk.Number);
  2393. smalltalk.addMethod(
  2394. smalltalk.method({
  2395. selector: "isZero",
  2396. fn: function (){
  2397. var self=this;
  2398. return smalltalk.withContext(function($ctx1) {
  2399. var $1;
  2400. $1=self.__eq((0));
  2401. return $1;
  2402. }, function($ctx1) {$ctx1.fill(self,"isZero",{},smalltalk.Number)})},
  2403. messageSends: ["="]}),
  2404. smalltalk.Number);
  2405. smalltalk.addMethod(
  2406. smalltalk.method({
  2407. selector: "max:",
  2408. fn: function (aNumber){
  2409. var self=this;
  2410. return smalltalk.withContext(function($ctx1) {
  2411. return Math.max(self, aNumber);;
  2412. return self}, function($ctx1) {$ctx1.fill(self,"max:",{aNumber:aNumber},smalltalk.Number)})},
  2413. messageSends: []}),
  2414. smalltalk.Number);
  2415. smalltalk.addMethod(
  2416. smalltalk.method({
  2417. selector: "min:",
  2418. fn: function (aNumber){
  2419. var self=this;
  2420. return smalltalk.withContext(function($ctx1) {
  2421. return Math.min(self, aNumber);;
  2422. return self}, function($ctx1) {$ctx1.fill(self,"min:",{aNumber:aNumber},smalltalk.Number)})},
  2423. messageSends: []}),
  2424. smalltalk.Number);
  2425. smalltalk.addMethod(
  2426. smalltalk.method({
  2427. selector: "negated",
  2428. fn: function (){
  2429. var self=this;
  2430. return smalltalk.withContext(function($ctx1) {
  2431. var $1;
  2432. $1=(0).__minus(self);
  2433. return $1;
  2434. }, function($ctx1) {$ctx1.fill(self,"negated",{},smalltalk.Number)})},
  2435. messageSends: ["-"]}),
  2436. smalltalk.Number);
  2437. smalltalk.addMethod(
  2438. smalltalk.method({
  2439. selector: "negative",
  2440. fn: function (){
  2441. var self=this;
  2442. return smalltalk.withContext(function($ctx1) {
  2443. var $1;
  2444. $1=self.__lt((0));
  2445. return $1;
  2446. }, function($ctx1) {$ctx1.fill(self,"negative",{},smalltalk.Number)})},
  2447. messageSends: ["<"]}),
  2448. smalltalk.Number);
  2449. smalltalk.addMethod(
  2450. smalltalk.method({
  2451. selector: "odd",
  2452. fn: function (){
  2453. var self=this;
  2454. return smalltalk.withContext(function($ctx1) {
  2455. var $1;
  2456. $1=_st(self._even())._not();
  2457. return $1;
  2458. }, function($ctx1) {$ctx1.fill(self,"odd",{},smalltalk.Number)})},
  2459. messageSends: ["not", "even"]}),
  2460. smalltalk.Number);
  2461. smalltalk.addMethod(
  2462. smalltalk.method({
  2463. selector: "positive",
  2464. fn: function (){
  2465. var self=this;
  2466. return smalltalk.withContext(function($ctx1) {
  2467. var $1;
  2468. $1=self.__gt_eq((0));
  2469. return $1;
  2470. }, function($ctx1) {$ctx1.fill(self,"positive",{},smalltalk.Number)})},
  2471. messageSends: [">="]}),
  2472. smalltalk.Number);
  2473. smalltalk.addMethod(
  2474. smalltalk.method({
  2475. selector: "printOn:",
  2476. fn: function (aStream){
  2477. var self=this;
  2478. return smalltalk.withContext(function($ctx1) {
  2479. _st(aStream)._nextPutAll_(self._asString());
  2480. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Number)})},
  2481. messageSends: ["nextPutAll:", "asString"]}),
  2482. smalltalk.Number);
  2483. smalltalk.addMethod(
  2484. smalltalk.method({
  2485. selector: "printShowingDecimalPlaces:",
  2486. fn: function (placesDesired){
  2487. var self=this;
  2488. return smalltalk.withContext(function($ctx1) {
  2489. return self.toFixed(placesDesired);
  2490. return self}, function($ctx1) {$ctx1.fill(self,"printShowingDecimalPlaces:",{placesDesired:placesDesired},smalltalk.Number)})},
  2491. messageSends: []}),
  2492. smalltalk.Number);
  2493. smalltalk.addMethod(
  2494. smalltalk.method({
  2495. selector: "rounded",
  2496. fn: function (){
  2497. var self=this;
  2498. return smalltalk.withContext(function($ctx1) {
  2499. return Math.round(self);;
  2500. return self}, function($ctx1) {$ctx1.fill(self,"rounded",{},smalltalk.Number)})},
  2501. messageSends: []}),
  2502. smalltalk.Number);
  2503. smalltalk.addMethod(
  2504. smalltalk.method({
  2505. selector: "sqrt",
  2506. fn: function (){
  2507. var self=this;
  2508. return smalltalk.withContext(function($ctx1) {
  2509. return Math.sqrt(self);
  2510. return self}, function($ctx1) {$ctx1.fill(self,"sqrt",{},smalltalk.Number)})},
  2511. messageSends: []}),
  2512. smalltalk.Number);
  2513. smalltalk.addMethod(
  2514. smalltalk.method({
  2515. selector: "squared",
  2516. fn: function (){
  2517. var self=this;
  2518. return smalltalk.withContext(function($ctx1) {
  2519. var $1;
  2520. $1=self.__star(self);
  2521. return $1;
  2522. }, function($ctx1) {$ctx1.fill(self,"squared",{},smalltalk.Number)})},
  2523. messageSends: ["*"]}),
  2524. smalltalk.Number);
  2525. smalltalk.addMethod(
  2526. smalltalk.method({
  2527. selector: "timesRepeat:",
  2528. fn: function (aBlock){
  2529. var self=this;
  2530. var count;
  2531. return smalltalk.withContext(function($ctx1) {
  2532. count=(1);
  2533. _st((function(){
  2534. return smalltalk.withContext(function($ctx2) {
  2535. return _st(count).__gt(self);
  2536. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
  2537. return smalltalk.withContext(function($ctx2) {
  2538. _st(aBlock)._value();
  2539. count=_st(count).__plus((1));
  2540. return count;
  2541. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2542. return self}, function($ctx1) {$ctx1.fill(self,"timesRepeat:",{aBlock:aBlock,count:count},smalltalk.Number)})},
  2543. messageSends: ["whileFalse:", "value", "+", ">"]}),
  2544. smalltalk.Number);
  2545. smalltalk.addMethod(
  2546. smalltalk.method({
  2547. selector: "to:",
  2548. fn: function (aNumber){
  2549. var self=this;
  2550. var array,first,last,count;
  2551. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2552. return smalltalk.withContext(function($ctx1) {
  2553. var $1;
  2554. first=self._truncated();
  2555. last=_st(_st(aNumber)._truncated()).__plus((1));
  2556. count=(1);
  2557. array=_st($Array())._new();
  2558. _st(_st(last).__minus(first))._timesRepeat_((function(){
  2559. return smalltalk.withContext(function($ctx2) {
  2560. _st(array)._at_put_(count,first);
  2561. count=_st(count).__plus((1));
  2562. count;
  2563. first=_st(first).__plus((1));
  2564. return first;
  2565. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2566. $1=array;
  2567. return $1;
  2568. }, function($ctx1) {$ctx1.fill(self,"to:",{aNumber:aNumber,array:array,first:first,last:last,count:count},smalltalk.Number)})},
  2569. messageSends: ["truncated", "+", "new", "timesRepeat:", "at:put:", "-"]}),
  2570. smalltalk.Number);
  2571. smalltalk.addMethod(
  2572. smalltalk.method({
  2573. selector: "to:by:",
  2574. fn: function (stop,step){
  2575. var self=this;
  2576. var array,value,pos;
  2577. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2578. return smalltalk.withContext(function($ctx1) {
  2579. var $1,$2,$3;
  2580. value=self;
  2581. array=_st($Array())._new();
  2582. pos=(1);
  2583. $1=_st(step).__eq((0));
  2584. if(smalltalk.assert($1)){
  2585. self._error_("step must be non-zero");
  2586. };
  2587. $2=_st(step).__lt((0));
  2588. if(smalltalk.assert($2)){
  2589. _st((function(){
  2590. return smalltalk.withContext(function($ctx2) {
  2591. return _st(value).__gt_eq(stop);
  2592. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2593. return smalltalk.withContext(function($ctx2) {
  2594. _st(array)._at_put_(pos,value);
  2595. pos=_st(pos).__plus((1));
  2596. pos;
  2597. value=_st(value).__plus(step);
  2598. return value;
  2599. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2600. } else {
  2601. _st((function(){
  2602. return smalltalk.withContext(function($ctx2) {
  2603. return _st(value).__lt_eq(stop);
  2604. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2605. return smalltalk.withContext(function($ctx2) {
  2606. _st(array)._at_put_(pos,value);
  2607. pos=_st(pos).__plus((1));
  2608. pos;
  2609. value=_st(value).__plus(step);
  2610. return value;
  2611. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2612. };
  2613. $3=array;
  2614. return $3;
  2615. }, function($ctx1) {$ctx1.fill(self,"to:by:",{stop:stop,step:step,array:array,value:value,pos:pos},smalltalk.Number)})},
  2616. messageSends: ["new", "ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "at:put:", "+", ">=", "<=", "<"]}),
  2617. smalltalk.Number);
  2618. smalltalk.addMethod(
  2619. smalltalk.method({
  2620. selector: "to:by:do:",
  2621. fn: function (stop,step,aBlock){
  2622. var self=this;
  2623. var value;
  2624. return smalltalk.withContext(function($ctx1) {
  2625. var $1,$2;
  2626. value=self;
  2627. $1=_st(step).__eq((0));
  2628. if(smalltalk.assert($1)){
  2629. self._error_("step must be non-zero");
  2630. };
  2631. $2=_st(step).__lt((0));
  2632. if(smalltalk.assert($2)){
  2633. _st((function(){
  2634. return smalltalk.withContext(function($ctx2) {
  2635. return _st(value).__gt_eq(stop);
  2636. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2637. return smalltalk.withContext(function($ctx2) {
  2638. _st(aBlock)._value_(value);
  2639. value=_st(value).__plus(step);
  2640. return value;
  2641. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2642. } else {
  2643. _st((function(){
  2644. return smalltalk.withContext(function($ctx2) {
  2645. return _st(value).__lt_eq(stop);
  2646. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2647. return smalltalk.withContext(function($ctx2) {
  2648. _st(aBlock)._value_(value);
  2649. value=_st(value).__plus(step);
  2650. return value;
  2651. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2652. };
  2653. return self}, function($ctx1) {$ctx1.fill(self,"to:by:do:",{stop:stop,step:step,aBlock:aBlock,value:value},smalltalk.Number)})},
  2654. messageSends: ["ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "value:", "+", ">=", "<=", "<"]}),
  2655. smalltalk.Number);
  2656. smalltalk.addMethod(
  2657. smalltalk.method({
  2658. selector: "to:do:",
  2659. fn: function (stop,aBlock){
  2660. var self=this;
  2661. var nextValue;
  2662. return smalltalk.withContext(function($ctx1) {
  2663. nextValue=self;
  2664. _st((function(){
  2665. return smalltalk.withContext(function($ctx2) {
  2666. return _st(nextValue).__lt_eq(stop);
  2667. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2668. return smalltalk.withContext(function($ctx2) {
  2669. _st(aBlock)._value_(nextValue);
  2670. nextValue=_st(nextValue).__plus((1));
  2671. return nextValue;
  2672. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2673. return self}, function($ctx1) {$ctx1.fill(self,"to:do:",{stop:stop,aBlock:aBlock,nextValue:nextValue},smalltalk.Number)})},
  2674. messageSends: ["whileTrue:", "value:", "+", "<="]}),
  2675. smalltalk.Number);
  2676. smalltalk.addMethod(
  2677. smalltalk.method({
  2678. selector: "truncated",
  2679. fn: function (){
  2680. var self=this;
  2681. return smalltalk.withContext(function($ctx1) {
  2682. if(self >= 0) {
  2683. return Math.floor(self);
  2684. } else {
  2685. return Math.floor(self * (-1)) * (-1);
  2686. };
  2687. ;
  2688. return self}, function($ctx1) {$ctx1.fill(self,"truncated",{},smalltalk.Number)})},
  2689. messageSends: []}),
  2690. smalltalk.Number);
  2691. smalltalk.addMethod(
  2692. smalltalk.method({
  2693. selector: "|",
  2694. fn: function (aNumber){
  2695. var self=this;
  2696. return smalltalk.withContext(function($ctx1) {
  2697. return self | aNumber;
  2698. return self}, function($ctx1) {$ctx1.fill(self,"|",{aNumber:aNumber},smalltalk.Number)})},
  2699. messageSends: []}),
  2700. smalltalk.Number);
  2701. smalltalk.addMethod(
  2702. smalltalk.method({
  2703. selector: "heliosClass",
  2704. fn: function (){
  2705. var self=this;
  2706. return smalltalk.withContext(function($ctx1) {
  2707. return "magnitude";
  2708. }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Number.klass)})},
  2709. messageSends: []}),
  2710. smalltalk.Number.klass);
  2711. smalltalk.addMethod(
  2712. smalltalk.method({
  2713. selector: "pi",
  2714. fn: function (){
  2715. var self=this;
  2716. return smalltalk.withContext(function($ctx1) {
  2717. return Math.PI;
  2718. return self}, function($ctx1) {$ctx1.fill(self,"pi",{},smalltalk.Number.klass)})},
  2719. messageSends: []}),
  2720. smalltalk.Number.klass);
  2721. smalltalk.addClass('Organizer', smalltalk.Object, [], 'Kernel-Objects');
  2722. smalltalk.addMethod(
  2723. smalltalk.method({
  2724. selector: "addElement:",
  2725. fn: function (anObject){
  2726. var self=this;
  2727. return smalltalk.withContext(function($ctx1) {
  2728. self.elements.addElement(anObject);
  2729. return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{anObject:anObject},smalltalk.Organizer)})},
  2730. messageSends: []}),
  2731. smalltalk.Organizer);
  2732. smalltalk.addMethod(
  2733. smalltalk.method({
  2734. selector: "elements",
  2735. fn: function (){
  2736. var self=this;
  2737. return smalltalk.withContext(function($ctx1) {
  2738. var $1;
  2739. $1=_st(self._basicAt_("elements"))._copy();
  2740. return $1;
  2741. }, function($ctx1) {$ctx1.fill(self,"elements",{},smalltalk.Organizer)})},
  2742. messageSends: ["copy", "basicAt:"]}),
  2743. smalltalk.Organizer);
  2744. smalltalk.addMethod(
  2745. smalltalk.method({
  2746. selector: "removeElement:",
  2747. fn: function (anObject){
  2748. var self=this;
  2749. return smalltalk.withContext(function($ctx1) {
  2750. self.elements.removeElement(anObject);
  2751. return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{anObject:anObject},smalltalk.Organizer)})},
  2752. messageSends: []}),
  2753. smalltalk.Organizer);
  2754. smalltalk.addClass('ClassOrganizer', smalltalk.Organizer, [], 'Kernel-Objects');
  2755. smalltalk.addMethod(
  2756. smalltalk.method({
  2757. selector: "addElement:",
  2758. fn: function (aString){
  2759. var self=this;
  2760. function $ProtocolAdded(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
  2761. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  2762. return smalltalk.withContext(function($ctx1) {
  2763. var $1,$2;
  2764. smalltalk.Organizer.fn.prototype._addElement_.apply(_st(self), [aString]);
  2765. $1=_st($ProtocolAdded())._new();
  2766. _st($1)._protocol_(aString);
  2767. _st($1)._theClass_(self._theClass());
  2768. $2=_st($1)._yourself();
  2769. _st(_st($SystemAnnouncer())._current())._announce_($2);
  2770. return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{aString:aString},smalltalk.ClassOrganizer)})},
  2771. messageSends: ["addElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"]}),
  2772. smalltalk.ClassOrganizer);
  2773. smalltalk.addMethod(
  2774. smalltalk.method({
  2775. selector: "removeElement:",
  2776. fn: function (aString){
  2777. var self=this;
  2778. function $ProtocolRemoved(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
  2779. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  2780. return smalltalk.withContext(function($ctx1) {
  2781. var $1,$2;
  2782. smalltalk.Organizer.fn.prototype._removeElement_.apply(_st(self), [aString]);
  2783. $1=_st($ProtocolRemoved())._new();
  2784. _st($1)._protocol_(aString);
  2785. _st($1)._theClass_(self._theClass());
  2786. $2=_st($1)._yourself();
  2787. _st(_st($SystemAnnouncer())._current())._announce_($2);
  2788. return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{aString:aString},smalltalk.ClassOrganizer)})},
  2789. messageSends: ["removeElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"]}),
  2790. smalltalk.ClassOrganizer);
  2791. smalltalk.addMethod(
  2792. smalltalk.method({
  2793. selector: "theClass",
  2794. fn: function (){
  2795. var self=this;
  2796. return smalltalk.withContext(function($ctx1) {
  2797. return self.theClass ;
  2798. return self}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassOrganizer)})},
  2799. messageSends: []}),
  2800. smalltalk.ClassOrganizer);
  2801. smalltalk.addClass('PackageOrganizer', smalltalk.Organizer, [], 'Kernel-Objects');
  2802. smalltalk.addClass('Package', smalltalk.Object, ['commitPathJs', 'commitPathSt'], 'Kernel-Objects');
  2803. smalltalk.addMethod(
  2804. smalltalk.method({
  2805. selector: "classes",
  2806. fn: function (){
  2807. var self=this;
  2808. return smalltalk.withContext(function($ctx1) {
  2809. var $1;
  2810. $1=_st(self._organization())._elements();
  2811. return $1;
  2812. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Package)})},
  2813. messageSends: ["elements", "organization"]}),
  2814. smalltalk.Package);
  2815. smalltalk.addMethod(
  2816. smalltalk.method({
  2817. selector: "commitPathJs",
  2818. fn: function (){
  2819. var self=this;
  2820. return smalltalk.withContext(function($ctx1) {
  2821. var $2,$1;
  2822. $2=self["@commitPathJs"];
  2823. if(($receiver = $2) == nil || $receiver == undefined){
  2824. $1=_st(self._class())._defaultCommitPathJs();
  2825. } else {
  2826. $1=$2;
  2827. };
  2828. return $1;
  2829. }, function($ctx1) {$ctx1.fill(self,"commitPathJs",{},smalltalk.Package)})},
  2830. messageSends: ["ifNil:", "defaultCommitPathJs", "class"]}),
  2831. smalltalk.Package);
  2832. smalltalk.addMethod(
  2833. smalltalk.method({
  2834. selector: "commitPathJs:",
  2835. fn: function (aString){
  2836. var self=this;
  2837. return smalltalk.withContext(function($ctx1) {
  2838. self["@commitPathJs"]=aString;
  2839. return self}, function($ctx1) {$ctx1.fill(self,"commitPathJs:",{aString:aString},smalltalk.Package)})},
  2840. messageSends: []}),
  2841. smalltalk.Package);
  2842. smalltalk.addMethod(
  2843. smalltalk.method({
  2844. selector: "commitPathSt",
  2845. fn: function (){
  2846. var self=this;
  2847. return smalltalk.withContext(function($ctx1) {
  2848. var $2,$1;
  2849. $2=self["@commitPathSt"];
  2850. if(($receiver = $2) == nil || $receiver == undefined){
  2851. $1=_st(self._class())._defaultCommitPathSt();
  2852. } else {
  2853. $1=$2;
  2854. };
  2855. return $1;
  2856. }, function($ctx1) {$ctx1.fill(self,"commitPathSt",{},smalltalk.Package)})},
  2857. messageSends: ["ifNil:", "defaultCommitPathSt", "class"]}),
  2858. smalltalk.Package);
  2859. smalltalk.addMethod(
  2860. smalltalk.method({
  2861. selector: "commitPathSt:",
  2862. fn: function (aString){
  2863. var self=this;
  2864. return smalltalk.withContext(function($ctx1) {
  2865. self["@commitPathSt"]=aString;
  2866. return self}, function($ctx1) {$ctx1.fill(self,"commitPathSt:",{aString:aString},smalltalk.Package)})},
  2867. messageSends: []}),
  2868. smalltalk.Package);
  2869. smalltalk.addMethod(
  2870. smalltalk.method({
  2871. selector: "isPackage",
  2872. fn: function (){
  2873. var self=this;
  2874. return smalltalk.withContext(function($ctx1) {
  2875. return true;
  2876. }, function($ctx1) {$ctx1.fill(self,"isPackage",{},smalltalk.Package)})},
  2877. messageSends: []}),
  2878. smalltalk.Package);
  2879. smalltalk.addMethod(
  2880. smalltalk.method({
  2881. selector: "name",
  2882. fn: function (){
  2883. var self=this;
  2884. return smalltalk.withContext(function($ctx1) {
  2885. return self.pkgName;
  2886. return self}, function($ctx1) {$ctx1.fill(self,"name",{},smalltalk.Package)})},
  2887. messageSends: []}),
  2888. smalltalk.Package);
  2889. smalltalk.addMethod(
  2890. smalltalk.method({
  2891. selector: "name:",
  2892. fn: function (aString){
  2893. var self=this;
  2894. return smalltalk.withContext(function($ctx1) {
  2895. self.pkgName = aString;
  2896. return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString},smalltalk.Package)})},
  2897. messageSends: []}),
  2898. smalltalk.Package);
  2899. smalltalk.addMethod(
  2900. smalltalk.method({
  2901. selector: "organization",
  2902. fn: function (){
  2903. var self=this;
  2904. return smalltalk.withContext(function($ctx1) {
  2905. var $1;
  2906. $1=self._basicAt_("organization");
  2907. return $1;
  2908. }, function($ctx1) {$ctx1.fill(self,"organization",{},smalltalk.Package)})},
  2909. messageSends: ["basicAt:"]}),
  2910. smalltalk.Package);
  2911. smalltalk.addMethod(
  2912. smalltalk.method({
  2913. selector: "printOn:",
  2914. fn: function (aStream){
  2915. var self=this;
  2916. return smalltalk.withContext(function($ctx1) {
  2917. var $1,$2;
  2918. smalltalk.Object.fn.prototype._printOn_.apply(_st(self), [aStream]);
  2919. $1=aStream;
  2920. _st($1)._nextPutAll_(" (");
  2921. _st($1)._nextPutAll_(self._name());
  2922. $2=_st($1)._nextPutAll_(")");
  2923. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Package)})},
  2924. messageSends: ["printOn:", "nextPutAll:", "name"]}),
  2925. smalltalk.Package);
  2926. smalltalk.addMethod(
  2927. smalltalk.method({
  2928. selector: "setupClasses",
  2929. fn: function (){
  2930. var self=this;
  2931. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2932. return smalltalk.withContext(function($ctx1) {
  2933. var $1,$2;
  2934. $1=self._classes();
  2935. _st($1)._do_((function(each){
  2936. return smalltalk.withContext(function($ctx2) {
  2937. return _st(_st($ClassBuilder())._new())._setupClass_(each);
  2938. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2939. $2=_st($1)._do_((function(each){
  2940. return smalltalk.withContext(function($ctx2) {
  2941. return _st(each)._initialize();
  2942. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2943. return self}, function($ctx1) {$ctx1.fill(self,"setupClasses",{},smalltalk.Package)})},
  2944. messageSends: ["do:", "setupClass:", "new", "classes", "initialize"]}),
  2945. smalltalk.Package);
  2946. smalltalk.addMethod(
  2947. smalltalk.method({
  2948. selector: "sortedClasses",
  2949. fn: function (){
  2950. var self=this;
  2951. return smalltalk.withContext(function($ctx1) {
  2952. var $1;
  2953. $1=_st(self._class())._sortedClasses_(self._classes());
  2954. return $1;
  2955. }, function($ctx1) {$ctx1.fill(self,"sortedClasses",{},smalltalk.Package)})},
  2956. messageSends: ["sortedClasses:", "classes", "class"]}),
  2957. smalltalk.Package);
  2958. smalltalk.addMethod(
  2959. smalltalk.method({
  2960. selector: "transportType",
  2961. fn: function (){
  2962. var self=this;
  2963. return smalltalk.withContext(function($ctx1) {
  2964. return (self.transport && self.transport.type) || 'unknown';;
  2965. return self}, function($ctx1) {$ctx1.fill(self,"transportType",{},smalltalk.Package)})},
  2966. messageSends: []}),
  2967. smalltalk.Package);
  2968. smalltalk.Package.klass.iVarNames = ['defaultCommitPathJs','defaultCommitPathSt'];
  2969. smalltalk.addMethod(
  2970. smalltalk.method({
  2971. selector: "commitPathsFromLoader",
  2972. fn: function (){
  2973. var self=this;
  2974. return smalltalk.withContext(function($ctx1) {
  2975. var commitPath = typeof amber !== 'undefined' && amber.commitPath;
  2976. if (!commitPath) return;
  2977. if (commitPath.js) self._defaultCommitPathJs_(commitPath.js);
  2978. if (commitPath.st) self._defaultCommitPathSt_(commitPath.st);
  2979. ;
  2980. return self}, function($ctx1) {$ctx1.fill(self,"commitPathsFromLoader",{},smalltalk.Package.klass)})},
  2981. messageSends: []}),
  2982. smalltalk.Package.klass);
  2983. smalltalk.addMethod(
  2984. smalltalk.method({
  2985. selector: "defaultCommitPathJs",
  2986. fn: function (){
  2987. var self=this;
  2988. return smalltalk.withContext(function($ctx1) {
  2989. var $2,$1;
  2990. $2=self["@defaultCommitPathJs"];
  2991. if(($receiver = $2) == nil || $receiver == undefined){
  2992. self["@defaultCommitPathJs"]="js";
  2993. $1=self["@defaultCommitPathJs"];
  2994. } else {
  2995. $1=$2;
  2996. };
  2997. return $1;
  2998. }, function($ctx1) {$ctx1.fill(self,"defaultCommitPathJs",{},smalltalk.Package.klass)})},
  2999. messageSends: ["ifNil:"]}),
  3000. smalltalk.Package.klass);
  3001. smalltalk.addMethod(
  3002. smalltalk.method({
  3003. selector: "defaultCommitPathJs:",
  3004. fn: function (aString){
  3005. var self=this;
  3006. return smalltalk.withContext(function($ctx1) {
  3007. self["@defaultCommitPathJs"]=aString;
  3008. return self}, function($ctx1) {$ctx1.fill(self,"defaultCommitPathJs:",{aString:aString},smalltalk.Package.klass)})},
  3009. messageSends: []}),
  3010. smalltalk.Package.klass);
  3011. smalltalk.addMethod(
  3012. smalltalk.method({
  3013. selector: "defaultCommitPathSt",
  3014. fn: function (){
  3015. var self=this;
  3016. return smalltalk.withContext(function($ctx1) {
  3017. var $2,$1;
  3018. $2=self["@defaultCommitPathSt"];
  3019. if(($receiver = $2) == nil || $receiver == undefined){
  3020. self["@defaultCommitPathSt"]="st";
  3021. $1=self["@defaultCommitPathSt"];
  3022. } else {
  3023. $1=$2;
  3024. };
  3025. return $1;
  3026. }, function($ctx1) {$ctx1.fill(self,"defaultCommitPathSt",{},smalltalk.Package.klass)})},
  3027. messageSends: ["ifNil:"]}),
  3028. smalltalk.Package.klass);
  3029. smalltalk.addMethod(
  3030. smalltalk.method({
  3031. selector: "defaultCommitPathSt:",
  3032. fn: function (aString){
  3033. var self=this;
  3034. return smalltalk.withContext(function($ctx1) {
  3035. self["@defaultCommitPathSt"]=aString;
  3036. return self}, function($ctx1) {$ctx1.fill(self,"defaultCommitPathSt:",{aString:aString},smalltalk.Package.klass)})},
  3037. messageSends: []}),
  3038. smalltalk.Package.klass);
  3039. smalltalk.addMethod(
  3040. smalltalk.method({
  3041. selector: "initialize",
  3042. fn: function (){
  3043. var self=this;
  3044. return smalltalk.withContext(function($ctx1) {
  3045. smalltalk.Object.klass.fn.prototype._initialize.apply(_st(self), []);
  3046. self._commitPathsFromLoader();
  3047. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Package.klass)})},
  3048. messageSends: ["initialize", "commitPathsFromLoader"]}),
  3049. smalltalk.Package.klass);
  3050. smalltalk.addMethod(
  3051. smalltalk.method({
  3052. selector: "load:",
  3053. fn: function (aPackageName){
  3054. var self=this;
  3055. return smalltalk.withContext(function($ctx1) {
  3056. self._load_prefix_(aPackageName,_st(self._defaultCommitPathJs()).__comma("/"));
  3057. return self}, function($ctx1) {$ctx1.fill(self,"load:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
  3058. messageSends: ["load:prefix:", ",", "defaultCommitPathJs"]}),
  3059. smalltalk.Package.klass);
  3060. smalltalk.addMethod(
  3061. smalltalk.method({
  3062. selector: "load:prefix:",
  3063. fn: function (aPackageName,aPrefix){
  3064. var self=this;
  3065. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  3066. return smalltalk.withContext(function($ctx1) {
  3067. _st(jQuery)._getScript_onSuccess_(_st(_st(aPrefix).__comma(aPackageName)).__comma(".js"),(function(){
  3068. return smalltalk.withContext(function($ctx2) {
  3069. return _st(_st($Package())._named_(aPackageName))._setupClasses();
  3070. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3071. return self}, function($ctx1) {$ctx1.fill(self,"load:prefix:",{aPackageName:aPackageName,aPrefix:aPrefix},smalltalk.Package.klass)})},
  3072. messageSends: ["getScript:onSuccess:", ",", "setupClasses", "named:"]}),
  3073. smalltalk.Package.klass);
  3074. smalltalk.addMethod(
  3075. smalltalk.method({
  3076. selector: "named:",
  3077. fn: function (aPackageName){
  3078. var self=this;
  3079. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  3080. return smalltalk.withContext(function($ctx1) {
  3081. var $1;
  3082. $1=_st(_st($Smalltalk())._current())._packageAt_(aPackageName);
  3083. return $1;
  3084. }, function($ctx1) {$ctx1.fill(self,"named:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
  3085. messageSends: ["packageAt:", "current"]}),
  3086. smalltalk.Package.klass);
  3087. smalltalk.addMethod(
  3088. smalltalk.method({
  3089. selector: "named:ifAbsent:",
  3090. fn: function (aPackageName,aBlock){
  3091. var self=this;
  3092. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  3093. return smalltalk.withContext(function($ctx1) {
  3094. var $1;
  3095. $1=_st(_st($Smalltalk())._current())._packageAt_ifAbsent_(aPackageName,aBlock);
  3096. return $1;
  3097. }, function($ctx1) {$ctx1.fill(self,"named:ifAbsent:",{aPackageName:aPackageName,aBlock:aBlock},smalltalk.Package.klass)})},
  3098. messageSends: ["packageAt:ifAbsent:", "current"]}),
  3099. smalltalk.Package.klass);
  3100. smalltalk.addMethod(
  3101. smalltalk.method({
  3102. selector: "resetCommitPaths",
  3103. fn: function (){
  3104. var self=this;
  3105. return smalltalk.withContext(function($ctx1) {
  3106. self["@defaultCommitPathJs"]=nil;
  3107. self["@defaultCommitPathSt"]=nil;
  3108. return self}, function($ctx1) {$ctx1.fill(self,"resetCommitPaths",{},smalltalk.Package.klass)})},
  3109. messageSends: []}),
  3110. smalltalk.Package.klass);
  3111. smalltalk.addMethod(
  3112. smalltalk.method({
  3113. selector: "sortedClasses:",
  3114. fn: function (classes){
  3115. var self=this;
  3116. var children,others,nodes,expandedClasses;
  3117. function $ClassSorterNode(){return smalltalk.ClassSorterNode||(typeof ClassSorterNode=="undefined"?nil:ClassSorterNode)}
  3118. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  3119. return smalltalk.withContext(function($ctx1) {
  3120. var $1,$2;
  3121. children=[];
  3122. others=[];
  3123. _st(classes)._do_((function(each){
  3124. return smalltalk.withContext(function($ctx2) {
  3125. $1=_st(classes)._includes_(_st(each)._superclass());
  3126. if(smalltalk.assert($1)){
  3127. return _st(others)._add_(each);
  3128. } else {
  3129. return _st(children)._add_(each);
  3130. };
  3131. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3132. nodes=_st(children)._collect_((function(each){
  3133. return smalltalk.withContext(function($ctx2) {
  3134. return _st($ClassSorterNode())._on_classes_level_(each,others,(0));
  3135. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3136. nodes=_st(nodes)._sorted_((function(a,b){
  3137. return smalltalk.withContext(function($ctx2) {
  3138. return _st(_st(_st(a)._theClass())._name()).__lt_eq(_st(_st(b)._theClass())._name());
  3139. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  3140. expandedClasses=_st($Array())._new();
  3141. _st(nodes)._do_((function(aNode){
  3142. return smalltalk.withContext(function($ctx2) {
  3143. return _st(aNode)._traverseClassesWith_(expandedClasses);
  3144. }, function($ctx2) {$ctx2.fillBlock({aNode:aNode},$ctx1)})}));
  3145. $2=expandedClasses;
  3146. return $2;
  3147. }, function($ctx1) {$ctx1.fill(self,"sortedClasses:",{classes:classes,children:children,others:others,nodes:nodes,expandedClasses:expandedClasses},smalltalk.Package.klass)})},
  3148. messageSends: ["do:", "ifFalse:ifTrue:", "add:", "includes:", "superclass", "collect:", "on:classes:level:", "sorted:", "<=", "name", "theClass", "new", "traverseClassesWith:"]}),
  3149. smalltalk.Package.klass);
  3150. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel-Objects');
  3151. smalltalk.addMethod(
  3152. smalltalk.method({
  3153. selector: "*",
  3154. fn: function (aPoint){
  3155. var self=this;
  3156. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3157. return smalltalk.withContext(function($ctx1) {
  3158. var $1;
  3159. $1=_st($Point())._x_y_(_st(self._x()).__star(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__star(_st(_st(aPoint)._asPoint())._y()));
  3160. return $1;
  3161. }, function($ctx1) {$ctx1.fill(self,"*",{aPoint:aPoint},smalltalk.Point)})},
  3162. messageSends: ["x:y:", "*", "x", "asPoint", "y"]}),
  3163. smalltalk.Point);
  3164. smalltalk.addMethod(
  3165. smalltalk.method({
  3166. selector: "+",
  3167. fn: function (aPoint){
  3168. var self=this;
  3169. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3170. return smalltalk.withContext(function($ctx1) {
  3171. var $1;
  3172. $1=_st($Point())._x_y_(_st(self._x()).__plus(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__plus(_st(_st(aPoint)._asPoint())._y()));
  3173. return $1;
  3174. }, function($ctx1) {$ctx1.fill(self,"+",{aPoint:aPoint},smalltalk.Point)})},
  3175. messageSends: ["x:y:", "+", "x", "asPoint", "y"]}),
  3176. smalltalk.Point);
  3177. smalltalk.addMethod(
  3178. smalltalk.method({
  3179. selector: "-",
  3180. fn: function (aPoint){
  3181. var self=this;
  3182. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3183. return smalltalk.withContext(function($ctx1) {
  3184. var $1;
  3185. $1=_st($Point())._x_y_(_st(self._x()).__minus(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__minus(_st(_st(aPoint)._asPoint())._y()));
  3186. return $1;
  3187. }, function($ctx1) {$ctx1.fill(self,"-",{aPoint:aPoint},smalltalk.Point)})},
  3188. messageSends: ["x:y:", "-", "x", "asPoint", "y"]}),
  3189. smalltalk.Point);
  3190. smalltalk.addMethod(
  3191. smalltalk.method({
  3192. selector: "/",
  3193. fn: function (aPoint){
  3194. var self=this;
  3195. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3196. return smalltalk.withContext(function($ctx1) {
  3197. var $1;
  3198. $1=_st($Point())._x_y_(_st(self._x()).__slash(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__slash(_st(_st(aPoint)._asPoint())._y()));
  3199. return $1;
  3200. }, function($ctx1) {$ctx1.fill(self,"/",{aPoint:aPoint},smalltalk.Point)})},
  3201. messageSends: ["x:y:", "/", "x", "asPoint", "y"]}),
  3202. smalltalk.Point);
  3203. smalltalk.addMethod(
  3204. smalltalk.method({
  3205. selector: "=",
  3206. fn: function (aPoint){
  3207. var self=this;
  3208. return smalltalk.withContext(function($ctx1) {
  3209. var $1;
  3210. $1=_st(_st(_st(aPoint)._class()).__eq(self._class()))._and_((function(){
  3211. return smalltalk.withContext(function($ctx2) {
  3212. return _st(_st(_st(aPoint)._x()).__eq(self._x())).__and(_st(_st(aPoint)._y()).__eq(self._y()));
  3213. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3214. return $1;
  3215. }, function($ctx1) {$ctx1.fill(self,"=",{aPoint:aPoint},smalltalk.Point)})},
  3216. messageSends: ["and:", "&", "=", "y", "x", "class"]}),
  3217. smalltalk.Point);
  3218. smalltalk.addMethod(
  3219. smalltalk.method({
  3220. selector: "asPoint",
  3221. fn: function (){
  3222. var self=this;
  3223. return smalltalk.withContext(function($ctx1) {
  3224. var $1;
  3225. $1=self;
  3226. return $1;
  3227. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Point)})},
  3228. messageSends: []}),
  3229. smalltalk.Point);
  3230. smalltalk.addMethod(
  3231. smalltalk.method({
  3232. selector: "printOn:",
  3233. fn: function (aStream){
  3234. var self=this;
  3235. return smalltalk.withContext(function($ctx1) {
  3236. var $1;
  3237. _st(self["@x"])._printOn_(aStream);
  3238. _st(aStream)._nextPutAll_("@");
  3239. $1=_st(_st(self["@y"])._notNil())._and_((function(){
  3240. return smalltalk.withContext(function($ctx2) {
  3241. return _st(self["@y"])._negative();
  3242. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3243. if(smalltalk.assert($1)){
  3244. _st(aStream)._space();
  3245. };
  3246. _st(self["@y"])._printOn_(aStream);
  3247. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Point)})},
  3248. messageSends: ["printOn:", "nextPutAll:", "ifTrue:", "space", "and:", "negative", "notNil"]}),
  3249. smalltalk.Point);
  3250. smalltalk.addMethod(
  3251. smalltalk.method({
  3252. selector: "translateBy:",
  3253. fn: function (delta){
  3254. var self=this;
  3255. return smalltalk.withContext(function($ctx1) {
  3256. var $1;
  3257. $1=_st(_st(_st(delta)._x()).__plus(self["@x"])).__at(_st(_st(delta)._y()).__plus(self["@y"]));
  3258. return $1;
  3259. }, function($ctx1) {$ctx1.fill(self,"translateBy:",{delta:delta},smalltalk.Point)})},
  3260. messageSends: ["@", "+", "y", "x"]}),
  3261. smalltalk.Point);
  3262. smalltalk.addMethod(
  3263. smalltalk.method({
  3264. selector: "x",
  3265. fn: function (){
  3266. var self=this;
  3267. return smalltalk.withContext(function($ctx1) {
  3268. var $1;
  3269. $1=self["@x"];
  3270. return $1;
  3271. }, function($ctx1) {$ctx1.fill(self,"x",{},smalltalk.Point)})},
  3272. messageSends: []}),
  3273. smalltalk.Point);
  3274. smalltalk.addMethod(
  3275. smalltalk.method({
  3276. selector: "x:",
  3277. fn: function (aNumber){
  3278. var self=this;
  3279. return smalltalk.withContext(function($ctx1) {
  3280. self["@x"]=aNumber;
  3281. return self}, function($ctx1) {$ctx1.fill(self,"x:",{aNumber:aNumber},smalltalk.Point)})},
  3282. messageSends: []}),
  3283. smalltalk.Point);
  3284. smalltalk.addMethod(
  3285. smalltalk.method({
  3286. selector: "y",
  3287. fn: function (){
  3288. var self=this;
  3289. return smalltalk.withContext(function($ctx1) {
  3290. var $1;
  3291. $1=self["@y"];
  3292. return $1;
  3293. }, function($ctx1) {$ctx1.fill(self,"y",{},smalltalk.Point)})},
  3294. messageSends: []}),
  3295. smalltalk.Point);
  3296. smalltalk.addMethod(
  3297. smalltalk.method({
  3298. selector: "y:",
  3299. fn: function (aNumber){
  3300. var self=this;
  3301. return smalltalk.withContext(function($ctx1) {
  3302. self["@y"]=aNumber;
  3303. return self}, function($ctx1) {$ctx1.fill(self,"y:",{aNumber:aNumber},smalltalk.Point)})},
  3304. messageSends: []}),
  3305. smalltalk.Point);
  3306. smalltalk.addMethod(
  3307. smalltalk.method({
  3308. selector: "heliosClass",
  3309. fn: function (){
  3310. var self=this;
  3311. return smalltalk.withContext(function($ctx1) {
  3312. return "magnitude";
  3313. }, function($ctx1) {$ctx1.fill(self,"heliosClass",{},smalltalk.Point.klass)})},
  3314. messageSends: []}),
  3315. smalltalk.Point.klass);
  3316. smalltalk.addMethod(
  3317. smalltalk.method({
  3318. selector: "x:y:",
  3319. fn: function (aNumber,anotherNumber){
  3320. var self=this;
  3321. return smalltalk.withContext(function($ctx1) {
  3322. var $2,$3,$1;
  3323. $2=self._new();
  3324. _st($2)._x_(aNumber);
  3325. _st($2)._y_(anotherNumber);
  3326. $3=_st($2)._yourself();
  3327. $1=$3;
  3328. return $1;
  3329. }, function($ctx1) {$ctx1.fill(self,"x:y:",{aNumber:aNumber,anotherNumber:anotherNumber},smalltalk.Point.klass)})},
  3330. messageSends: ["x:", "new", "y:", "yourself"]}),
  3331. smalltalk.Point.klass);
  3332. smalltalk.addClass('ProgressHandler', smalltalk.Object, [], 'Kernel-Objects');
  3333. smalltalk.addMethod(
  3334. smalltalk.method({
  3335. selector: "do:on:displaying:",
  3336. fn: function (aBlock,aCollection,aString){
  3337. var self=this;
  3338. return smalltalk.withContext(function($ctx1) {
  3339. _st(aCollection)._do_(aBlock);
  3340. return self}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},smalltalk.ProgressHandler)})},
  3341. messageSends: ["do:"]}),
  3342. smalltalk.ProgressHandler);
  3343. smalltalk.ProgressHandler.klass.iVarNames = ['current'];
  3344. smalltalk.addMethod(
  3345. smalltalk.method({
  3346. selector: "current",
  3347. fn: function (){
  3348. var self=this;
  3349. return smalltalk.withContext(function($ctx1) {
  3350. var $2,$1;
  3351. $2=self["@current"];
  3352. if(($receiver = $2) == nil || $receiver == undefined){
  3353. self["@current"]=self._new();
  3354. $1=self["@current"];
  3355. } else {
  3356. $1=$2;
  3357. };
  3358. return $1;
  3359. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.ProgressHandler.klass)})},
  3360. messageSends: ["ifNil:", "new"]}),
  3361. smalltalk.ProgressHandler.klass);
  3362. smalltalk.addMethod(
  3363. smalltalk.method({
  3364. selector: "initialize",
  3365. fn: function (){
  3366. var self=this;
  3367. return smalltalk.withContext(function($ctx1) {
  3368. self._register();
  3369. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ProgressHandler.klass)})},
  3370. messageSends: ["register"]}),
  3371. smalltalk.ProgressHandler.klass);
  3372. smalltalk.addMethod(
  3373. smalltalk.method({
  3374. selector: "register",
  3375. fn: function (){
  3376. var self=this;
  3377. function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
  3378. return smalltalk.withContext(function($ctx1) {
  3379. _st($ProgressHandler())._setCurrent_(self._new());
  3380. return self}, function($ctx1) {$ctx1.fill(self,"register",{},smalltalk.ProgressHandler.klass)})},
  3381. messageSends: ["setCurrent:", "new"]}),
  3382. smalltalk.ProgressHandler.klass);
  3383. smalltalk.addMethod(
  3384. smalltalk.method({
  3385. selector: "setCurrent:",
  3386. fn: function (anHandler){
  3387. var self=this;
  3388. return smalltalk.withContext(function($ctx1) {
  3389. self["@current"]=anHandler;
  3390. return self}, function($ctx1) {$ctx1.fill(self,"setCurrent:",{anHandler:anHandler},smalltalk.ProgressHandler.klass)})},
  3391. messageSends: []}),
  3392. smalltalk.ProgressHandler.klass);
  3393. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel-Objects');
  3394. smalltalk.addMethod(
  3395. smalltalk.method({
  3396. selector: "next",
  3397. fn: function (){
  3398. var self=this;
  3399. return smalltalk.withContext(function($ctx1) {
  3400. return Math.random();
  3401. return self}, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.Random)})},
  3402. messageSends: []}),
  3403. smalltalk.Random);
  3404. smalltalk.addMethod(
  3405. smalltalk.method({
  3406. selector: "next:",
  3407. fn: function (anInteger){
  3408. var self=this;
  3409. return smalltalk.withContext(function($ctx1) {
  3410. var $1;
  3411. $1=_st((1)._to_(anInteger))._collect_((function(each){
  3412. return smalltalk.withContext(function($ctx2) {
  3413. return self._next();
  3414. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3415. return $1;
  3416. }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger},smalltalk.Random)})},
  3417. messageSends: ["collect:", "next", "to:"]}),
  3418. smalltalk.Random);
  3419. smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel-Objects');
  3420. smalltalk.addMethod(
  3421. smalltalk.method({
  3422. selector: "addGlobalJsVariable:",
  3423. fn: function (aString){
  3424. var self=this;
  3425. return smalltalk.withContext(function($ctx1) {
  3426. _st(self._globalJsVariables())._add_(aString);
  3427. return self}, function($ctx1) {$ctx1.fill(self,"addGlobalJsVariable:",{aString:aString},smalltalk.Smalltalk)})},
  3428. messageSends: ["add:", "globalJsVariables"]}),
  3429. smalltalk.Smalltalk);
  3430. smalltalk.addMethod(
  3431. smalltalk.method({
  3432. selector: "asSmalltalkException:",
  3433. fn: function (anObject){
  3434. var self=this;
  3435. function $JavaScriptException(){return smalltalk.JavaScriptException||(typeof JavaScriptException=="undefined"?nil:JavaScriptException)}
  3436. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  3437. return smalltalk.withContext(function($ctx1) {
  3438. var $2,$1;
  3439. $2=_st(self._isSmalltalkObject_(anObject))._and_((function(){
  3440. return smalltalk.withContext(function($ctx2) {
  3441. return _st(anObject)._isKindOf_($Error());
  3442. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3443. if(smalltalk.assert($2)){
  3444. $1=anObject;
  3445. } else {
  3446. $1=_st($JavaScriptException())._on_(anObject);
  3447. };
  3448. return $1;
  3449. }, function($ctx1) {$ctx1.fill(self,"asSmalltalkException:",{anObject:anObject},smalltalk.Smalltalk)})},
  3450. messageSends: ["ifTrue:ifFalse:", "on:", "and:", "isKindOf:", "isSmalltalkObject:"]}),
  3451. smalltalk.Smalltalk);
  3452. smalltalk.addMethod(
  3453. smalltalk.method({
  3454. selector: "at:",
  3455. fn: function (aString){
  3456. var self=this;
  3457. return smalltalk.withContext(function($ctx1) {
  3458. return self[aString];
  3459. return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.Smalltalk)})},
  3460. messageSends: []}),
  3461. smalltalk.Smalltalk);
  3462. smalltalk.addMethod(
  3463. smalltalk.method({
  3464. selector: "basicParse:",
  3465. fn: function (aString){
  3466. var self=this;
  3467. return smalltalk.withContext(function($ctx1) {
  3468. return smalltalk.parser.parse(aString);
  3469. return self}, function($ctx1) {$ctx1.fill(self,"basicParse:",{aString:aString},smalltalk.Smalltalk)})},
  3470. messageSends: []}),
  3471. smalltalk.Smalltalk);
  3472. smalltalk.addMethod(
  3473. smalltalk.method({
  3474. selector: "classes",
  3475. fn: function (){
  3476. var self=this;
  3477. return smalltalk.withContext(function($ctx1) {
  3478. return self.classes();
  3479. return self}, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Smalltalk)})},
  3480. messageSends: []}),
  3481. smalltalk.Smalltalk);
  3482. smalltalk.addMethod(
  3483. smalltalk.method({
  3484. selector: "createPackage:",
  3485. fn: function (packageName){
  3486. var self=this;
  3487. return smalltalk.withContext(function($ctx1) {
  3488. return smalltalk.addPackage(packageName);
  3489. return self}, function($ctx1) {$ctx1.fill(self,"createPackage:",{packageName:packageName},smalltalk.Smalltalk)})},
  3490. messageSends: []}),
  3491. smalltalk.Smalltalk);
  3492. smalltalk.addMethod(
  3493. smalltalk.method({
  3494. selector: "createPackage:properties:",
  3495. fn: function (packageName,aDict){
  3496. var self=this;
  3497. return smalltalk.withContext(function($ctx1) {
  3498. var $1,$2;
  3499. self._deprecatedAPI();
  3500. $1=_st(aDict)._isEmpty();
  3501. if(! smalltalk.assert($1)){
  3502. self._error_("createPackage:properties: called with nonempty properties");
  3503. };
  3504. $2=self._createPackage_(packageName);
  3505. return $2;
  3506. }, function($ctx1) {$ctx1.fill(self,"createPackage:properties:",{packageName:packageName,aDict:aDict},smalltalk.Smalltalk)})},
  3507. messageSends: ["deprecatedAPI", "ifFalse:", "error:", "isEmpty", "createPackage:"]}),
  3508. smalltalk.Smalltalk);
  3509. smalltalk.addMethod(
  3510. smalltalk.method({
  3511. selector: "deleteClass:",
  3512. fn: function (aClass){
  3513. var self=this;
  3514. return smalltalk.withContext(function($ctx1) {
  3515. self.removeClass(aClass);
  3516. return self}, function($ctx1) {$ctx1.fill(self,"deleteClass:",{aClass:aClass},smalltalk.Smalltalk)})},
  3517. messageSends: []}),
  3518. smalltalk.Smalltalk);
  3519. smalltalk.addMethod(
  3520. smalltalk.method({
  3521. selector: "deleteGlobalJsVariable:",
  3522. fn: function (aString){
  3523. var self=this;
  3524. return smalltalk.withContext(function($ctx1) {
  3525. _st(self._globalJsVariables())._remove_ifAbsent_(aString,(function(){
  3526. return smalltalk.withContext(function($ctx2) {
  3527. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3528. return self}, function($ctx1) {$ctx1.fill(self,"deleteGlobalJsVariable:",{aString:aString},smalltalk.Smalltalk)})},
  3529. messageSends: ["remove:ifAbsent:", "globalJsVariables"]}),
  3530. smalltalk.Smalltalk);
  3531. smalltalk.addMethod(
  3532. smalltalk.method({
  3533. selector: "deletePackage:",
  3534. fn: function (packageName){
  3535. var self=this;
  3536. return smalltalk.withContext(function($ctx1) {
  3537. delete smalltalk.packages[packageName];
  3538. return self}, function($ctx1) {$ctx1.fill(self,"deletePackage:",{packageName:packageName},smalltalk.Smalltalk)})},
  3539. messageSends: []}),
  3540. smalltalk.Smalltalk);
  3541. smalltalk.addMethod(
  3542. smalltalk.method({
  3543. selector: "globalJsVariables",
  3544. fn: function (){
  3545. var self=this;
  3546. return smalltalk.withContext(function($ctx1) {
  3547. return self.globalJsVariables;
  3548. return self}, function($ctx1) {$ctx1.fill(self,"globalJsVariables",{},smalltalk.Smalltalk)})},
  3549. messageSends: []}),
  3550. smalltalk.Smalltalk);
  3551. smalltalk.addMethod(
  3552. smalltalk.method({
  3553. selector: "isSmalltalkObject:",
  3554. fn: function (anObject){
  3555. var self=this;
  3556. return smalltalk.withContext(function($ctx1) {
  3557. return typeof anObject.klass !== 'undefined';
  3558. return self}, function($ctx1) {$ctx1.fill(self,"isSmalltalkObject:",{anObject:anObject},smalltalk.Smalltalk)})},
  3559. messageSends: []}),
  3560. smalltalk.Smalltalk);
  3561. smalltalk.addMethod(
  3562. smalltalk.method({
  3563. selector: "packageAt:",
  3564. fn: function (packageName){
  3565. var self=this;
  3566. return smalltalk.withContext(function($ctx1) {
  3567. return self.packages[packageName];
  3568. return self}, function($ctx1) {$ctx1.fill(self,"packageAt:",{packageName:packageName},smalltalk.Smalltalk)})},
  3569. messageSends: []}),
  3570. smalltalk.Smalltalk);
  3571. smalltalk.addMethod(
  3572. smalltalk.method({
  3573. selector: "packageAt:ifAbsent:",
  3574. fn: function (packageName,aBlock){
  3575. var self=this;
  3576. return smalltalk.withContext(function($ctx1) {
  3577. var $2,$1;
  3578. $2=self._packageAt_(packageName);
  3579. $1=_st($2)._ifNil_(aBlock);
  3580. return $1;
  3581. }, function($ctx1) {$ctx1.fill(self,"packageAt:ifAbsent:",{packageName:packageName,aBlock:aBlock},smalltalk.Smalltalk)})},
  3582. messageSends: ["ifNil:", "packageAt:"]}),
  3583. smalltalk.Smalltalk);
  3584. smalltalk.addMethod(
  3585. smalltalk.method({
  3586. selector: "packages",
  3587. fn: function (){
  3588. var self=this;
  3589. return smalltalk.withContext(function($ctx1) {
  3590. return self.packages.all();
  3591. return self}, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.Smalltalk)})},
  3592. messageSends: []}),
  3593. smalltalk.Smalltalk);
  3594. smalltalk.addMethod(
  3595. smalltalk.method({
  3596. selector: "parse:",
  3597. fn: function (aString){
  3598. var self=this;
  3599. var result;
  3600. return smalltalk.withContext(function($ctx1) {
  3601. var $2,$3,$1;
  3602. self._try_catch_((function(){
  3603. return smalltalk.withContext(function($ctx2) {
  3604. result=self._basicParse_(aString);
  3605. return result;
  3606. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(ex){
  3607. return smalltalk.withContext(function($ctx2) {
  3608. return _st(self._parseError_parsing_(ex,aString))._signal();
  3609. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  3610. $2=result;
  3611. _st($2)._source_(aString);
  3612. $3=_st($2)._yourself();
  3613. $1=$3;
  3614. return $1;
  3615. }, function($ctx1) {$ctx1.fill(self,"parse:",{aString:aString,result:result},smalltalk.Smalltalk)})},
  3616. messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:", "source:", "yourself"]}),
  3617. smalltalk.Smalltalk);
  3618. smalltalk.addMethod(
  3619. smalltalk.method({
  3620. selector: "parseError:parsing:",
  3621. fn: function (anException,aString){
  3622. var self=this;
  3623. function $ParseError(){return smalltalk.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
  3624. return smalltalk.withContext(function($ctx1) {
  3625. var $1;
  3626. $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")));
  3627. return $1;
  3628. }, function($ctx1) {$ctx1.fill(self,"parseError:parsing:",{anException:anException,aString:aString},smalltalk.Smalltalk)})},
  3629. messageSends: ["messageText:", ",", "basicAt:", "new"]}),
  3630. smalltalk.Smalltalk);
  3631. smalltalk.addMethod(
  3632. smalltalk.method({
  3633. selector: "pseudoVariableNames",
  3634. fn: function (){
  3635. var self=this;
  3636. return smalltalk.withContext(function($ctx1) {
  3637. var $1;
  3638. $1=["self", "super", "nil", "true", "false", "thisContext"];
  3639. return $1;
  3640. }, function($ctx1) {$ctx1.fill(self,"pseudoVariableNames",{},smalltalk.Smalltalk)})},
  3641. messageSends: []}),
  3642. smalltalk.Smalltalk);
  3643. smalltalk.addMethod(
  3644. smalltalk.method({
  3645. selector: "readJSObject:",
  3646. fn: function (anObject){
  3647. var self=this;
  3648. return smalltalk.withContext(function($ctx1) {
  3649. return self.readJSObject(anObject);
  3650. return self}, function($ctx1) {$ctx1.fill(self,"readJSObject:",{anObject:anObject},smalltalk.Smalltalk)})},
  3651. messageSends: []}),
  3652. smalltalk.Smalltalk);
  3653. smalltalk.addMethod(
  3654. smalltalk.method({
  3655. selector: "removeClass:",
  3656. fn: function (aClass){
  3657. var self=this;
  3658. function $ClassRemoved(){return smalltalk.ClassRemoved||(typeof ClassRemoved=="undefined"?nil:ClassRemoved)}
  3659. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  3660. return smalltalk.withContext(function($ctx1) {
  3661. var $1,$2,$3;
  3662. $1=_st(aClass)._isMetaclass();
  3663. if(smalltalk.assert($1)){
  3664. self._error_(_st(_st(aClass)._asString()).__comma(" is a Metaclass and cannot be removed!"));
  3665. };
  3666. self._deleteClass_(aClass);
  3667. $2=_st($ClassRemoved())._new();
  3668. _st($2)._theClass_(aClass);
  3669. $3=_st($2)._yourself();
  3670. _st(_st($SystemAnnouncer())._current())._announce_($3);
  3671. return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.Smalltalk)})},
  3672. messageSends: ["ifTrue:", "error:", ",", "asString", "isMetaclass", "deleteClass:", "announce:", "theClass:", "new", "yourself", "current"]}),
  3673. smalltalk.Smalltalk);
  3674. smalltalk.addMethod(
  3675. smalltalk.method({
  3676. selector: "removePackage:",
  3677. fn: function (packageName){
  3678. var self=this;
  3679. var pkg;
  3680. return smalltalk.withContext(function($ctx1) {
  3681. pkg=self._packageAt_ifAbsent_(packageName,(function(){
  3682. return smalltalk.withContext(function($ctx2) {
  3683. return self._error_("Missing package: ".__comma(packageName));
  3684. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3685. _st(_st(pkg)._classes())._do_((function(each){
  3686. return smalltalk.withContext(function($ctx2) {
  3687. return self._removeClass_(each);
  3688. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3689. self._deletePackage_(packageName);
  3690. return self}, function($ctx1) {$ctx1.fill(self,"removePackage:",{packageName:packageName,pkg:pkg},smalltalk.Smalltalk)})},
  3691. messageSends: ["packageAt:ifAbsent:", "error:", ",", "do:", "removeClass:", "classes", "deletePackage:"]}),
  3692. smalltalk.Smalltalk);
  3693. smalltalk.addMethod(
  3694. smalltalk.method({
  3695. selector: "renamePackage:to:",
  3696. fn: function (packageName,newName){
  3697. var self=this;
  3698. var pkg;
  3699. return smalltalk.withContext(function($ctx1) {
  3700. var $1;
  3701. pkg=self._packageAt_ifAbsent_(packageName,(function(){
  3702. return smalltalk.withContext(function($ctx2) {
  3703. return self._error_("Missing package: ".__comma(packageName));
  3704. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3705. $1=self._packageAt_(newName);
  3706. if(($receiver = $1) == nil || $receiver == undefined){
  3707. $1;
  3708. } else {
  3709. self._error_("Already exists a package called: ".__comma(newName));
  3710. };
  3711. _st(self._basicAt_("packages"))._at_put_(newName,pkg);
  3712. _st(pkg)._name_(newName);
  3713. self._deletePackage_(packageName);
  3714. return self}, function($ctx1) {$ctx1.fill(self,"renamePackage:to:",{packageName:packageName,newName:newName,pkg:pkg},smalltalk.Smalltalk)})},
  3715. messageSends: ["packageAt:ifAbsent:", "error:", ",", "ifNotNil:", "packageAt:", "at:put:", "basicAt:", "name:", "deletePackage:"]}),
  3716. smalltalk.Smalltalk);
  3717. smalltalk.addMethod(
  3718. smalltalk.method({
  3719. selector: "reservedWords",
  3720. fn: function (){
  3721. var self=this;
  3722. return smalltalk.withContext(function($ctx1) {
  3723. return self.reservedWords;
  3724. return self}, function($ctx1) {$ctx1.fill(self,"reservedWords",{},smalltalk.Smalltalk)})},
  3725. messageSends: []}),
  3726. smalltalk.Smalltalk);
  3727. smalltalk.addMethod(
  3728. smalltalk.method({
  3729. selector: "version",
  3730. fn: function (){
  3731. var self=this;
  3732. return smalltalk.withContext(function($ctx1) {
  3733. return "0.11.0";
  3734. }, function($ctx1) {$ctx1.fill(self,"version",{},smalltalk.Smalltalk)})},
  3735. messageSends: []}),
  3736. smalltalk.Smalltalk);
  3737. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  3738. smalltalk.addMethod(
  3739. smalltalk.method({
  3740. selector: "current",
  3741. fn: function (){
  3742. var self=this;
  3743. return smalltalk.withContext(function($ctx1) {
  3744. return smalltalk;
  3745. return self}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.Smalltalk.klass)})},
  3746. messageSends: []}),
  3747. smalltalk.Smalltalk.klass);
  3748. smalltalk.addClass('Timeout', smalltalk.Object, ['rawTimeout'], 'Kernel-Objects');
  3749. smalltalk.addMethod(
  3750. smalltalk.method({
  3751. selector: "clearInterval",
  3752. fn: function (){
  3753. var self=this;
  3754. return smalltalk.withContext(function($ctx1) {
  3755. var interval = self["@rawTimeout"];
  3756. clearInterval(interval);
  3757. ;
  3758. return self}, function($ctx1) {$ctx1.fill(self,"clearInterval",{},smalltalk.Timeout)})},
  3759. messageSends: []}),
  3760. smalltalk.Timeout);
  3761. smalltalk.addMethod(
  3762. smalltalk.method({
  3763. selector: "clearTimeout",
  3764. fn: function (){
  3765. var self=this;
  3766. return smalltalk.withContext(function($ctx1) {
  3767. var timeout = self["@rawTimeout"];
  3768. clearTimeout(timeout);
  3769. ;
  3770. return self}, function($ctx1) {$ctx1.fill(self,"clearTimeout",{},smalltalk.Timeout)})},
  3771. messageSends: []}),
  3772. smalltalk.Timeout);
  3773. smalltalk.addMethod(
  3774. smalltalk.method({
  3775. selector: "rawTimeout:",
  3776. fn: function (anObject){
  3777. var self=this;
  3778. return smalltalk.withContext(function($ctx1) {
  3779. self["@rawTimeout"]=anObject;
  3780. return self}, function($ctx1) {$ctx1.fill(self,"rawTimeout:",{anObject:anObject},smalltalk.Timeout)})},
  3781. messageSends: []}),
  3782. smalltalk.Timeout);
  3783. smalltalk.addMethod(
  3784. smalltalk.method({
  3785. selector: "on:",
  3786. fn: function (anObject){
  3787. var self=this;
  3788. return smalltalk.withContext(function($ctx1) {
  3789. var $2,$3,$1;
  3790. $2=self._new();
  3791. _st($2)._rawTimeout_(anObject);
  3792. $3=_st($2)._yourself();
  3793. $1=$3;
  3794. return $1;
  3795. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Timeout.klass)})},
  3796. messageSends: ["rawTimeout:", "new", "yourself"]}),
  3797. smalltalk.Timeout.klass);
  3798. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel-Objects');
  3799. smalltalk.addMethod(
  3800. smalltalk.method({
  3801. selector: "asJSON",
  3802. fn: function (){
  3803. var self=this;
  3804. return smalltalk.withContext(function($ctx1) {
  3805. var $1;
  3806. $1=null;
  3807. return $1;
  3808. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.UndefinedObject)})},
  3809. messageSends: []}),
  3810. smalltalk.UndefinedObject);
  3811. smalltalk.addMethod(
  3812. smalltalk.method({
  3813. selector: "deepCopy",
  3814. fn: function (){
  3815. var self=this;
  3816. return smalltalk.withContext(function($ctx1) {
  3817. var $1;
  3818. $1=self;
  3819. return $1;
  3820. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.UndefinedObject)})},
  3821. messageSends: []}),
  3822. smalltalk.UndefinedObject);
  3823. smalltalk.addMethod(
  3824. smalltalk.method({
  3825. selector: "ifNil:",
  3826. fn: function (aBlock){
  3827. var self=this;
  3828. return smalltalk.withContext(function($ctx1) {
  3829. var $2,$1;
  3830. $2=self;
  3831. $1=_st($2)._ifNil_ifNotNil_(aBlock,(function(){
  3832. return smalltalk.withContext(function($ctx2) {
  3833. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3834. return $1;
  3835. }, function($ctx1) {$ctx1.fill(self,"ifNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  3836. messageSends: ["ifNil:ifNotNil:"]}),
  3837. smalltalk.UndefinedObject);
  3838. smalltalk.addMethod(
  3839. smalltalk.method({
  3840. selector: "ifNil:ifNotNil:",
  3841. fn: function (aBlock,anotherBlock){
  3842. var self=this;
  3843. return smalltalk.withContext(function($ctx1) {
  3844. var $1;
  3845. $1=_st(aBlock)._value();
  3846. return $1;
  3847. }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  3848. messageSends: ["value"]}),
  3849. smalltalk.UndefinedObject);
  3850. smalltalk.addMethod(
  3851. smalltalk.method({
  3852. selector: "ifNotNil:",
  3853. fn: function (aBlock){
  3854. var self=this;
  3855. return smalltalk.withContext(function($ctx1) {
  3856. var $1;
  3857. $1=self;
  3858. return $1;
  3859. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  3860. messageSends: []}),
  3861. smalltalk.UndefinedObject);
  3862. smalltalk.addMethod(
  3863. smalltalk.method({
  3864. selector: "ifNotNil:ifNil:",
  3865. fn: function (aBlock,anotherBlock){
  3866. var self=this;
  3867. return smalltalk.withContext(function($ctx1) {
  3868. var $1;
  3869. $1=_st(anotherBlock)._value();
  3870. return $1;
  3871. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  3872. messageSends: ["value"]}),
  3873. smalltalk.UndefinedObject);
  3874. smalltalk.addMethod(
  3875. smalltalk.method({
  3876. selector: "isImmutable",
  3877. fn: function (){
  3878. var self=this;
  3879. return smalltalk.withContext(function($ctx1) {
  3880. return true;
  3881. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.UndefinedObject)})},
  3882. messageSends: []}),
  3883. smalltalk.UndefinedObject);
  3884. smalltalk.addMethod(
  3885. smalltalk.method({
  3886. selector: "isNil",
  3887. fn: function (){
  3888. var self=this;
  3889. return smalltalk.withContext(function($ctx1) {
  3890. return true;
  3891. }, function($ctx1) {$ctx1.fill(self,"isNil",{},smalltalk.UndefinedObject)})},
  3892. messageSends: []}),
  3893. smalltalk.UndefinedObject);
  3894. smalltalk.addMethod(
  3895. smalltalk.method({
  3896. selector: "notNil",
  3897. fn: function (){
  3898. var self=this;
  3899. return smalltalk.withContext(function($ctx1) {
  3900. return false;
  3901. }, function($ctx1) {$ctx1.fill(self,"notNil",{},smalltalk.UndefinedObject)})},
  3902. messageSends: []}),
  3903. smalltalk.UndefinedObject);
  3904. smalltalk.addMethod(
  3905. smalltalk.method({
  3906. selector: "printOn:",
  3907. fn: function (aStream){
  3908. var self=this;
  3909. return smalltalk.withContext(function($ctx1) {
  3910. _st(aStream)._nextPutAll_("nil");
  3911. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.UndefinedObject)})},
  3912. messageSends: ["nextPutAll:"]}),
  3913. smalltalk.UndefinedObject);
  3914. smalltalk.addMethod(
  3915. smalltalk.method({
  3916. selector: "shallowCopy",
  3917. fn: function (){
  3918. var self=this;
  3919. return smalltalk.withContext(function($ctx1) {
  3920. var $1;
  3921. $1=self;
  3922. return $1;
  3923. }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.UndefinedObject)})},
  3924. messageSends: []}),
  3925. smalltalk.UndefinedObject);
  3926. smalltalk.addMethod(
  3927. smalltalk.method({
  3928. selector: "subclass:instanceVariableNames:",
  3929. fn: function (aString,anotherString){
  3930. var self=this;
  3931. return smalltalk.withContext(function($ctx1) {
  3932. var $1;
  3933. $1=self._subclass_instanceVariableNames_package_(aString,anotherString,nil);
  3934. return $1;
  3935. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString},smalltalk.UndefinedObject)})},
  3936. messageSends: ["subclass:instanceVariableNames:package:"]}),
  3937. smalltalk.UndefinedObject);
  3938. smalltalk.addMethod(
  3939. smalltalk.method({
  3940. selector: "subclass:instanceVariableNames:category:",
  3941. fn: function (aString,aString2,aString3){
  3942. var self=this;
  3943. return smalltalk.withContext(function($ctx1) {
  3944. var $1;
  3945. self._deprecatedAPI();
  3946. $1=self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
  3947. return $1;
  3948. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:category:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  3949. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"]}),
  3950. smalltalk.UndefinedObject);
  3951. smalltalk.addMethod(
  3952. smalltalk.method({
  3953. selector: "subclass:instanceVariableNames:package:",
  3954. fn: function (aString,aString2,aString3){
  3955. var self=this;
  3956. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  3957. return smalltalk.withContext(function($ctx1) {
  3958. var $1;
  3959. $1=_st(_st($ClassBuilder())._new())._superclass_subclass_instanceVariableNames_package_(self,_st(aString)._asString(),aString2,aString3);
  3960. return $1;
  3961. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  3962. messageSends: ["superclass:subclass:instanceVariableNames:package:", "asString", "new"]}),
  3963. smalltalk.UndefinedObject);
  3964. smalltalk.addMethod(
  3965. smalltalk.method({
  3966. selector: "new",
  3967. fn: function (){
  3968. var self=this;
  3969. return smalltalk.withContext(function($ctx1) {
  3970. self._error_("You cannot create new instances of UndefinedObject. Use nil");
  3971. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.UndefinedObject.klass)})},
  3972. messageSends: ["error:"]}),
  3973. smalltalk.UndefinedObject.klass);
  3974. smalltalk.addMethod(
  3975. smalltalk.method({
  3976. selector: "asJavaScriptSelector",
  3977. fn: function (){
  3978. var self=this;
  3979. return smalltalk.withContext(function($ctx1) {
  3980. var $1;
  3981. $1=self._replace_with_("^([a-zA-Z0-9]*).*$","$1");
  3982. return $1;
  3983. }, function($ctx1) {$ctx1.fill(self,"asJavaScriptSelector",{},smalltalk.String)})},
  3984. messageSends: ["replace:with:"]}),
  3985. smalltalk.String);
  3986. })(global_smalltalk,global_nil,global__st);