2
0

Kernel-Objects.deploy.js 129 KB

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