Kernel-Objects.deploy.js 123 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107
  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: "initialize",
  734. fn: function (){
  735. var self=this;
  736. return smalltalk.withContext(function($ctx1) {
  737. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Object.klass)})},
  738. messageSends: []}),
  739. smalltalk.Object.klass);
  740. smalltalk.addClass('Boolean', smalltalk.Object, [], 'Kernel-Objects');
  741. smalltalk.addMethod(
  742. smalltalk.method({
  743. selector: "&",
  744. fn: function (aBoolean){
  745. var self=this;
  746. return smalltalk.withContext(function($ctx1) {
  747. if(self == true) {
  748. return aBoolean;
  749. } else {
  750. return false;
  751. }
  752. ;
  753. return self}, function($ctx1) {$ctx1.fill(self,"&",{aBoolean:aBoolean},smalltalk.Boolean)})},
  754. messageSends: []}),
  755. smalltalk.Boolean);
  756. smalltalk.addMethod(
  757. smalltalk.method({
  758. selector: "=",
  759. fn: function (aBoolean){
  760. var self=this;
  761. return smalltalk.withContext(function($ctx1) {
  762. if(! aBoolean._isBoolean || ! aBoolean._isBoolean()) {
  763. return false;
  764. }
  765. return Boolean(self == true) == aBoolean
  766. ;
  767. return self}, function($ctx1) {$ctx1.fill(self,"=",{aBoolean:aBoolean},smalltalk.Boolean)})},
  768. messageSends: []}),
  769. smalltalk.Boolean);
  770. smalltalk.addMethod(
  771. smalltalk.method({
  772. selector: "==",
  773. fn: function (aBoolean){
  774. var self=this;
  775. return smalltalk.withContext(function($ctx1) {
  776. var $1;
  777. $1=_st(self).__eq(aBoolean);
  778. return $1;
  779. }, function($ctx1) {$ctx1.fill(self,"==",{aBoolean:aBoolean},smalltalk.Boolean)})},
  780. messageSends: ["="]}),
  781. smalltalk.Boolean);
  782. smalltalk.addMethod(
  783. smalltalk.method({
  784. selector: "and:",
  785. fn: function (aBlock){
  786. var self=this;
  787. return smalltalk.withContext(function($ctx1) {
  788. var $2,$1;
  789. $2=_st(self).__eq(true);
  790. $1=_st($2)._ifTrue_ifFalse_(aBlock,(function(){
  791. return smalltalk.withContext(function($ctx2) {
  792. return false;
  793. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  794. return $1;
  795. }, function($ctx1) {$ctx1.fill(self,"and:",{aBlock:aBlock},smalltalk.Boolean)})},
  796. messageSends: ["ifTrue:ifFalse:", "="]}),
  797. smalltalk.Boolean);
  798. smalltalk.addMethod(
  799. smalltalk.method({
  800. selector: "asJSON",
  801. fn: function (){
  802. var self=this;
  803. return smalltalk.withContext(function($ctx1) {
  804. var $1;
  805. $1=self;
  806. return $1;
  807. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Boolean)})},
  808. messageSends: []}),
  809. smalltalk.Boolean);
  810. smalltalk.addMethod(
  811. smalltalk.method({
  812. selector: "asString",
  813. fn: function (){
  814. var self=this;
  815. return smalltalk.withContext(function($ctx1) {
  816. return self.toString() ;
  817. return self}, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Boolean)})},
  818. messageSends: []}),
  819. smalltalk.Boolean);
  820. smalltalk.addMethod(
  821. smalltalk.method({
  822. selector: "deepCopy",
  823. fn: function (){
  824. var self=this;
  825. return smalltalk.withContext(function($ctx1) {
  826. var $1;
  827. $1=self;
  828. return $1;
  829. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Boolean)})},
  830. messageSends: []}),
  831. smalltalk.Boolean);
  832. smalltalk.addMethod(
  833. smalltalk.method({
  834. selector: "ifFalse:",
  835. fn: function (aBlock){
  836. var self=this;
  837. return smalltalk.withContext(function($ctx1) {
  838. var $2,$1;
  839. $2=self;
  840. $1=_st($2)._ifTrue_ifFalse_((function(){
  841. return smalltalk.withContext(function($ctx2) {
  842. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),aBlock);
  843. return $1;
  844. }, function($ctx1) {$ctx1.fill(self,"ifFalse:",{aBlock:aBlock},smalltalk.Boolean)})},
  845. messageSends: ["ifTrue:ifFalse:"]}),
  846. smalltalk.Boolean);
  847. smalltalk.addMethod(
  848. smalltalk.method({
  849. selector: "ifFalse:ifTrue:",
  850. fn: function (aBlock,anotherBlock){
  851. var self=this;
  852. return smalltalk.withContext(function($ctx1) {
  853. var $2,$1;
  854. $2=self;
  855. $1=_st($2)._ifTrue_ifFalse_(anotherBlock,aBlock);
  856. return $1;
  857. }, function($ctx1) {$ctx1.fill(self,"ifFalse:ifTrue:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Boolean)})},
  858. messageSends: ["ifTrue:ifFalse:"]}),
  859. smalltalk.Boolean);
  860. smalltalk.addMethod(
  861. smalltalk.method({
  862. selector: "ifTrue:",
  863. fn: function (aBlock){
  864. var self=this;
  865. return smalltalk.withContext(function($ctx1) {
  866. var $2,$1;
  867. $2=self;
  868. $1=_st($2)._ifTrue_ifFalse_(aBlock,(function(){
  869. return smalltalk.withContext(function($ctx2) {
  870. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  871. return $1;
  872. }, function($ctx1) {$ctx1.fill(self,"ifTrue:",{aBlock:aBlock},smalltalk.Boolean)})},
  873. messageSends: ["ifTrue:ifFalse:"]}),
  874. smalltalk.Boolean);
  875. smalltalk.addMethod(
  876. smalltalk.method({
  877. selector: "ifTrue:ifFalse:",
  878. fn: function (aBlock,anotherBlock){
  879. var self=this;
  880. return smalltalk.withContext(function($ctx1) {
  881. if(self == true) {
  882. return aBlock();
  883. } else {
  884. return anotherBlock();
  885. }
  886. ;
  887. return self}, function($ctx1) {$ctx1.fill(self,"ifTrue:ifFalse:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Boolean)})},
  888. messageSends: []}),
  889. smalltalk.Boolean);
  890. smalltalk.addMethod(
  891. smalltalk.method({
  892. selector: "isBoolean",
  893. fn: function (){
  894. var self=this;
  895. return smalltalk.withContext(function($ctx1) {
  896. return true;
  897. }, function($ctx1) {$ctx1.fill(self,"isBoolean",{},smalltalk.Boolean)})},
  898. messageSends: []}),
  899. smalltalk.Boolean);
  900. smalltalk.addMethod(
  901. smalltalk.method({
  902. selector: "isImmutable",
  903. fn: function (){
  904. var self=this;
  905. return smalltalk.withContext(function($ctx1) {
  906. return true;
  907. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.Boolean)})},
  908. messageSends: []}),
  909. smalltalk.Boolean);
  910. smalltalk.addMethod(
  911. smalltalk.method({
  912. selector: "not",
  913. fn: function (){
  914. var self=this;
  915. return smalltalk.withContext(function($ctx1) {
  916. var $1;
  917. $1=_st(self).__eq(false);
  918. return $1;
  919. }, function($ctx1) {$ctx1.fill(self,"not",{},smalltalk.Boolean)})},
  920. messageSends: ["="]}),
  921. smalltalk.Boolean);
  922. smalltalk.addMethod(
  923. smalltalk.method({
  924. selector: "or:",
  925. fn: function (aBlock){
  926. var self=this;
  927. return smalltalk.withContext(function($ctx1) {
  928. var $2,$1;
  929. $2=_st(self).__eq(true);
  930. $1=_st($2)._ifTrue_ifFalse_((function(){
  931. return smalltalk.withContext(function($ctx2) {
  932. return true;
  933. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),aBlock);
  934. return $1;
  935. }, function($ctx1) {$ctx1.fill(self,"or:",{aBlock:aBlock},smalltalk.Boolean)})},
  936. messageSends: ["ifTrue:ifFalse:", "="]}),
  937. smalltalk.Boolean);
  938. smalltalk.addMethod(
  939. smalltalk.method({
  940. selector: "printOn:",
  941. fn: function (aStream){
  942. var self=this;
  943. return smalltalk.withContext(function($ctx1) {
  944. _st(aStream)._nextPutAll_(_st(self)._asString());
  945. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Boolean)})},
  946. messageSends: ["nextPutAll:", "asString"]}),
  947. smalltalk.Boolean);
  948. smalltalk.addMethod(
  949. smalltalk.method({
  950. selector: "shallowCopy",
  951. fn: function (){
  952. var self=this;
  953. return smalltalk.withContext(function($ctx1) {
  954. var $1;
  955. $1=self;
  956. return $1;
  957. }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.Boolean)})},
  958. messageSends: []}),
  959. smalltalk.Boolean);
  960. smalltalk.addMethod(
  961. smalltalk.method({
  962. selector: "|",
  963. fn: function (aBoolean){
  964. var self=this;
  965. return smalltalk.withContext(function($ctx1) {
  966. if(self == true) {
  967. return true;
  968. } else {
  969. return aBoolean;
  970. }
  971. ;
  972. return self}, function($ctx1) {$ctx1.fill(self,"|",{aBoolean:aBoolean},smalltalk.Boolean)})},
  973. messageSends: []}),
  974. smalltalk.Boolean);
  975. smalltalk.addClass('Date', smalltalk.Object, [], 'Kernel-Objects');
  976. smalltalk.addMethod(
  977. smalltalk.method({
  978. selector: "+",
  979. fn: function (aDate){
  980. var self=this;
  981. return smalltalk.withContext(function($ctx1) {
  982. return self + aDate;
  983. return self}, function($ctx1) {$ctx1.fill(self,"+",{aDate:aDate},smalltalk.Date)})},
  984. messageSends: []}),
  985. smalltalk.Date);
  986. smalltalk.addMethod(
  987. smalltalk.method({
  988. selector: "-",
  989. fn: function (aDate){
  990. var self=this;
  991. return smalltalk.withContext(function($ctx1) {
  992. return self - aDate;
  993. return self}, function($ctx1) {$ctx1.fill(self,"-",{aDate:aDate},smalltalk.Date)})},
  994. messageSends: []}),
  995. smalltalk.Date);
  996. smalltalk.addMethod(
  997. smalltalk.method({
  998. selector: "<",
  999. fn: function (aDate){
  1000. var self=this;
  1001. return smalltalk.withContext(function($ctx1) {
  1002. return self < aDate;
  1003. return self}, function($ctx1) {$ctx1.fill(self,"<",{aDate:aDate},smalltalk.Date)})},
  1004. messageSends: []}),
  1005. smalltalk.Date);
  1006. smalltalk.addMethod(
  1007. smalltalk.method({
  1008. selector: "<=",
  1009. fn: function (aDate){
  1010. var self=this;
  1011. return smalltalk.withContext(function($ctx1) {
  1012. return self <= aDate;
  1013. return self}, function($ctx1) {$ctx1.fill(self,"<=",{aDate:aDate},smalltalk.Date)})},
  1014. messageSends: []}),
  1015. smalltalk.Date);
  1016. smalltalk.addMethod(
  1017. smalltalk.method({
  1018. selector: ">",
  1019. fn: function (aDate){
  1020. var self=this;
  1021. return smalltalk.withContext(function($ctx1) {
  1022. return self > aDate;
  1023. return self}, function($ctx1) {$ctx1.fill(self,">",{aDate:aDate},smalltalk.Date)})},
  1024. messageSends: []}),
  1025. smalltalk.Date);
  1026. smalltalk.addMethod(
  1027. smalltalk.method({
  1028. selector: ">=",
  1029. fn: function (aDate){
  1030. var self=this;
  1031. return smalltalk.withContext(function($ctx1) {
  1032. return self >= aDate;
  1033. return self}, function($ctx1) {$ctx1.fill(self,">=",{aDate:aDate},smalltalk.Date)})},
  1034. messageSends: []}),
  1035. smalltalk.Date);
  1036. smalltalk.addMethod(
  1037. smalltalk.method({
  1038. selector: "asDateString",
  1039. fn: function (){
  1040. var self=this;
  1041. return smalltalk.withContext(function($ctx1) {
  1042. return self.toDateString();
  1043. return self}, function($ctx1) {$ctx1.fill(self,"asDateString",{},smalltalk.Date)})},
  1044. messageSends: []}),
  1045. smalltalk.Date);
  1046. smalltalk.addMethod(
  1047. smalltalk.method({
  1048. selector: "asLocaleString",
  1049. fn: function (){
  1050. var self=this;
  1051. return smalltalk.withContext(function($ctx1) {
  1052. return self.toLocaleString();
  1053. return self}, function($ctx1) {$ctx1.fill(self,"asLocaleString",{},smalltalk.Date)})},
  1054. messageSends: []}),
  1055. smalltalk.Date);
  1056. smalltalk.addMethod(
  1057. smalltalk.method({
  1058. selector: "asMilliseconds",
  1059. fn: function (){
  1060. var self=this;
  1061. return smalltalk.withContext(function($ctx1) {
  1062. var $1;
  1063. $1=_st(self)._time();
  1064. return $1;
  1065. }, function($ctx1) {$ctx1.fill(self,"asMilliseconds",{},smalltalk.Date)})},
  1066. messageSends: ["time"]}),
  1067. smalltalk.Date);
  1068. smalltalk.addMethod(
  1069. smalltalk.method({
  1070. selector: "asNumber",
  1071. fn: function (){
  1072. var self=this;
  1073. return smalltalk.withContext(function($ctx1) {
  1074. var $1;
  1075. $1=_st(self)._asMilliseconds();
  1076. return $1;
  1077. }, function($ctx1) {$ctx1.fill(self,"asNumber",{},smalltalk.Date)})},
  1078. messageSends: ["asMilliseconds"]}),
  1079. smalltalk.Date);
  1080. smalltalk.addMethod(
  1081. smalltalk.method({
  1082. selector: "asString",
  1083. fn: function (){
  1084. var self=this;
  1085. return smalltalk.withContext(function($ctx1) {
  1086. return self.toString();
  1087. return self}, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Date)})},
  1088. messageSends: []}),
  1089. smalltalk.Date);
  1090. smalltalk.addMethod(
  1091. smalltalk.method({
  1092. selector: "asTimeString",
  1093. fn: function (){
  1094. var self=this;
  1095. return smalltalk.withContext(function($ctx1) {
  1096. return self.toTimeString();
  1097. return self}, function($ctx1) {$ctx1.fill(self,"asTimeString",{},smalltalk.Date)})},
  1098. messageSends: []}),
  1099. smalltalk.Date);
  1100. smalltalk.addMethod(
  1101. smalltalk.method({
  1102. selector: "day",
  1103. fn: function (){
  1104. var self=this;
  1105. return smalltalk.withContext(function($ctx1) {
  1106. var $1;
  1107. $1=_st(self)._dayOfWeek();
  1108. return $1;
  1109. }, function($ctx1) {$ctx1.fill(self,"day",{},smalltalk.Date)})},
  1110. messageSends: ["dayOfWeek"]}),
  1111. smalltalk.Date);
  1112. smalltalk.addMethod(
  1113. smalltalk.method({
  1114. selector: "day:",
  1115. fn: function (aNumber){
  1116. var self=this;
  1117. return smalltalk.withContext(function($ctx1) {
  1118. _st(self)._dayOfWeek_(aNumber);
  1119. return self}, function($ctx1) {$ctx1.fill(self,"day:",{aNumber:aNumber},smalltalk.Date)})},
  1120. messageSends: ["dayOfWeek:"]}),
  1121. smalltalk.Date);
  1122. smalltalk.addMethod(
  1123. smalltalk.method({
  1124. selector: "dayOfMonth",
  1125. fn: function (){
  1126. var self=this;
  1127. return smalltalk.withContext(function($ctx1) {
  1128. return self.getDate();
  1129. return self}, function($ctx1) {$ctx1.fill(self,"dayOfMonth",{},smalltalk.Date)})},
  1130. messageSends: []}),
  1131. smalltalk.Date);
  1132. smalltalk.addMethod(
  1133. smalltalk.method({
  1134. selector: "dayOfMonth:",
  1135. fn: function (aNumber){
  1136. var self=this;
  1137. return smalltalk.withContext(function($ctx1) {
  1138. self.setDate(aNumber);
  1139. return self}, function($ctx1) {$ctx1.fill(self,"dayOfMonth:",{aNumber:aNumber},smalltalk.Date)})},
  1140. messageSends: []}),
  1141. smalltalk.Date);
  1142. smalltalk.addMethod(
  1143. smalltalk.method({
  1144. selector: "dayOfWeek",
  1145. fn: function (){
  1146. var self=this;
  1147. return smalltalk.withContext(function($ctx1) {
  1148. return self.getDay() + 1;
  1149. return self}, function($ctx1) {$ctx1.fill(self,"dayOfWeek",{},smalltalk.Date)})},
  1150. messageSends: []}),
  1151. smalltalk.Date);
  1152. smalltalk.addMethod(
  1153. smalltalk.method({
  1154. selector: "dayOfWeek:",
  1155. fn: function (aNumber){
  1156. var self=this;
  1157. return smalltalk.withContext(function($ctx1) {
  1158. return self.setDay(aNumber - 1);
  1159. return self}, function($ctx1) {$ctx1.fill(self,"dayOfWeek:",{aNumber:aNumber},smalltalk.Date)})},
  1160. messageSends: []}),
  1161. smalltalk.Date);
  1162. smalltalk.addMethod(
  1163. smalltalk.method({
  1164. selector: "hours",
  1165. fn: function (){
  1166. var self=this;
  1167. return smalltalk.withContext(function($ctx1) {
  1168. return self.getHours();
  1169. return self}, function($ctx1) {$ctx1.fill(self,"hours",{},smalltalk.Date)})},
  1170. messageSends: []}),
  1171. smalltalk.Date);
  1172. smalltalk.addMethod(
  1173. smalltalk.method({
  1174. selector: "hours:",
  1175. fn: function (aNumber){
  1176. var self=this;
  1177. return smalltalk.withContext(function($ctx1) {
  1178. self.setHours(aNumber);
  1179. return self}, function($ctx1) {$ctx1.fill(self,"hours:",{aNumber:aNumber},smalltalk.Date)})},
  1180. messageSends: []}),
  1181. smalltalk.Date);
  1182. smalltalk.addMethod(
  1183. smalltalk.method({
  1184. selector: "milliseconds",
  1185. fn: function (){
  1186. var self=this;
  1187. return smalltalk.withContext(function($ctx1) {
  1188. return self.getMilliseconds();
  1189. return self}, function($ctx1) {$ctx1.fill(self,"milliseconds",{},smalltalk.Date)})},
  1190. messageSends: []}),
  1191. smalltalk.Date);
  1192. smalltalk.addMethod(
  1193. smalltalk.method({
  1194. selector: "milliseconds:",
  1195. fn: function (aNumber){
  1196. var self=this;
  1197. return smalltalk.withContext(function($ctx1) {
  1198. self.setMilliseconds(aNumber);
  1199. return self}, function($ctx1) {$ctx1.fill(self,"milliseconds:",{aNumber:aNumber},smalltalk.Date)})},
  1200. messageSends: []}),
  1201. smalltalk.Date);
  1202. smalltalk.addMethod(
  1203. smalltalk.method({
  1204. selector: "minutes",
  1205. fn: function (){
  1206. var self=this;
  1207. return smalltalk.withContext(function($ctx1) {
  1208. return self.getMinutes();
  1209. return self}, function($ctx1) {$ctx1.fill(self,"minutes",{},smalltalk.Date)})},
  1210. messageSends: []}),
  1211. smalltalk.Date);
  1212. smalltalk.addMethod(
  1213. smalltalk.method({
  1214. selector: "minutes:",
  1215. fn: function (aNumber){
  1216. var self=this;
  1217. return smalltalk.withContext(function($ctx1) {
  1218. self.setMinutes(aNumber);
  1219. return self}, function($ctx1) {$ctx1.fill(self,"minutes:",{aNumber:aNumber},smalltalk.Date)})},
  1220. messageSends: []}),
  1221. smalltalk.Date);
  1222. smalltalk.addMethod(
  1223. smalltalk.method({
  1224. selector: "month",
  1225. fn: function (){
  1226. var self=this;
  1227. return smalltalk.withContext(function($ctx1) {
  1228. return self.getMonth() + 1;
  1229. return self}, function($ctx1) {$ctx1.fill(self,"month",{},smalltalk.Date)})},
  1230. messageSends: []}),
  1231. smalltalk.Date);
  1232. smalltalk.addMethod(
  1233. smalltalk.method({
  1234. selector: "month:",
  1235. fn: function (aNumber){
  1236. var self=this;
  1237. return smalltalk.withContext(function($ctx1) {
  1238. self.setMonth(aNumber - 1);
  1239. return self}, function($ctx1) {$ctx1.fill(self,"month:",{aNumber:aNumber},smalltalk.Date)})},
  1240. messageSends: []}),
  1241. smalltalk.Date);
  1242. smalltalk.addMethod(
  1243. smalltalk.method({
  1244. selector: "printOn:",
  1245. fn: function (aStream){
  1246. var self=this;
  1247. return smalltalk.withContext(function($ctx1) {
  1248. _st(aStream)._nextPutAll_(_st(self)._asString());
  1249. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Date)})},
  1250. messageSends: ["nextPutAll:", "asString"]}),
  1251. smalltalk.Date);
  1252. smalltalk.addMethod(
  1253. smalltalk.method({
  1254. selector: "seconds",
  1255. fn: function (){
  1256. var self=this;
  1257. return smalltalk.withContext(function($ctx1) {
  1258. return self.getSeconds();
  1259. return self}, function($ctx1) {$ctx1.fill(self,"seconds",{},smalltalk.Date)})},
  1260. messageSends: []}),
  1261. smalltalk.Date);
  1262. smalltalk.addMethod(
  1263. smalltalk.method({
  1264. selector: "seconds:",
  1265. fn: function (aNumber){
  1266. var self=this;
  1267. return smalltalk.withContext(function($ctx1) {
  1268. self.setSeconds(aNumber);
  1269. return self}, function($ctx1) {$ctx1.fill(self,"seconds:",{aNumber:aNumber},smalltalk.Date)})},
  1270. messageSends: []}),
  1271. smalltalk.Date);
  1272. smalltalk.addMethod(
  1273. smalltalk.method({
  1274. selector: "time",
  1275. fn: function (){
  1276. var self=this;
  1277. return smalltalk.withContext(function($ctx1) {
  1278. return self.getTime();
  1279. return self}, function($ctx1) {$ctx1.fill(self,"time",{},smalltalk.Date)})},
  1280. messageSends: []}),
  1281. smalltalk.Date);
  1282. smalltalk.addMethod(
  1283. smalltalk.method({
  1284. selector: "time:",
  1285. fn: function (aNumber){
  1286. var self=this;
  1287. return smalltalk.withContext(function($ctx1) {
  1288. self.setTime(aNumber);
  1289. return self}, function($ctx1) {$ctx1.fill(self,"time:",{aNumber:aNumber},smalltalk.Date)})},
  1290. messageSends: []}),
  1291. smalltalk.Date);
  1292. smalltalk.addMethod(
  1293. smalltalk.method({
  1294. selector: "year",
  1295. fn: function (){
  1296. var self=this;
  1297. return smalltalk.withContext(function($ctx1) {
  1298. return self.getFullYear();
  1299. return self}, function($ctx1) {$ctx1.fill(self,"year",{},smalltalk.Date)})},
  1300. messageSends: []}),
  1301. smalltalk.Date);
  1302. smalltalk.addMethod(
  1303. smalltalk.method({
  1304. selector: "year:",
  1305. fn: function (aNumber){
  1306. var self=this;
  1307. return smalltalk.withContext(function($ctx1) {
  1308. self.setFullYear(aNumber);
  1309. return self}, function($ctx1) {$ctx1.fill(self,"year:",{aNumber:aNumber},smalltalk.Date)})},
  1310. messageSends: []}),
  1311. smalltalk.Date);
  1312. smalltalk.addMethod(
  1313. smalltalk.method({
  1314. selector: "fromMilliseconds:",
  1315. fn: function (aNumber){
  1316. var self=this;
  1317. return smalltalk.withContext(function($ctx1) {
  1318. var $1;
  1319. $1=_st(self)._new_(aNumber);
  1320. return $1;
  1321. }, function($ctx1) {$ctx1.fill(self,"fromMilliseconds:",{aNumber:aNumber},smalltalk.Date.klass)})},
  1322. messageSends: ["new:"]}),
  1323. smalltalk.Date.klass);
  1324. smalltalk.addMethod(
  1325. smalltalk.method({
  1326. selector: "fromSeconds:",
  1327. fn: function (aNumber){
  1328. var self=this;
  1329. return smalltalk.withContext(function($ctx1) {
  1330. var $1;
  1331. $1=_st(self)._fromMilliseconds_(_st(aNumber).__star((1000)));
  1332. return $1;
  1333. }, function($ctx1) {$ctx1.fill(self,"fromSeconds:",{aNumber:aNumber},smalltalk.Date.klass)})},
  1334. messageSends: ["fromMilliseconds:", "*"]}),
  1335. smalltalk.Date.klass);
  1336. smalltalk.addMethod(
  1337. smalltalk.method({
  1338. selector: "fromString:",
  1339. fn: function (aString){
  1340. var self=this;
  1341. return smalltalk.withContext(function($ctx1) {
  1342. var $1;
  1343. $1=_st(self)._new_(aString);
  1344. return $1;
  1345. }, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString},smalltalk.Date.klass)})},
  1346. messageSends: ["new:"]}),
  1347. smalltalk.Date.klass);
  1348. smalltalk.addMethod(
  1349. smalltalk.method({
  1350. selector: "millisecondsToRun:",
  1351. fn: function (aBlock){
  1352. var self=this;
  1353. var t;
  1354. function $Date(){return smalltalk.Date||(typeof Date=="undefined"?nil:Date)}
  1355. return smalltalk.withContext(function($ctx1) {
  1356. var $1;
  1357. t=_st($Date())._now();
  1358. _st(aBlock)._value();
  1359. $1=_st(_st($Date())._now()).__minus(t);
  1360. return $1;
  1361. }, function($ctx1) {$ctx1.fill(self,"millisecondsToRun:",{aBlock:aBlock,t:t},smalltalk.Date.klass)})},
  1362. messageSends: ["now", "value", "-"]}),
  1363. smalltalk.Date.klass);
  1364. smalltalk.addMethod(
  1365. smalltalk.method({
  1366. selector: "new:",
  1367. fn: function (anObject){
  1368. var self=this;
  1369. return smalltalk.withContext(function($ctx1) {
  1370. return new Date(anObject);
  1371. return self}, function($ctx1) {$ctx1.fill(self,"new:",{anObject:anObject},smalltalk.Date.klass)})},
  1372. messageSends: []}),
  1373. smalltalk.Date.klass);
  1374. smalltalk.addMethod(
  1375. smalltalk.method({
  1376. selector: "now",
  1377. fn: function (){
  1378. var self=this;
  1379. return smalltalk.withContext(function($ctx1) {
  1380. var $1;
  1381. $1=_st(self)._today();
  1382. return $1;
  1383. }, function($ctx1) {$ctx1.fill(self,"now",{},smalltalk.Date.klass)})},
  1384. messageSends: ["today"]}),
  1385. smalltalk.Date.klass);
  1386. smalltalk.addMethod(
  1387. smalltalk.method({
  1388. selector: "today",
  1389. fn: function (){
  1390. var self=this;
  1391. return smalltalk.withContext(function($ctx1) {
  1392. var $1;
  1393. $1=_st(self)._new();
  1394. return $1;
  1395. }, function($ctx1) {$ctx1.fill(self,"today",{},smalltalk.Date.klass)})},
  1396. messageSends: ["new"]}),
  1397. smalltalk.Date.klass);
  1398. smalltalk.addClass('Environment', smalltalk.Object, [], 'Kernel-Objects');
  1399. smalltalk.addMethod(
  1400. smalltalk.method({
  1401. selector: "addInstVarNamed:to:",
  1402. fn: function (aString,aClass){
  1403. var self=this;
  1404. return smalltalk.withContext(function($ctx1) {
  1405. var $1,$2;
  1406. $1=_st(_st(aClass)._instanceVariableNames())._copy();
  1407. _st($1)._add_(aString);
  1408. $2=_st($1)._yourself();
  1409. _st(_st(self)._classBuilder())._addSubclassOf_named_instanceVariableNames_package_(_st(aClass)._superclass(),_st(aClass)._name(),$2,_st(_st(aClass)._package())._name());
  1410. return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:to:",{aString:aString,aClass:aClass},smalltalk.HLEnvironment)})},
  1411. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package", "classBuilder"]}),
  1412. smalltalk.Environment);
  1413. smalltalk.addMethod(
  1414. smalltalk.method({
  1415. selector: "allSelectors",
  1416. fn: function (){
  1417. var self=this;
  1418. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1419. return smalltalk.withContext(function($ctx1) {
  1420. var $1;
  1421. $1=_st(_st(_st($Smalltalk())._current())._at_("allSelectors"))._value();
  1422. return $1;
  1423. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.Environment)})},
  1424. messageSends: ["value", "at:", "current"]}),
  1425. smalltalk.Environment);
  1426. smalltalk.addMethod(
  1427. smalltalk.method({
  1428. selector: "availableClassNames",
  1429. fn: function (){
  1430. var self=this;
  1431. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1432. return smalltalk.withContext(function($ctx1) {
  1433. var $1;
  1434. $1=_st(_st(_st($Smalltalk())._current())._classes())._collect_((function(each){
  1435. return smalltalk.withContext(function($ctx2) {
  1436. return _st(each)._name();
  1437. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1438. return $1;
  1439. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},smalltalk.HLEnvironment)})},
  1440. messageSends: ["collect:", "name", "classes", "current"]}),
  1441. smalltalk.Environment);
  1442. smalltalk.addMethod(
  1443. smalltalk.method({
  1444. selector: "availablePackageNames",
  1445. fn: function (){
  1446. var self=this;
  1447. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1448. return smalltalk.withContext(function($ctx1) {
  1449. var $1;
  1450. $1=_st(_st(_st($Smalltalk())._current())._packages())._collect_((function(each){
  1451. return smalltalk.withContext(function($ctx2) {
  1452. return _st(each)._name();
  1453. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1454. return $1;
  1455. }, function($ctx1) {$ctx1.fill(self,"availablePackageNames",{},smalltalk.HLEnvironment)})},
  1456. messageSends: ["collect:", "name", "packages", "current"]}),
  1457. smalltalk.Environment);
  1458. smalltalk.addMethod(
  1459. smalltalk.method({
  1460. selector: "availableProtocolsFor:",
  1461. fn: function (aClass){
  1462. var self=this;
  1463. var protocols;
  1464. return smalltalk.withContext(function($ctx1) {
  1465. var $1,$2;
  1466. protocols=_st(aClass)._protocols();
  1467. $1=_st(aClass)._superclass();
  1468. if(($receiver = $1) == nil || $receiver == undefined){
  1469. $1;
  1470. } else {
  1471. _st(protocols)._addAll_(_st(self)._availableProtocolsFor_(_st(aClass)._superclass()));
  1472. };
  1473. $2=_st(_st(protocols)._asSet())._asArray();
  1474. return $2;
  1475. }, function($ctx1) {$ctx1.fill(self,"availableProtocolsFor:",{aClass:aClass,protocols:protocols},smalltalk.HLEnvironment)})},
  1476. messageSends: ["protocols", "ifNotNil:", "addAll:", "availableProtocolsFor:", "superclass", "asArray", "asSet"]}),
  1477. smalltalk.Environment);
  1478. smalltalk.addMethod(
  1479. smalltalk.method({
  1480. selector: "classBuilder",
  1481. fn: function (){
  1482. var self=this;
  1483. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1484. return smalltalk.withContext(function($ctx1) {
  1485. var $1;
  1486. $1=_st($ClassBuilder())._new();
  1487. return $1;
  1488. }, function($ctx1) {$ctx1.fill(self,"classBuilder",{},smalltalk.HLEnvironment)})},
  1489. messageSends: ["new"]}),
  1490. smalltalk.Environment);
  1491. smalltalk.addMethod(
  1492. smalltalk.method({
  1493. selector: "classNamed:",
  1494. fn: function (aString){
  1495. var self=this;
  1496. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1497. return smalltalk.withContext(function($ctx1) {
  1498. var $2,$1;
  1499. $2=_st(_st($Smalltalk())._current())._at_(_st(aString)._asSymbol());
  1500. if(($receiver = $2) == nil || $receiver == undefined){
  1501. $1=_st(self)._error_("Invalid class name");
  1502. } else {
  1503. $1=$2;
  1504. };
  1505. return $1;
  1506. }, function($ctx1) {$ctx1.fill(self,"classNamed:",{aString:aString},smalltalk.HLEnvironment)})},
  1507. messageSends: ["ifNil:", "error:", "at:", "asSymbol", "current"]}),
  1508. smalltalk.Environment);
  1509. smalltalk.addMethod(
  1510. smalltalk.method({
  1511. selector: "classes",
  1512. fn: function (){
  1513. var self=this;
  1514. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1515. return smalltalk.withContext(function($ctx1) {
  1516. var $1;
  1517. $1=_st(_st($Smalltalk())._current())._classes();
  1518. return $1;
  1519. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Environment)})},
  1520. messageSends: ["classes", "current"]}),
  1521. smalltalk.Environment);
  1522. smalltalk.addMethod(
  1523. smalltalk.method({
  1524. selector: "commitPackage:",
  1525. fn: function (aPackage){
  1526. var self=this;
  1527. return smalltalk.withContext(function($ctx1) {
  1528. _st(aPackage)._commit();
  1529. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage:",{aPackage:aPackage},smalltalk.HLEnvironment)})},
  1530. messageSends: ["commit"]}),
  1531. smalltalk.Environment);
  1532. smalltalk.addMethod(
  1533. smalltalk.method({
  1534. selector: "compileClassComment:for:",
  1535. fn: function (aString,aClass){
  1536. var self=this;
  1537. return smalltalk.withContext(function($ctx1) {
  1538. _st(aClass)._comment_(aString);
  1539. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment:for:",{aString:aString,aClass:aClass},smalltalk.HLEnvironment)})},
  1540. messageSends: ["comment:"]}),
  1541. smalltalk.Environment);
  1542. smalltalk.addMethod(
  1543. smalltalk.method({
  1544. selector: "compileClassDefinition:",
  1545. fn: function (aString){
  1546. var self=this;
  1547. function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  1548. return smalltalk.withContext(function($ctx1) {
  1549. _st(self)._eval_on_(aString,_st($DoIt())._new());
  1550. return self}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},smalltalk.HLEnvironment)})},
  1551. messageSends: ["eval:on:", "new"]}),
  1552. smalltalk.Environment);
  1553. smalltalk.addMethod(
  1554. smalltalk.method({
  1555. selector: "compileMethod:for:protocol:",
  1556. fn: function (sourceCode,class_,protocol){
  1557. var self=this;
  1558. return smalltalk.withContext(function($ctx1) {
  1559. var $1;
  1560. $1=_st(class_)._compile_category_(sourceCode,protocol);
  1561. return $1;
  1562. }, function($ctx1) {$ctx1.fill(self,"compileMethod:for:protocol:",{sourceCode:sourceCode,class_:class_,protocol:protocol},smalltalk.HLEnvironment)})},
  1563. messageSends: ["compile:category:"]}),
  1564. smalltalk.Environment);
  1565. smalltalk.addMethod(
  1566. smalltalk.method({
  1567. selector: "copyClass:to:",
  1568. fn: function (aClass,aClassName){
  1569. var self=this;
  1570. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1571. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1572. return smalltalk.withContext(function($ctx1) {
  1573. var $1;
  1574. $1=_st(_st($Smalltalk())._current())._at_(aClassName);
  1575. if(($receiver = $1) == nil || $receiver == undefined){
  1576. $1;
  1577. } else {
  1578. _st(self)._error_(_st(_st("A class named ").__comma(aClassName)).__comma(" already exists"));
  1579. };
  1580. _st(_st($ClassBuilder())._new())._copyClass_named_(aClass,aClassName);
  1581. return self}, function($ctx1) {$ctx1.fill(self,"copyClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.HLEnvironment)})},
  1582. messageSends: ["ifNotNil:", "error:", ",", "at:", "current", "copyClass:named:", "new"]}),
  1583. smalltalk.Environment);
  1584. smalltalk.addMethod(
  1585. smalltalk.method({
  1586. selector: "eval:on:",
  1587. fn: function (aString,aReceiver){
  1588. var self=this;
  1589. var compiler;
  1590. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  1591. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  1592. return smalltalk.withContext(function($ctx1) {
  1593. var $1,$2;
  1594. var $early={};
  1595. try {
  1596. compiler=_st($Compiler())._new();
  1597. _st((function(){
  1598. return smalltalk.withContext(function($ctx2) {
  1599. return _st(compiler)._parseExpression_(aString);
  1600. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($Error(),(function(ex){
  1601. return smalltalk.withContext(function($ctx2) {
  1602. $1=_st(window)._alert_(_st(ex)._messageText());
  1603. throw $early=[$1];
  1604. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  1605. $2=_st(compiler)._evaluateExpression_on_(aString,aReceiver);
  1606. return $2;
  1607. }
  1608. catch(e) {if(e===$early)return e[0]; throw e}
  1609. }, function($ctx1) {$ctx1.fill(self,"eval:on:",{aString:aString,aReceiver:aReceiver,compiler:compiler},smalltalk.Environment)})},
  1610. messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "evaluateExpression:on:"]}),
  1611. smalltalk.Environment);
  1612. smalltalk.addMethod(
  1613. smalltalk.method({
  1614. selector: "moveClass:toPackage:",
  1615. fn: function (aClass,aPackageName){
  1616. var self=this;
  1617. var package_;
  1618. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  1619. return smalltalk.withContext(function($ctx1) {
  1620. var $1,$2,$3;
  1621. package_=_st($Package())._named_(aPackageName);
  1622. $1=package_;
  1623. if(($receiver = $1) == nil || $receiver == undefined){
  1624. _st(self)._error_("Invalid package name");
  1625. } else {
  1626. $1;
  1627. };
  1628. $2=_st(package_).__eq_eq(_st(aClass)._package());
  1629. if(smalltalk.assert($2)){
  1630. $3=self;
  1631. return $3;
  1632. };
  1633. _st(aClass)._package_(package_);
  1634. return self}, function($ctx1) {$ctx1.fill(self,"moveClass:toPackage:",{aClass:aClass,aPackageName:aPackageName,package_:package_},smalltalk.HLEnvironment)})},
  1635. messageSends: ["named:", "ifNil:", "error:", "ifTrue:", "==", "package", "package:"]}),
  1636. smalltalk.Environment);
  1637. smalltalk.addMethod(
  1638. smalltalk.method({
  1639. selector: "moveMethod:toClass:",
  1640. fn: function (aMethod,aClassName){
  1641. var self=this;
  1642. var destinationClass;
  1643. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1644. return smalltalk.withContext(function($ctx1) {
  1645. var $1,$2,$3;
  1646. destinationClass=_st(_st($Smalltalk())._current())._at_(_st(aClassName)._asSymbol());
  1647. $1=destinationClass;
  1648. if(($receiver = $1) == nil || $receiver == undefined){
  1649. _st(self)._error_("Invalid class name");
  1650. } else {
  1651. $1;
  1652. };
  1653. $2=_st(destinationClass).__eq_eq(_st(aMethod)._methodClass());
  1654. if(smalltalk.assert($2)){
  1655. $3=self;
  1656. return $3;
  1657. };
  1658. _st(destinationClass)._compile_category_(_st(aMethod)._source(),_st(aMethod)._protocol());
  1659. _st(_st(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
  1660. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName,destinationClass:destinationClass},smalltalk.Environment)})},
  1661. messageSends: ["at:", "asSymbol", "current", "ifNil:", "error:", "ifTrue:", "==", "methodClass", "compile:category:", "source", "protocol", "removeCompiledMethod:"]}),
  1662. smalltalk.Environment);
  1663. smalltalk.addMethod(
  1664. smalltalk.method({
  1665. selector: "moveMethod:toProtocol:",
  1666. fn: function (aMethod,aProtocol){
  1667. var self=this;
  1668. return smalltalk.withContext(function($ctx1) {
  1669. _st(aMethod)._category_(aProtocol);
  1670. return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toProtocol:",{aMethod:aMethod,aProtocol:aProtocol},smalltalk.HLEnvironment)})},
  1671. messageSends: ["category:"]}),
  1672. smalltalk.Environment);
  1673. smalltalk.addMethod(
  1674. smalltalk.method({
  1675. selector: "packages",
  1676. fn: function (){
  1677. var self=this;
  1678. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1679. return smalltalk.withContext(function($ctx1) {
  1680. var $1;
  1681. $1=_st(_st($Smalltalk())._current())._packages();
  1682. return $1;
  1683. }, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.HLEnvironment)})},
  1684. messageSends: ["packages", "current"]}),
  1685. smalltalk.Environment);
  1686. smalltalk.addMethod(
  1687. smalltalk.method({
  1688. selector: "removeClass:",
  1689. fn: function (aClass){
  1690. var self=this;
  1691. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1692. return smalltalk.withContext(function($ctx1) {
  1693. _st(_st($Smalltalk())._current())._removeClass_(aClass);
  1694. return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.HLEnvironment)})},
  1695. messageSends: ["removeClass:", "current"]}),
  1696. smalltalk.Environment);
  1697. smalltalk.addMethod(
  1698. smalltalk.method({
  1699. selector: "removeMethod:",
  1700. fn: function (aMethod){
  1701. var self=this;
  1702. return smalltalk.withContext(function($ctx1) {
  1703. _st(_st(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
  1704. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod:",{aMethod:aMethod},smalltalk.Environment)})},
  1705. messageSends: ["removeCompiledMethod:", "methodClass"]}),
  1706. smalltalk.Environment);
  1707. smalltalk.addMethod(
  1708. smalltalk.method({
  1709. selector: "removeProtocol:from:",
  1710. fn: function (aString,aClass){
  1711. var self=this;
  1712. return smalltalk.withContext(function($ctx1) {
  1713. _st(_st(_st(aClass)._methods())._select_((function(each){
  1714. return smalltalk.withContext(function($ctx2) {
  1715. return _st(_st(each)._protocol()).__eq(aString);
  1716. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
  1717. return smalltalk.withContext(function($ctx2) {
  1718. return _st(aClass)._removeCompiledMethod_(each);
  1719. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1720. return self}, function($ctx1) {$ctx1.fill(self,"removeProtocol:from:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
  1721. messageSends: ["do:", "removeCompiledMethod:", "select:", "=", "protocol", "methods"]}),
  1722. smalltalk.Environment);
  1723. smalltalk.addMethod(
  1724. smalltalk.method({
  1725. selector: "renameClass:to:",
  1726. fn: function (aClass,aClassName){
  1727. var self=this;
  1728. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1729. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1730. return smalltalk.withContext(function($ctx1) {
  1731. var $1;
  1732. $1=_st(_st($Smalltalk())._current())._at_(aClassName);
  1733. if(($receiver = $1) == nil || $receiver == undefined){
  1734. $1;
  1735. } else {
  1736. _st(self)._error_(_st(_st("A class named ").__comma(aClassName)).__comma(" already exists"));
  1737. };
  1738. _st(_st($ClassBuilder())._new())._renameClass_to_(aClass,aClassName);
  1739. return self}, function($ctx1) {$ctx1.fill(self,"renameClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.HLEnvironment)})},
  1740. messageSends: ["ifNotNil:", "error:", ",", "at:", "current", "renameClass:to:", "new"]}),
  1741. smalltalk.Environment);
  1742. smalltalk.addMethod(
  1743. smalltalk.method({
  1744. selector: "renameProtocol:to:in:",
  1745. fn: function (aString,anotherString,aClass){
  1746. var self=this;
  1747. return smalltalk.withContext(function($ctx1) {
  1748. _st(_st(_st(aClass)._methods())._select_((function(each){
  1749. return smalltalk.withContext(function($ctx2) {
  1750. return _st(_st(each)._protocol()).__eq(aString);
  1751. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
  1752. return smalltalk.withContext(function($ctx2) {
  1753. return _st(each)._protocol_(anotherString);
  1754. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1755. return self}, function($ctx1) {$ctx1.fill(self,"renameProtocol:to:in:",{aString:aString,anotherString:anotherString,aClass:aClass},smalltalk.Environment)})},
  1756. messageSends: ["do:", "protocol:", "select:", "=", "protocol", "methods"]}),
  1757. smalltalk.Environment);
  1758. smalltalk.addMethod(
  1759. smalltalk.method({
  1760. selector: "setClassCommentOf:to:",
  1761. fn: function (aClass,aString){
  1762. var self=this;
  1763. return smalltalk.withContext(function($ctx1) {
  1764. _st(aClass)._comment_(aString);
  1765. return self}, function($ctx1) {$ctx1.fill(self,"setClassCommentOf:to:",{aClass:aClass,aString:aString},smalltalk.Environment)})},
  1766. messageSends: ["comment:"]}),
  1767. smalltalk.Environment);
  1768. smalltalk.addMethod(
  1769. smalltalk.method({
  1770. selector: "systemAnnouncer",
  1771. fn: function (){
  1772. var self=this;
  1773. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1774. return smalltalk.withContext(function($ctx1) {
  1775. var $1;
  1776. $1=_st(_st(_st($Smalltalk())._current())._at_("SystemAnnouncer"))._current();
  1777. return $1;
  1778. }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},smalltalk.Environment)})},
  1779. messageSends: ["current", "at:"]}),
  1780. smalltalk.Environment);
  1781. smalltalk.addClass('InspectorHandler', smalltalk.Object, [], 'Kernel-Objects');
  1782. smalltalk.InspectorHandler.klass.iVarNames = ['inspector'];
  1783. smalltalk.addMethod(
  1784. smalltalk.method({
  1785. selector: "inspect:",
  1786. fn: function (anObject){
  1787. var self=this;
  1788. return smalltalk.withContext(function($ctx1) {
  1789. var $1;
  1790. $1=_st(_st(self)._inspector())._inspect_(anObject);
  1791. return $1;
  1792. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.InspectorHandler.klass)})},
  1793. messageSends: ["inspect:", "inspector"]}),
  1794. smalltalk.InspectorHandler.klass);
  1795. smalltalk.addMethod(
  1796. smalltalk.method({
  1797. selector: "inspector",
  1798. fn: function (){
  1799. var self=this;
  1800. function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
  1801. return smalltalk.withContext(function($ctx1) {
  1802. var $2,$1;
  1803. $2=self["@inspector"];
  1804. if(($receiver = $2) == nil || $receiver == undefined){
  1805. self["@inspector"]=$Transcript();
  1806. $1=self["@inspector"];
  1807. } else {
  1808. $1=$2;
  1809. };
  1810. return $1;
  1811. }, function($ctx1) {$ctx1.fill(self,"inspector",{},smalltalk.InspectorHandler.klass)})},
  1812. messageSends: ["ifNil:"]}),
  1813. smalltalk.InspectorHandler.klass);
  1814. smalltalk.addMethod(
  1815. smalltalk.method({
  1816. selector: "register:",
  1817. fn: function (anInspector){
  1818. var self=this;
  1819. return smalltalk.withContext(function($ctx1) {
  1820. var $1;
  1821. self["@inspector"]=anInspector;
  1822. $1=self["@inspector"];
  1823. return $1;
  1824. }, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.InspectorHandler.klass)})},
  1825. messageSends: []}),
  1826. smalltalk.InspectorHandler.klass);
  1827. smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Objects');
  1828. smalltalk.addMethod(
  1829. smalltalk.method({
  1830. selector: "addObjectVariablesTo:",
  1831. fn: function (aDictionary){
  1832. var self=this;
  1833. return smalltalk.withContext(function($ctx1) {
  1834. for(var i in self['@jsObject']) {
  1835. aDictionary._at_put_(i, self['@jsObject'][i]);
  1836. }
  1837. ;
  1838. return self}, function($ctx1) {$ctx1.fill(self,"addObjectVariablesTo:",{aDictionary:aDictionary},smalltalk.JSObjectProxy)})},
  1839. messageSends: []}),
  1840. smalltalk.JSObjectProxy);
  1841. smalltalk.addMethod(
  1842. smalltalk.method({
  1843. selector: "at:",
  1844. fn: function (aString){
  1845. var self=this;
  1846. return smalltalk.withContext(function($ctx1) {
  1847. return self['@jsObject'][aString];
  1848. return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.JSObjectProxy)})},
  1849. messageSends: []}),
  1850. smalltalk.JSObjectProxy);
  1851. smalltalk.addMethod(
  1852. smalltalk.method({
  1853. selector: "at:ifAbsent:",
  1854. fn: function (aString,aBlock){
  1855. var self=this;
  1856. return smalltalk.withContext(function($ctx1) {
  1857. var obj = self['@jsObject'];
  1858. return aString in obj ? obj[aString] : aBlock();
  1859. ;
  1860. return self}, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
  1861. messageSends: []}),
  1862. smalltalk.JSObjectProxy);
  1863. smalltalk.addMethod(
  1864. smalltalk.method({
  1865. selector: "at:ifPresent:",
  1866. fn: function (aString,aBlock){
  1867. var self=this;
  1868. return smalltalk.withContext(function($ctx1) {
  1869. var obj = self['@jsObject'];
  1870. return aString in obj ? aBlock(obj[aString]) : nil;
  1871. ;
  1872. return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:",{aString:aString,aBlock:aBlock},smalltalk.JSObjectProxy)})},
  1873. messageSends: []}),
  1874. smalltalk.JSObjectProxy);
  1875. smalltalk.addMethod(
  1876. smalltalk.method({
  1877. selector: "at:ifPresent:ifAbsent:",
  1878. fn: function (aString,aBlock,anotherBlock){
  1879. var self=this;
  1880. return smalltalk.withContext(function($ctx1) {
  1881. var obj = self['@jsObject'];
  1882. return aString in obj ? aBlock(obj[aString]) : anotherBlock();
  1883. ;
  1884. return self}, function($ctx1) {$ctx1.fill(self,"at:ifPresent:ifAbsent:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.JSObjectProxy)})},
  1885. messageSends: []}),
  1886. smalltalk.JSObjectProxy);
  1887. smalltalk.addMethod(
  1888. smalltalk.method({
  1889. selector: "at:put:",
  1890. fn: function (aString,anObject){
  1891. var self=this;
  1892. return smalltalk.withContext(function($ctx1) {
  1893. self['@jsObject'][aString] = anObject;
  1894. return self}, function($ctx1) {$ctx1.fill(self,"at:put:",{aString:aString,anObject:anObject},smalltalk.JSObjectProxy)})},
  1895. messageSends: []}),
  1896. smalltalk.JSObjectProxy);
  1897. smalltalk.addMethod(
  1898. smalltalk.method({
  1899. selector: "doesNotUnderstand:",
  1900. fn: function (aMessage){
  1901. var self=this;
  1902. return smalltalk.withContext(function($ctx1) {
  1903. var $2,$1;
  1904. $2=_st(self)._lookupProperty_(_st(_st(aMessage)._selector())._asJavaScriptSelector());
  1905. if(($receiver = $2) == nil || $receiver == undefined){
  1906. $1=smalltalk.Object.fn.prototype._doesNotUnderstand_.apply(_st(self), [aMessage]);
  1907. } else {
  1908. var jsSelector;
  1909. jsSelector=$receiver;
  1910. $1=_st(self)._forwardMessage_withArguments_(jsSelector,_st(aMessage)._arguments());
  1911. };
  1912. return $1;
  1913. }, function($ctx1) {$ctx1.fill(self,"doesNotUnderstand:",{aMessage:aMessage},smalltalk.JSObjectProxy)})},
  1914. messageSends: ["ifNil:ifNotNil:", "doesNotUnderstand:", "forwardMessage:withArguments:", "arguments", "lookupProperty:", "asJavaScriptSelector", "selector"]}),
  1915. smalltalk.JSObjectProxy);
  1916. smalltalk.addMethod(
  1917. smalltalk.method({
  1918. selector: "forwardMessage:withArguments:",
  1919. fn: function (aString,anArray){
  1920. var self=this;
  1921. return smalltalk.withContext(function($ctx1) {
  1922. return smalltalk.send(self._jsObject(), aString, anArray);
  1923. ;
  1924. return self}, function($ctx1) {$ctx1.fill(self,"forwardMessage:withArguments:",{aString:aString,anArray:anArray},smalltalk.JSObjectProxy)})},
  1925. messageSends: []}),
  1926. smalltalk.JSObjectProxy);
  1927. smalltalk.addMethod(
  1928. smalltalk.method({
  1929. selector: "inspectOn:",
  1930. fn: function (anInspector){
  1931. var self=this;
  1932. var variables;
  1933. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  1934. return smalltalk.withContext(function($ctx1) {
  1935. variables=_st($Dictionary())._new();
  1936. _st(variables)._at_put_("#self",_st(self)._jsObject());
  1937. _st(anInspector)._setLabel_(_st(self)._printString());
  1938. _st(self)._addObjectVariablesTo_(variables);
  1939. _st(anInspector)._setVariables_(variables);
  1940. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.JSObjectProxy)})},
  1941. messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "addObjectVariablesTo:", "setVariables:"]}),
  1942. smalltalk.JSObjectProxy);
  1943. smalltalk.addMethod(
  1944. smalltalk.method({
  1945. selector: "jsObject",
  1946. fn: function (){
  1947. var self=this;
  1948. return smalltalk.withContext(function($ctx1) {
  1949. var $1;
  1950. $1=self["@jsObject"];
  1951. return $1;
  1952. }, function($ctx1) {$ctx1.fill(self,"jsObject",{},smalltalk.JSObjectProxy)})},
  1953. messageSends: []}),
  1954. smalltalk.JSObjectProxy);
  1955. smalltalk.addMethod(
  1956. smalltalk.method({
  1957. selector: "jsObject:",
  1958. fn: function (aJSObject){
  1959. var self=this;
  1960. return smalltalk.withContext(function($ctx1) {
  1961. self["@jsObject"]=aJSObject;
  1962. return self}, function($ctx1) {$ctx1.fill(self,"jsObject:",{aJSObject:aJSObject},smalltalk.JSObjectProxy)})},
  1963. messageSends: []}),
  1964. smalltalk.JSObjectProxy);
  1965. smalltalk.addMethod(
  1966. smalltalk.method({
  1967. selector: "keysAndValuesDo:",
  1968. fn: function (aBlock){
  1969. var self=this;
  1970. return smalltalk.withContext(function($ctx1) {
  1971. var o = self['@jsObject'];
  1972. for(var i in o) {
  1973. aBlock(i, o[i]);
  1974. }
  1975. ;
  1976. return self}, function($ctx1) {$ctx1.fill(self,"keysAndValuesDo:",{aBlock:aBlock},smalltalk.JSObjectProxy)})},
  1977. messageSends: []}),
  1978. smalltalk.JSObjectProxy);
  1979. smalltalk.addMethod(
  1980. smalltalk.method({
  1981. selector: "lookupProperty:",
  1982. fn: function (aString){
  1983. var self=this;
  1984. return smalltalk.withContext(function($ctx1) {
  1985. return aString in self._jsObject() ? aString : nil;
  1986. return self}, function($ctx1) {$ctx1.fill(self,"lookupProperty:",{aString:aString},smalltalk.JSObjectProxy)})},
  1987. messageSends: []}),
  1988. smalltalk.JSObjectProxy);
  1989. smalltalk.addMethod(
  1990. smalltalk.method({
  1991. selector: "printOn:",
  1992. fn: function (aStream){
  1993. var self=this;
  1994. return smalltalk.withContext(function($ctx1) {
  1995. _st(aStream)._nextPutAll_(_st(_st(self)._jsObject())._toString());
  1996. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.JSObjectProxy)})},
  1997. messageSends: ["nextPutAll:", "toString", "jsObject"]}),
  1998. smalltalk.JSObjectProxy);
  1999. smalltalk.addMethod(
  2000. smalltalk.method({
  2001. selector: "value",
  2002. fn: function (){
  2003. var self=this;
  2004. return smalltalk.withContext(function($ctx1) {
  2005. var $1;
  2006. $1=_st(self)._at_ifAbsent_("value",(function(){
  2007. return smalltalk.withContext(function($ctx2) {
  2008. return smalltalk.Object.fn.prototype._value.apply(_st(self), []);
  2009. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2010. return $1;
  2011. }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.JSObjectProxy)})},
  2012. messageSends: ["at:ifAbsent:", "value"]}),
  2013. smalltalk.JSObjectProxy);
  2014. smalltalk.addMethod(
  2015. smalltalk.method({
  2016. selector: "on:",
  2017. fn: function (aJSObject){
  2018. var self=this;
  2019. return smalltalk.withContext(function($ctx1) {
  2020. var $2,$3,$1;
  2021. $2=_st(self)._new();
  2022. _st($2)._jsObject_(aJSObject);
  2023. $3=_st($2)._yourself();
  2024. $1=$3;
  2025. return $1;
  2026. }, function($ctx1) {$ctx1.fill(self,"on:",{aJSObject:aJSObject},smalltalk.JSObjectProxy.klass)})},
  2027. messageSends: ["jsObject:", "new", "yourself"]}),
  2028. smalltalk.JSObjectProxy.klass);
  2029. smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel-Objects');
  2030. smalltalk.addMethod(
  2031. smalltalk.method({
  2032. selector: "&",
  2033. fn: function (aNumber){
  2034. var self=this;
  2035. return smalltalk.withContext(function($ctx1) {
  2036. return self & aNumber;
  2037. return self}, function($ctx1) {$ctx1.fill(self,"&",{aNumber:aNumber},smalltalk.Number)})},
  2038. messageSends: []}),
  2039. smalltalk.Number);
  2040. smalltalk.addMethod(
  2041. smalltalk.method({
  2042. selector: "*",
  2043. fn: function (aNumber){
  2044. var self=this;
  2045. return smalltalk.withContext(function($ctx1) {
  2046. return self * aNumber;
  2047. return self}, function($ctx1) {$ctx1.fill(self,"*",{aNumber:aNumber},smalltalk.Number)})},
  2048. messageSends: []}),
  2049. smalltalk.Number);
  2050. smalltalk.addMethod(
  2051. smalltalk.method({
  2052. selector: "+",
  2053. fn: function (aNumber){
  2054. var self=this;
  2055. return smalltalk.withContext(function($ctx1) {
  2056. return self + aNumber;
  2057. return self}, function($ctx1) {$ctx1.fill(self,"+",{aNumber:aNumber},smalltalk.Number)})},
  2058. messageSends: []}),
  2059. smalltalk.Number);
  2060. smalltalk.addMethod(
  2061. smalltalk.method({
  2062. selector: "-",
  2063. fn: function (aNumber){
  2064. var self=this;
  2065. return smalltalk.withContext(function($ctx1) {
  2066. return self - aNumber;
  2067. return self}, function($ctx1) {$ctx1.fill(self,"-",{aNumber:aNumber},smalltalk.Number)})},
  2068. messageSends: []}),
  2069. smalltalk.Number);
  2070. smalltalk.addMethod(
  2071. smalltalk.method({
  2072. selector: "/",
  2073. fn: function (aNumber){
  2074. var self=this;
  2075. return smalltalk.withContext(function($ctx1) {
  2076. return self / aNumber;
  2077. return self}, function($ctx1) {$ctx1.fill(self,"/",{aNumber:aNumber},smalltalk.Number)})},
  2078. messageSends: []}),
  2079. smalltalk.Number);
  2080. smalltalk.addMethod(
  2081. smalltalk.method({
  2082. selector: "<",
  2083. fn: function (aNumber){
  2084. var self=this;
  2085. return smalltalk.withContext(function($ctx1) {
  2086. return self < aNumber;
  2087. return self}, function($ctx1) {$ctx1.fill(self,"<",{aNumber:aNumber},smalltalk.Number)})},
  2088. messageSends: []}),
  2089. smalltalk.Number);
  2090. smalltalk.addMethod(
  2091. smalltalk.method({
  2092. selector: "<=",
  2093. fn: function (aNumber){
  2094. var self=this;
  2095. return smalltalk.withContext(function($ctx1) {
  2096. return self <= aNumber;
  2097. return self}, function($ctx1) {$ctx1.fill(self,"<=",{aNumber:aNumber},smalltalk.Number)})},
  2098. messageSends: []}),
  2099. smalltalk.Number);
  2100. smalltalk.addMethod(
  2101. smalltalk.method({
  2102. selector: "=",
  2103. fn: function (aNumber){
  2104. var self=this;
  2105. return smalltalk.withContext(function($ctx1) {
  2106. if(! aNumber._isNumber || ! aNumber._isNumber()) {
  2107. return false;
  2108. }
  2109. return Number(self) == aNumber
  2110. ;
  2111. return self}, function($ctx1) {$ctx1.fill(self,"=",{aNumber:aNumber},smalltalk.Number)})},
  2112. messageSends: []}),
  2113. smalltalk.Number);
  2114. smalltalk.addMethod(
  2115. smalltalk.method({
  2116. selector: ">",
  2117. fn: function (aNumber){
  2118. var self=this;
  2119. return smalltalk.withContext(function($ctx1) {
  2120. return self > aNumber;
  2121. return self}, function($ctx1) {$ctx1.fill(self,">",{aNumber:aNumber},smalltalk.Number)})},
  2122. messageSends: []}),
  2123. smalltalk.Number);
  2124. smalltalk.addMethod(
  2125. smalltalk.method({
  2126. selector: ">=",
  2127. fn: function (aNumber){
  2128. var self=this;
  2129. return smalltalk.withContext(function($ctx1) {
  2130. return self >= aNumber;
  2131. return self}, function($ctx1) {$ctx1.fill(self,">=",{aNumber:aNumber},smalltalk.Number)})},
  2132. messageSends: []}),
  2133. smalltalk.Number);
  2134. smalltalk.addMethod(
  2135. smalltalk.method({
  2136. selector: "@",
  2137. fn: function (aNumber){
  2138. var self=this;
  2139. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2140. return smalltalk.withContext(function($ctx1) {
  2141. var $1;
  2142. $1=_st($Point())._x_y_(self,aNumber);
  2143. return $1;
  2144. }, function($ctx1) {$ctx1.fill(self,"@",{aNumber:aNumber},smalltalk.Number)})},
  2145. messageSends: ["x:y:"]}),
  2146. smalltalk.Number);
  2147. smalltalk.addMethod(
  2148. smalltalk.method({
  2149. selector: "\x5c\x5c",
  2150. fn: function (aNumber){
  2151. var self=this;
  2152. return smalltalk.withContext(function($ctx1) {
  2153. return self % aNumber;
  2154. return self}, function($ctx1) {$ctx1.fill(self,"\x5c\x5c",{aNumber:aNumber},smalltalk.Number)})},
  2155. messageSends: []}),
  2156. smalltalk.Number);
  2157. smalltalk.addMethod(
  2158. smalltalk.method({
  2159. selector: "abs",
  2160. fn: function (){
  2161. var self=this;
  2162. return smalltalk.withContext(function($ctx1) {
  2163. return Math.abs(self);;
  2164. return self}, function($ctx1) {$ctx1.fill(self,"abs",{},smalltalk.Number)})},
  2165. messageSends: []}),
  2166. smalltalk.Number);
  2167. smalltalk.addMethod(
  2168. smalltalk.method({
  2169. selector: "asJSON",
  2170. fn: function (){
  2171. var self=this;
  2172. return smalltalk.withContext(function($ctx1) {
  2173. var $1;
  2174. $1=self;
  2175. return $1;
  2176. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Number)})},
  2177. messageSends: []}),
  2178. smalltalk.Number);
  2179. smalltalk.addMethod(
  2180. smalltalk.method({
  2181. selector: "asJavascript",
  2182. fn: function (){
  2183. var self=this;
  2184. return smalltalk.withContext(function($ctx1) {
  2185. var $1;
  2186. $1=_st(_st("(").__comma(_st(self)._printString())).__comma(")");
  2187. return $1;
  2188. }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Number)})},
  2189. messageSends: [",", "printString"]}),
  2190. smalltalk.Number);
  2191. smalltalk.addMethod(
  2192. smalltalk.method({
  2193. selector: "asPoint",
  2194. fn: function (){
  2195. var self=this;
  2196. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  2197. return smalltalk.withContext(function($ctx1) {
  2198. var $1;
  2199. $1=_st($Point())._x_y_(self,self);
  2200. return $1;
  2201. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Number)})},
  2202. messageSends: ["x:y:"]}),
  2203. smalltalk.Number);
  2204. smalltalk.addMethod(
  2205. smalltalk.method({
  2206. selector: "asString",
  2207. fn: function (){
  2208. var self=this;
  2209. return smalltalk.withContext(function($ctx1) {
  2210. return String(self) ;
  2211. return self}, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Number)})},
  2212. messageSends: []}),
  2213. smalltalk.Number);
  2214. smalltalk.addMethod(
  2215. smalltalk.method({
  2216. selector: "atRandom",
  2217. fn: function (){
  2218. var self=this;
  2219. function $Random(){return smalltalk.Random||(typeof Random=="undefined"?nil:Random)}
  2220. return smalltalk.withContext(function($ctx1) {
  2221. var $1;
  2222. $1=_st(_st(_st(_st(_st($Random())._new())._next()).__star(self))._truncated()).__plus((1));
  2223. return $1;
  2224. }, function($ctx1) {$ctx1.fill(self,"atRandom",{},smalltalk.Number)})},
  2225. messageSends: ["+", "truncated", "*", "next", "new"]}),
  2226. smalltalk.Number);
  2227. smalltalk.addMethod(
  2228. smalltalk.method({
  2229. selector: "copy",
  2230. fn: function (){
  2231. var self=this;
  2232. return smalltalk.withContext(function($ctx1) {
  2233. var $1;
  2234. $1=self;
  2235. return $1;
  2236. }, function($ctx1) {$ctx1.fill(self,"copy",{},smalltalk.Number)})},
  2237. messageSends: []}),
  2238. smalltalk.Number);
  2239. smalltalk.addMethod(
  2240. smalltalk.method({
  2241. selector: "deepCopy",
  2242. fn: function (){
  2243. var self=this;
  2244. return smalltalk.withContext(function($ctx1) {
  2245. var $1;
  2246. $1=_st(self)._copy();
  2247. return $1;
  2248. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Number)})},
  2249. messageSends: ["copy"]}),
  2250. smalltalk.Number);
  2251. smalltalk.addMethod(
  2252. smalltalk.method({
  2253. selector: "even",
  2254. fn: function (){
  2255. var self=this;
  2256. return smalltalk.withContext(function($ctx1) {
  2257. var $1;
  2258. $1=_st((0)).__eq(_st(self).__backslash_backslash((2)));
  2259. return $1;
  2260. }, function($ctx1) {$ctx1.fill(self,"even",{},smalltalk.Number)})},
  2261. messageSends: ["=", "\x5c\x5c"]}),
  2262. smalltalk.Number);
  2263. smalltalk.addMethod(
  2264. smalltalk.method({
  2265. selector: "identityHash",
  2266. fn: function (){
  2267. var self=this;
  2268. return smalltalk.withContext(function($ctx1) {
  2269. var $1;
  2270. $1=_st(_st(self)._asString()).__comma("n");
  2271. return $1;
  2272. }, function($ctx1) {$ctx1.fill(self,"identityHash",{},smalltalk.Number)})},
  2273. messageSends: [",", "asString"]}),
  2274. smalltalk.Number);
  2275. smalltalk.addMethod(
  2276. smalltalk.method({
  2277. selector: "isImmutable",
  2278. fn: function (){
  2279. var self=this;
  2280. return smalltalk.withContext(function($ctx1) {
  2281. return true;
  2282. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.Number)})},
  2283. messageSends: []}),
  2284. smalltalk.Number);
  2285. smalltalk.addMethod(
  2286. smalltalk.method({
  2287. selector: "isNumber",
  2288. fn: function (){
  2289. var self=this;
  2290. return smalltalk.withContext(function($ctx1) {
  2291. return true;
  2292. }, function($ctx1) {$ctx1.fill(self,"isNumber",{},smalltalk.Number)})},
  2293. messageSends: []}),
  2294. smalltalk.Number);
  2295. smalltalk.addMethod(
  2296. smalltalk.method({
  2297. selector: "isZero",
  2298. fn: function (){
  2299. var self=this;
  2300. return smalltalk.withContext(function($ctx1) {
  2301. var $1;
  2302. $1=_st(self).__eq((0));
  2303. return $1;
  2304. }, function($ctx1) {$ctx1.fill(self,"isZero",{},smalltalk.Number)})},
  2305. messageSends: ["="]}),
  2306. smalltalk.Number);
  2307. smalltalk.addMethod(
  2308. smalltalk.method({
  2309. selector: "max:",
  2310. fn: function (aNumber){
  2311. var self=this;
  2312. return smalltalk.withContext(function($ctx1) {
  2313. return Math.max(self, aNumber);;
  2314. return self}, function($ctx1) {$ctx1.fill(self,"max:",{aNumber:aNumber},smalltalk.Number)})},
  2315. messageSends: []}),
  2316. smalltalk.Number);
  2317. smalltalk.addMethod(
  2318. smalltalk.method({
  2319. selector: "min:",
  2320. fn: function (aNumber){
  2321. var self=this;
  2322. return smalltalk.withContext(function($ctx1) {
  2323. return Math.min(self, aNumber);;
  2324. return self}, function($ctx1) {$ctx1.fill(self,"min:",{aNumber:aNumber},smalltalk.Number)})},
  2325. messageSends: []}),
  2326. smalltalk.Number);
  2327. smalltalk.addMethod(
  2328. smalltalk.method({
  2329. selector: "negated",
  2330. fn: function (){
  2331. var self=this;
  2332. return smalltalk.withContext(function($ctx1) {
  2333. var $1;
  2334. $1=_st((0)).__minus(self);
  2335. return $1;
  2336. }, function($ctx1) {$ctx1.fill(self,"negated",{},smalltalk.Number)})},
  2337. messageSends: ["-"]}),
  2338. smalltalk.Number);
  2339. smalltalk.addMethod(
  2340. smalltalk.method({
  2341. selector: "negative",
  2342. fn: function (){
  2343. var self=this;
  2344. return smalltalk.withContext(function($ctx1) {
  2345. var $1;
  2346. $1=_st(self).__lt((0));
  2347. return $1;
  2348. }, function($ctx1) {$ctx1.fill(self,"negative",{},smalltalk.Number)})},
  2349. messageSends: ["<"]}),
  2350. smalltalk.Number);
  2351. smalltalk.addMethod(
  2352. smalltalk.method({
  2353. selector: "odd",
  2354. fn: function (){
  2355. var self=this;
  2356. return smalltalk.withContext(function($ctx1) {
  2357. var $1;
  2358. $1=_st(_st(self)._even())._not();
  2359. return $1;
  2360. }, function($ctx1) {$ctx1.fill(self,"odd",{},smalltalk.Number)})},
  2361. messageSends: ["not", "even"]}),
  2362. smalltalk.Number);
  2363. smalltalk.addMethod(
  2364. smalltalk.method({
  2365. selector: "positive",
  2366. fn: function (){
  2367. var self=this;
  2368. return smalltalk.withContext(function($ctx1) {
  2369. var $1;
  2370. $1=_st(self).__gt_eq((0));
  2371. return $1;
  2372. }, function($ctx1) {$ctx1.fill(self,"positive",{},smalltalk.Number)})},
  2373. messageSends: [">="]}),
  2374. smalltalk.Number);
  2375. smalltalk.addMethod(
  2376. smalltalk.method({
  2377. selector: "printOn:",
  2378. fn: function (aStream){
  2379. var self=this;
  2380. return smalltalk.withContext(function($ctx1) {
  2381. _st(aStream)._nextPutAll_(_st(self)._asString());
  2382. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Number)})},
  2383. messageSends: ["nextPutAll:", "asString"]}),
  2384. smalltalk.Number);
  2385. smalltalk.addMethod(
  2386. smalltalk.method({
  2387. selector: "printShowingDecimalPlaces:",
  2388. fn: function (placesDesired){
  2389. var self=this;
  2390. return smalltalk.withContext(function($ctx1) {
  2391. return self.toFixed(placesDesired);
  2392. return self}, function($ctx1) {$ctx1.fill(self,"printShowingDecimalPlaces:",{placesDesired:placesDesired},smalltalk.Number)})},
  2393. messageSends: []}),
  2394. smalltalk.Number);
  2395. smalltalk.addMethod(
  2396. smalltalk.method({
  2397. selector: "rounded",
  2398. fn: function (){
  2399. var self=this;
  2400. return smalltalk.withContext(function($ctx1) {
  2401. return Math.round(self);;
  2402. return self}, function($ctx1) {$ctx1.fill(self,"rounded",{},smalltalk.Number)})},
  2403. messageSends: []}),
  2404. smalltalk.Number);
  2405. smalltalk.addMethod(
  2406. smalltalk.method({
  2407. selector: "sqrt",
  2408. fn: function (){
  2409. var self=this;
  2410. return smalltalk.withContext(function($ctx1) {
  2411. return Math.sqrt(self);
  2412. return self}, function($ctx1) {$ctx1.fill(self,"sqrt",{},smalltalk.Number)})},
  2413. messageSends: []}),
  2414. smalltalk.Number);
  2415. smalltalk.addMethod(
  2416. smalltalk.method({
  2417. selector: "squared",
  2418. fn: function (){
  2419. var self=this;
  2420. return smalltalk.withContext(function($ctx1) {
  2421. var $1;
  2422. $1=_st(self).__star(self);
  2423. return $1;
  2424. }, function($ctx1) {$ctx1.fill(self,"squared",{},smalltalk.Number)})},
  2425. messageSends: ["*"]}),
  2426. smalltalk.Number);
  2427. smalltalk.addMethod(
  2428. smalltalk.method({
  2429. selector: "timesRepeat:",
  2430. fn: function (aBlock){
  2431. var self=this;
  2432. var count;
  2433. return smalltalk.withContext(function($ctx1) {
  2434. count=(1);
  2435. _st((function(){
  2436. return smalltalk.withContext(function($ctx2) {
  2437. return _st(count).__gt(self);
  2438. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileFalse_((function(){
  2439. return smalltalk.withContext(function($ctx2) {
  2440. _st(aBlock)._value();
  2441. count=_st(count).__plus((1));
  2442. return count;
  2443. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2444. return self}, function($ctx1) {$ctx1.fill(self,"timesRepeat:",{aBlock:aBlock,count:count},smalltalk.Number)})},
  2445. messageSends: ["whileFalse:", "value", "+", ">"]}),
  2446. smalltalk.Number);
  2447. smalltalk.addMethod(
  2448. smalltalk.method({
  2449. selector: "to:",
  2450. fn: function (aNumber){
  2451. var self=this;
  2452. var array,first,last,count;
  2453. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2454. return smalltalk.withContext(function($ctx1) {
  2455. var $1;
  2456. first=_st(self)._truncated();
  2457. last=_st(_st(aNumber)._truncated()).__plus((1));
  2458. count=(1);
  2459. array=_st($Array())._new();
  2460. _st(_st(last).__minus(first))._timesRepeat_((function(){
  2461. return smalltalk.withContext(function($ctx2) {
  2462. _st(array)._at_put_(count,first);
  2463. count=_st(count).__plus((1));
  2464. count;
  2465. first=_st(first).__plus((1));
  2466. return first;
  2467. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2468. $1=array;
  2469. return $1;
  2470. }, function($ctx1) {$ctx1.fill(self,"to:",{aNumber:aNumber,array:array,first:first,last:last,count:count},smalltalk.Number)})},
  2471. messageSends: ["truncated", "+", "new", "timesRepeat:", "at:put:", "-"]}),
  2472. smalltalk.Number);
  2473. smalltalk.addMethod(
  2474. smalltalk.method({
  2475. selector: "to:by:",
  2476. fn: function (stop,step){
  2477. var self=this;
  2478. var array,value,pos;
  2479. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2480. return smalltalk.withContext(function($ctx1) {
  2481. var $1,$2,$3;
  2482. value=self;
  2483. array=_st($Array())._new();
  2484. pos=(1);
  2485. $1=_st(step).__eq((0));
  2486. if(smalltalk.assert($1)){
  2487. _st(self)._error_("step must be non-zero");
  2488. };
  2489. $2=_st(step).__lt((0));
  2490. if(smalltalk.assert($2)){
  2491. _st((function(){
  2492. return smalltalk.withContext(function($ctx2) {
  2493. return _st(value).__gt_eq(stop);
  2494. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2495. return smalltalk.withContext(function($ctx2) {
  2496. _st(array)._at_put_(pos,value);
  2497. pos=_st(pos).__plus((1));
  2498. pos;
  2499. value=_st(value).__plus(step);
  2500. return value;
  2501. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2502. } else {
  2503. _st((function(){
  2504. return smalltalk.withContext(function($ctx2) {
  2505. return _st(value).__lt_eq(stop);
  2506. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2507. return smalltalk.withContext(function($ctx2) {
  2508. _st(array)._at_put_(pos,value);
  2509. pos=_st(pos).__plus((1));
  2510. pos;
  2511. value=_st(value).__plus(step);
  2512. return value;
  2513. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2514. };
  2515. $3=array;
  2516. return $3;
  2517. }, function($ctx1) {$ctx1.fill(self,"to:by:",{stop:stop,step:step,array:array,value:value,pos:pos},smalltalk.Number)})},
  2518. messageSends: ["new", "ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "at:put:", "+", ">=", "<=", "<"]}),
  2519. smalltalk.Number);
  2520. smalltalk.addMethod(
  2521. smalltalk.method({
  2522. selector: "to:by:do:",
  2523. fn: function (stop,step,aBlock){
  2524. var self=this;
  2525. var value;
  2526. return smalltalk.withContext(function($ctx1) {
  2527. var $1,$2;
  2528. value=self;
  2529. $1=_st(step).__eq((0));
  2530. if(smalltalk.assert($1)){
  2531. _st(self)._error_("step must be non-zero");
  2532. };
  2533. $2=_st(step).__lt((0));
  2534. if(smalltalk.assert($2)){
  2535. _st((function(){
  2536. return smalltalk.withContext(function($ctx2) {
  2537. return _st(value).__gt_eq(stop);
  2538. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2539. return smalltalk.withContext(function($ctx2) {
  2540. _st(aBlock)._value_(value);
  2541. value=_st(value).__plus(step);
  2542. return value;
  2543. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2544. } else {
  2545. _st((function(){
  2546. return smalltalk.withContext(function($ctx2) {
  2547. return _st(value).__lt_eq(stop);
  2548. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2549. return smalltalk.withContext(function($ctx2) {
  2550. _st(aBlock)._value_(value);
  2551. value=_st(value).__plus(step);
  2552. return value;
  2553. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2554. };
  2555. return self}, function($ctx1) {$ctx1.fill(self,"to:by:do:",{stop:stop,step:step,aBlock:aBlock,value:value},smalltalk.Number)})},
  2556. messageSends: ["ifTrue:", "error:", "=", "ifTrue:ifFalse:", "whileTrue:", "value:", "+", ">=", "<=", "<"]}),
  2557. smalltalk.Number);
  2558. smalltalk.addMethod(
  2559. smalltalk.method({
  2560. selector: "to:do:",
  2561. fn: function (stop,aBlock){
  2562. var self=this;
  2563. var nextValue;
  2564. return smalltalk.withContext(function($ctx1) {
  2565. nextValue=self;
  2566. _st((function(){
  2567. return smalltalk.withContext(function($ctx2) {
  2568. return _st(nextValue).__lt_eq(stop);
  2569. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  2570. return smalltalk.withContext(function($ctx2) {
  2571. _st(aBlock)._value_(nextValue);
  2572. nextValue=_st(nextValue).__plus((1));
  2573. return nextValue;
  2574. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2575. return self}, function($ctx1) {$ctx1.fill(self,"to:do:",{stop:stop,aBlock:aBlock,nextValue:nextValue},smalltalk.Number)})},
  2576. messageSends: ["whileTrue:", "value:", "+", "<="]}),
  2577. smalltalk.Number);
  2578. smalltalk.addMethod(
  2579. smalltalk.method({
  2580. selector: "truncated",
  2581. fn: function (){
  2582. var self=this;
  2583. return smalltalk.withContext(function($ctx1) {
  2584. if(self >= 0) {
  2585. return Math.floor(self);
  2586. } else {
  2587. return Math.floor(self * (-1)) * (-1);
  2588. };
  2589. ;
  2590. return self}, function($ctx1) {$ctx1.fill(self,"truncated",{},smalltalk.Number)})},
  2591. messageSends: []}),
  2592. smalltalk.Number);
  2593. smalltalk.addMethod(
  2594. smalltalk.method({
  2595. selector: "|",
  2596. fn: function (aNumber){
  2597. var self=this;
  2598. return smalltalk.withContext(function($ctx1) {
  2599. return self | aNumber;
  2600. return self}, function($ctx1) {$ctx1.fill(self,"|",{aNumber:aNumber},smalltalk.Number)})},
  2601. messageSends: []}),
  2602. smalltalk.Number);
  2603. smalltalk.addMethod(
  2604. smalltalk.method({
  2605. selector: "pi",
  2606. fn: function (){
  2607. var self=this;
  2608. return smalltalk.withContext(function($ctx1) {
  2609. return Math.PI;
  2610. return self}, function($ctx1) {$ctx1.fill(self,"pi",{},smalltalk.Number.klass)})},
  2611. messageSends: []}),
  2612. smalltalk.Number.klass);
  2613. smalltalk.addClass('Organizer', smalltalk.Object, [], 'Kernel-Objects');
  2614. smalltalk.addMethod(
  2615. smalltalk.method({
  2616. selector: "addElement:",
  2617. fn: function (anObject){
  2618. var self=this;
  2619. return smalltalk.withContext(function($ctx1) {
  2620. self.elements.addElement(anObject);
  2621. return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{anObject:anObject},smalltalk.Organizer)})},
  2622. messageSends: []}),
  2623. smalltalk.Organizer);
  2624. smalltalk.addMethod(
  2625. smalltalk.method({
  2626. selector: "elements",
  2627. fn: function (){
  2628. var self=this;
  2629. return smalltalk.withContext(function($ctx1) {
  2630. var $1;
  2631. $1=_st(_st(self)._basicAt_("elements"))._copy();
  2632. return $1;
  2633. }, function($ctx1) {$ctx1.fill(self,"elements",{},smalltalk.Organizer)})},
  2634. messageSends: ["copy", "basicAt:"]}),
  2635. smalltalk.Organizer);
  2636. smalltalk.addMethod(
  2637. smalltalk.method({
  2638. selector: "removeElement:",
  2639. fn: function (anObject){
  2640. var self=this;
  2641. return smalltalk.withContext(function($ctx1) {
  2642. self.elements.removeElement(anObject);
  2643. return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{anObject:anObject},smalltalk.Organizer)})},
  2644. messageSends: []}),
  2645. smalltalk.Organizer);
  2646. smalltalk.addClass('ClassOrganizer', smalltalk.Organizer, [], 'Kernel-Objects');
  2647. smalltalk.addMethod(
  2648. smalltalk.method({
  2649. selector: "addElement:",
  2650. fn: function (aString){
  2651. var self=this;
  2652. function $ProtocolAdded(){return smalltalk.ProtocolAdded||(typeof ProtocolAdded=="undefined"?nil:ProtocolAdded)}
  2653. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  2654. return smalltalk.withContext(function($ctx1) {
  2655. var $1,$2;
  2656. smalltalk.Organizer.fn.prototype._addElement_.apply(_st(self), [aString]);
  2657. $1=_st($ProtocolAdded())._new();
  2658. _st($1)._protocol_(aString);
  2659. _st($1)._theClass_(_st(self)._theClass());
  2660. $2=_st($1)._yourself();
  2661. _st(_st($SystemAnnouncer())._current())._announce_($2);
  2662. return self}, function($ctx1) {$ctx1.fill(self,"addElement:",{aString:aString},smalltalk.ClassOrganizer)})},
  2663. messageSends: ["addElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"]}),
  2664. smalltalk.ClassOrganizer);
  2665. smalltalk.addMethod(
  2666. smalltalk.method({
  2667. selector: "removeElement:",
  2668. fn: function (aString){
  2669. var self=this;
  2670. function $ProtocolRemoved(){return smalltalk.ProtocolRemoved||(typeof ProtocolRemoved=="undefined"?nil:ProtocolRemoved)}
  2671. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  2672. return smalltalk.withContext(function($ctx1) {
  2673. var $1,$2;
  2674. smalltalk.Organizer.fn.prototype._removeElement_.apply(_st(self), [aString]);
  2675. $1=_st($ProtocolRemoved())._new();
  2676. _st($1)._protocol_(aString);
  2677. _st($1)._theClass_(_st(self)._theClass());
  2678. $2=_st($1)._yourself();
  2679. _st(_st($SystemAnnouncer())._current())._announce_($2);
  2680. return self}, function($ctx1) {$ctx1.fill(self,"removeElement:",{aString:aString},smalltalk.ClassOrganizer)})},
  2681. messageSends: ["removeElement:", "announce:", "protocol:", "new", "theClass:", "theClass", "yourself", "current"]}),
  2682. smalltalk.ClassOrganizer);
  2683. smalltalk.addMethod(
  2684. smalltalk.method({
  2685. selector: "theClass",
  2686. fn: function (){
  2687. var self=this;
  2688. return smalltalk.withContext(function($ctx1) {
  2689. return self.theClass ;
  2690. return self}, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassOrganizer)})},
  2691. messageSends: []}),
  2692. smalltalk.ClassOrganizer);
  2693. smalltalk.addClass('PackageOrganizer', smalltalk.Organizer, [], 'Kernel-Objects');
  2694. smalltalk.addClass('Package', smalltalk.Object, ['commitPathJs', 'commitPathSt'], 'Kernel-Objects');
  2695. smalltalk.addMethod(
  2696. smalltalk.method({
  2697. selector: "classes",
  2698. fn: function (){
  2699. var self=this;
  2700. return smalltalk.withContext(function($ctx1) {
  2701. var $1;
  2702. $1=_st(_st(self)._organization())._elements();
  2703. return $1;
  2704. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Package)})},
  2705. messageSends: ["elements", "organization"]}),
  2706. smalltalk.Package);
  2707. smalltalk.addMethod(
  2708. smalltalk.method({
  2709. selector: "commitPathJs",
  2710. fn: function (){
  2711. var self=this;
  2712. return smalltalk.withContext(function($ctx1) {
  2713. var $2,$1;
  2714. $2=self["@commitPathJs"];
  2715. if(($receiver = $2) == nil || $receiver == undefined){
  2716. $1=_st(_st(self)._class())._defaultCommitPathJs();
  2717. } else {
  2718. $1=$2;
  2719. };
  2720. return $1;
  2721. }, function($ctx1) {$ctx1.fill(self,"commitPathJs",{},smalltalk.Package)})},
  2722. messageSends: ["ifNil:", "defaultCommitPathJs", "class"]}),
  2723. smalltalk.Package);
  2724. smalltalk.addMethod(
  2725. smalltalk.method({
  2726. selector: "commitPathJs:",
  2727. fn: function (aString){
  2728. var self=this;
  2729. return smalltalk.withContext(function($ctx1) {
  2730. self["@commitPathJs"]=aString;
  2731. return self}, function($ctx1) {$ctx1.fill(self,"commitPathJs:",{aString:aString},smalltalk.Package)})},
  2732. messageSends: []}),
  2733. smalltalk.Package);
  2734. smalltalk.addMethod(
  2735. smalltalk.method({
  2736. selector: "commitPathSt",
  2737. fn: function (){
  2738. var self=this;
  2739. return smalltalk.withContext(function($ctx1) {
  2740. var $2,$1;
  2741. $2=self["@commitPathSt"];
  2742. if(($receiver = $2) == nil || $receiver == undefined){
  2743. $1=_st(_st(self)._class())._defaultCommitPathSt();
  2744. } else {
  2745. $1=$2;
  2746. };
  2747. return $1;
  2748. }, function($ctx1) {$ctx1.fill(self,"commitPathSt",{},smalltalk.Package)})},
  2749. messageSends: ["ifNil:", "defaultCommitPathSt", "class"]}),
  2750. smalltalk.Package);
  2751. smalltalk.addMethod(
  2752. smalltalk.method({
  2753. selector: "commitPathSt:",
  2754. fn: function (aString){
  2755. var self=this;
  2756. return smalltalk.withContext(function($ctx1) {
  2757. self["@commitPathSt"]=aString;
  2758. return self}, function($ctx1) {$ctx1.fill(self,"commitPathSt:",{aString:aString},smalltalk.Package)})},
  2759. messageSends: []}),
  2760. smalltalk.Package);
  2761. smalltalk.addMethod(
  2762. smalltalk.method({
  2763. selector: "isPackage",
  2764. fn: function (){
  2765. var self=this;
  2766. return smalltalk.withContext(function($ctx1) {
  2767. return true;
  2768. }, function($ctx1) {$ctx1.fill(self,"isPackage",{},smalltalk.Package)})},
  2769. messageSends: []}),
  2770. smalltalk.Package);
  2771. smalltalk.addMethod(
  2772. smalltalk.method({
  2773. selector: "name",
  2774. fn: function (){
  2775. var self=this;
  2776. return smalltalk.withContext(function($ctx1) {
  2777. return self.pkgName;
  2778. return self}, function($ctx1) {$ctx1.fill(self,"name",{},smalltalk.Package)})},
  2779. messageSends: []}),
  2780. smalltalk.Package);
  2781. smalltalk.addMethod(
  2782. smalltalk.method({
  2783. selector: "name:",
  2784. fn: function (aString){
  2785. var self=this;
  2786. return smalltalk.withContext(function($ctx1) {
  2787. self.pkgName = aString;
  2788. return self}, function($ctx1) {$ctx1.fill(self,"name:",{aString:aString},smalltalk.Package)})},
  2789. messageSends: []}),
  2790. smalltalk.Package);
  2791. smalltalk.addMethod(
  2792. smalltalk.method({
  2793. selector: "organization",
  2794. fn: function (){
  2795. var self=this;
  2796. return smalltalk.withContext(function($ctx1) {
  2797. var $1;
  2798. $1=_st(self)._basicAt_("organization");
  2799. return $1;
  2800. }, function($ctx1) {$ctx1.fill(self,"organization",{},smalltalk.Package)})},
  2801. messageSends: ["basicAt:"]}),
  2802. smalltalk.Package);
  2803. smalltalk.addMethod(
  2804. smalltalk.method({
  2805. selector: "printOn:",
  2806. fn: function (aStream){
  2807. var self=this;
  2808. return smalltalk.withContext(function($ctx1) {
  2809. var $1,$2;
  2810. smalltalk.Object.fn.prototype._printOn_.apply(_st(self), [aStream]);
  2811. $1=aStream;
  2812. _st($1)._nextPutAll_(" (");
  2813. _st($1)._nextPutAll_(_st(self)._name());
  2814. $2=_st($1)._nextPutAll_(")");
  2815. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Package)})},
  2816. messageSends: ["printOn:", "nextPutAll:", "name"]}),
  2817. smalltalk.Package);
  2818. smalltalk.addMethod(
  2819. smalltalk.method({
  2820. selector: "setupClasses",
  2821. fn: function (){
  2822. var self=this;
  2823. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2824. return smalltalk.withContext(function($ctx1) {
  2825. var $1,$2;
  2826. $1=_st(self)._classes();
  2827. _st($1)._do_((function(each){
  2828. return smalltalk.withContext(function($ctx2) {
  2829. return _st(_st($ClassBuilder())._new())._setupClass_(each);
  2830. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2831. $2=_st($1)._do_((function(each){
  2832. return smalltalk.withContext(function($ctx2) {
  2833. return _st(each)._initialize();
  2834. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2835. return self}, function($ctx1) {$ctx1.fill(self,"setupClasses",{},smalltalk.Package)})},
  2836. messageSends: ["do:", "setupClass:", "new", "classes", "initialize"]}),
  2837. smalltalk.Package);
  2838. smalltalk.addMethod(
  2839. smalltalk.method({
  2840. selector: "sortedClasses",
  2841. fn: function (){
  2842. var self=this;
  2843. return smalltalk.withContext(function($ctx1) {
  2844. var $1;
  2845. $1=_st(_st(self)._class())._sortedClasses_(_st(self)._classes());
  2846. return $1;
  2847. }, function($ctx1) {$ctx1.fill(self,"sortedClasses",{},smalltalk.Package)})},
  2848. messageSends: ["sortedClasses:", "classes", "class"]}),
  2849. smalltalk.Package);
  2850. smalltalk.Package.klass.iVarNames = ['defaultCommitPathJs','defaultCommitPathSt'];
  2851. smalltalk.addMethod(
  2852. smalltalk.method({
  2853. selector: "commitPathsFromLoader",
  2854. fn: function (){
  2855. var self=this;
  2856. return smalltalk.withContext(function($ctx1) {
  2857. var commitPath = typeof amber !== 'undefined' && amber.commitPath;
  2858. if (!commitPath) return;
  2859. if (commitPath.js) self._defaultCommitPathJs_(commitPath.js);
  2860. if (commitPath.st) self._defaultCommitPathSt_(commitPath.st);
  2861. ;
  2862. return self}, function($ctx1) {$ctx1.fill(self,"commitPathsFromLoader",{},smalltalk.Package.klass)})},
  2863. messageSends: []}),
  2864. smalltalk.Package.klass);
  2865. smalltalk.addMethod(
  2866. smalltalk.method({
  2867. selector: "defaultCommitPathJs",
  2868. fn: function (){
  2869. var self=this;
  2870. return smalltalk.withContext(function($ctx1) {
  2871. var $2,$1;
  2872. $2=self["@defaultCommitPathJs"];
  2873. if(($receiver = $2) == nil || $receiver == undefined){
  2874. self["@defaultCommitPathJs"]="js";
  2875. $1=self["@defaultCommitPathJs"];
  2876. } else {
  2877. $1=$2;
  2878. };
  2879. return $1;
  2880. }, function($ctx1) {$ctx1.fill(self,"defaultCommitPathJs",{},smalltalk.Package.klass)})},
  2881. messageSends: ["ifNil:"]}),
  2882. smalltalk.Package.klass);
  2883. smalltalk.addMethod(
  2884. smalltalk.method({
  2885. selector: "defaultCommitPathJs:",
  2886. fn: function (aString){
  2887. var self=this;
  2888. return smalltalk.withContext(function($ctx1) {
  2889. self["@defaultCommitPathJs"]=aString;
  2890. return self}, function($ctx1) {$ctx1.fill(self,"defaultCommitPathJs:",{aString:aString},smalltalk.Package.klass)})},
  2891. messageSends: []}),
  2892. smalltalk.Package.klass);
  2893. smalltalk.addMethod(
  2894. smalltalk.method({
  2895. selector: "defaultCommitPathSt",
  2896. fn: function (){
  2897. var self=this;
  2898. return smalltalk.withContext(function($ctx1) {
  2899. var $2,$1;
  2900. $2=self["@defaultCommitPathSt"];
  2901. if(($receiver = $2) == nil || $receiver == undefined){
  2902. self["@defaultCommitPathSt"]="st";
  2903. $1=self["@defaultCommitPathSt"];
  2904. } else {
  2905. $1=$2;
  2906. };
  2907. return $1;
  2908. }, function($ctx1) {$ctx1.fill(self,"defaultCommitPathSt",{},smalltalk.Package.klass)})},
  2909. messageSends: ["ifNil:"]}),
  2910. smalltalk.Package.klass);
  2911. smalltalk.addMethod(
  2912. smalltalk.method({
  2913. selector: "defaultCommitPathSt:",
  2914. fn: function (aString){
  2915. var self=this;
  2916. return smalltalk.withContext(function($ctx1) {
  2917. self["@defaultCommitPathSt"]=aString;
  2918. return self}, function($ctx1) {$ctx1.fill(self,"defaultCommitPathSt:",{aString:aString},smalltalk.Package.klass)})},
  2919. messageSends: []}),
  2920. smalltalk.Package.klass);
  2921. smalltalk.addMethod(
  2922. smalltalk.method({
  2923. selector: "initialize",
  2924. fn: function (){
  2925. var self=this;
  2926. return smalltalk.withContext(function($ctx1) {
  2927. smalltalk.Object.klass.fn.prototype._initialize.apply(_st(self), []);
  2928. _st(self)._commitPathsFromLoader();
  2929. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Package.klass)})},
  2930. messageSends: ["initialize", "commitPathsFromLoader"]}),
  2931. smalltalk.Package.klass);
  2932. smalltalk.addMethod(
  2933. smalltalk.method({
  2934. selector: "load:",
  2935. fn: function (aPackageName){
  2936. var self=this;
  2937. return smalltalk.withContext(function($ctx1) {
  2938. _st(self)._load_prefix_(aPackageName,_st(_st(self)._defaultCommitPathJs()).__comma("/"));
  2939. return self}, function($ctx1) {$ctx1.fill(self,"load:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
  2940. messageSends: ["load:prefix:", ",", "defaultCommitPathJs"]}),
  2941. smalltalk.Package.klass);
  2942. smalltalk.addMethod(
  2943. smalltalk.method({
  2944. selector: "load:prefix:",
  2945. fn: function (aPackageName,aPrefix){
  2946. var self=this;
  2947. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  2948. return smalltalk.withContext(function($ctx1) {
  2949. _st(jQuery)._getScript_onSuccess_(_st(_st(aPrefix).__comma(aPackageName)).__comma(".js"),(function(){
  2950. return smalltalk.withContext(function($ctx2) {
  2951. return _st(_st($Package())._named_(aPackageName))._setupClasses();
  2952. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2953. return self}, function($ctx1) {$ctx1.fill(self,"load:prefix:",{aPackageName:aPackageName,aPrefix:aPrefix},smalltalk.Package.klass)})},
  2954. messageSends: ["getScript:onSuccess:", ",", "setupClasses", "named:"]}),
  2955. smalltalk.Package.klass);
  2956. smalltalk.addMethod(
  2957. smalltalk.method({
  2958. selector: "named:",
  2959. fn: function (aPackageName){
  2960. var self=this;
  2961. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2962. return smalltalk.withContext(function($ctx1) {
  2963. var $1;
  2964. $1=_st(_st($Smalltalk())._current())._packageAt_(aPackageName);
  2965. return $1;
  2966. }, function($ctx1) {$ctx1.fill(self,"named:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
  2967. messageSends: ["packageAt:", "current"]}),
  2968. smalltalk.Package.klass);
  2969. smalltalk.addMethod(
  2970. smalltalk.method({
  2971. selector: "named:ifAbsent:",
  2972. fn: function (aPackageName,aBlock){
  2973. var self=this;
  2974. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2975. return smalltalk.withContext(function($ctx1) {
  2976. var $1;
  2977. $1=_st(_st($Smalltalk())._current())._packageAt_ifAbsent_(aPackageName,aBlock);
  2978. return $1;
  2979. }, function($ctx1) {$ctx1.fill(self,"named:ifAbsent:",{aPackageName:aPackageName,aBlock:aBlock},smalltalk.Package.klass)})},
  2980. messageSends: ["packageAt:ifAbsent:", "current"]}),
  2981. smalltalk.Package.klass);
  2982. smalltalk.addMethod(
  2983. smalltalk.method({
  2984. selector: "resetCommitPaths",
  2985. fn: function (){
  2986. var self=this;
  2987. return smalltalk.withContext(function($ctx1) {
  2988. self["@defaultCommitPathJs"]=nil;
  2989. self["@defaultCommitPathSt"]=nil;
  2990. return self}, function($ctx1) {$ctx1.fill(self,"resetCommitPaths",{},smalltalk.Package.klass)})},
  2991. messageSends: []}),
  2992. smalltalk.Package.klass);
  2993. smalltalk.addMethod(
  2994. smalltalk.method({
  2995. selector: "sortedClasses:",
  2996. fn: function (classes){
  2997. var self=this;
  2998. var children,others,nodes,expandedClasses;
  2999. function $ClassSorterNode(){return smalltalk.ClassSorterNode||(typeof ClassSorterNode=="undefined"?nil:ClassSorterNode)}
  3000. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  3001. return smalltalk.withContext(function($ctx1) {
  3002. var $1,$2;
  3003. children=[];
  3004. others=[];
  3005. _st(classes)._do_((function(each){
  3006. return smalltalk.withContext(function($ctx2) {
  3007. $1=_st(classes)._includes_(_st(each)._superclass());
  3008. if(smalltalk.assert($1)){
  3009. return _st(others)._add_(each);
  3010. } else {
  3011. return _st(children)._add_(each);
  3012. };
  3013. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3014. nodes=_st(children)._collect_((function(each){
  3015. return smalltalk.withContext(function($ctx2) {
  3016. return _st($ClassSorterNode())._on_classes_level_(each,others,(0));
  3017. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3018. nodes=_st(nodes)._sorted_((function(a,b){
  3019. return smalltalk.withContext(function($ctx2) {
  3020. return _st(_st(_st(a)._theClass())._name()).__lt_eq(_st(_st(b)._theClass())._name());
  3021. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  3022. expandedClasses=_st($Array())._new();
  3023. _st(nodes)._do_((function(aNode){
  3024. return smalltalk.withContext(function($ctx2) {
  3025. return _st(aNode)._traverseClassesWith_(expandedClasses);
  3026. }, function($ctx2) {$ctx2.fillBlock({aNode:aNode},$ctx1)})}));
  3027. $2=expandedClasses;
  3028. return $2;
  3029. }, function($ctx1) {$ctx1.fill(self,"sortedClasses:",{classes:classes,children:children,others:others,nodes:nodes,expandedClasses:expandedClasses},smalltalk.Package.klass)})},
  3030. messageSends: ["do:", "ifFalse:ifTrue:", "add:", "includes:", "superclass", "collect:", "on:classes:level:", "sorted:", "<=", "name", "theClass", "new", "traverseClassesWith:"]}),
  3031. smalltalk.Package.klass);
  3032. smalltalk.addClass('Point', smalltalk.Object, ['x', 'y'], 'Kernel-Objects');
  3033. smalltalk.addMethod(
  3034. smalltalk.method({
  3035. selector: "*",
  3036. fn: function (aPoint){
  3037. var self=this;
  3038. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3039. return smalltalk.withContext(function($ctx1) {
  3040. var $1;
  3041. $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()));
  3042. return $1;
  3043. }, function($ctx1) {$ctx1.fill(self,"*",{aPoint:aPoint},smalltalk.Point)})},
  3044. messageSends: ["x:y:", "*", "x", "asPoint", "y"]}),
  3045. smalltalk.Point);
  3046. smalltalk.addMethod(
  3047. smalltalk.method({
  3048. selector: "+",
  3049. fn: function (aPoint){
  3050. var self=this;
  3051. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3052. return smalltalk.withContext(function($ctx1) {
  3053. var $1;
  3054. $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()));
  3055. return $1;
  3056. }, function($ctx1) {$ctx1.fill(self,"+",{aPoint:aPoint},smalltalk.Point)})},
  3057. messageSends: ["x:y:", "+", "x", "asPoint", "y"]}),
  3058. smalltalk.Point);
  3059. smalltalk.addMethod(
  3060. smalltalk.method({
  3061. selector: "-",
  3062. fn: function (aPoint){
  3063. var self=this;
  3064. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3065. return smalltalk.withContext(function($ctx1) {
  3066. var $1;
  3067. $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()));
  3068. return $1;
  3069. }, function($ctx1) {$ctx1.fill(self,"-",{aPoint:aPoint},smalltalk.Point)})},
  3070. messageSends: ["x:y:", "-", "x", "asPoint", "y"]}),
  3071. smalltalk.Point);
  3072. smalltalk.addMethod(
  3073. smalltalk.method({
  3074. selector: "/",
  3075. fn: function (aPoint){
  3076. var self=this;
  3077. function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
  3078. return smalltalk.withContext(function($ctx1) {
  3079. var $1;
  3080. $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()));
  3081. return $1;
  3082. }, function($ctx1) {$ctx1.fill(self,"/",{aPoint:aPoint},smalltalk.Point)})},
  3083. messageSends: ["x:y:", "/", "x", "asPoint", "y"]}),
  3084. smalltalk.Point);
  3085. smalltalk.addMethod(
  3086. smalltalk.method({
  3087. selector: "=",
  3088. fn: function (aPoint){
  3089. var self=this;
  3090. return smalltalk.withContext(function($ctx1) {
  3091. var $1;
  3092. $1=_st(_st(_st(aPoint)._class()).__eq(_st(self)._class()))._and_((function(){
  3093. return smalltalk.withContext(function($ctx2) {
  3094. return _st(_st(_st(aPoint)._x()).__eq(_st(self)._x())).__and(_st(_st(aPoint)._y()).__eq(_st(self)._y()));
  3095. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3096. return $1;
  3097. }, function($ctx1) {$ctx1.fill(self,"=",{aPoint:aPoint},smalltalk.Point)})},
  3098. messageSends: ["and:", "&", "=", "y", "x", "class"]}),
  3099. smalltalk.Point);
  3100. smalltalk.addMethod(
  3101. smalltalk.method({
  3102. selector: "asPoint",
  3103. fn: function (){
  3104. var self=this;
  3105. return smalltalk.withContext(function($ctx1) {
  3106. var $1;
  3107. $1=self;
  3108. return $1;
  3109. }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Point)})},
  3110. messageSends: []}),
  3111. smalltalk.Point);
  3112. smalltalk.addMethod(
  3113. smalltalk.method({
  3114. selector: "printOn:",
  3115. fn: function (aStream){
  3116. var self=this;
  3117. return smalltalk.withContext(function($ctx1) {
  3118. var $1;
  3119. _st(self["@x"])._printOn_(aStream);
  3120. _st(aStream)._nextPutAll_("@");
  3121. $1=_st(_st(self["@y"])._notNil())._and_((function(){
  3122. return smalltalk.withContext(function($ctx2) {
  3123. return _st(self["@y"])._negative();
  3124. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3125. if(smalltalk.assert($1)){
  3126. _st(aStream)._space();
  3127. };
  3128. _st(self["@y"])._printOn_(aStream);
  3129. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Point)})},
  3130. messageSends: ["printOn:", "nextPutAll:", "ifTrue:", "space", "and:", "negative", "notNil"]}),
  3131. smalltalk.Point);
  3132. smalltalk.addMethod(
  3133. smalltalk.method({
  3134. selector: "translateBy:",
  3135. fn: function (delta){
  3136. var self=this;
  3137. return smalltalk.withContext(function($ctx1) {
  3138. var $1;
  3139. $1=_st(_st(_st(delta)._x()).__plus(self["@x"])).__at(_st(_st(delta)._y()).__plus(self["@y"]));
  3140. return $1;
  3141. }, function($ctx1) {$ctx1.fill(self,"translateBy:",{delta:delta},smalltalk.Point)})},
  3142. messageSends: ["@", "+", "y", "x"]}),
  3143. smalltalk.Point);
  3144. smalltalk.addMethod(
  3145. smalltalk.method({
  3146. selector: "x",
  3147. fn: function (){
  3148. var self=this;
  3149. return smalltalk.withContext(function($ctx1) {
  3150. var $1;
  3151. $1=self["@x"];
  3152. return $1;
  3153. }, function($ctx1) {$ctx1.fill(self,"x",{},smalltalk.Point)})},
  3154. messageSends: []}),
  3155. smalltalk.Point);
  3156. smalltalk.addMethod(
  3157. smalltalk.method({
  3158. selector: "x:",
  3159. fn: function (aNumber){
  3160. var self=this;
  3161. return smalltalk.withContext(function($ctx1) {
  3162. self["@x"]=aNumber;
  3163. return self}, function($ctx1) {$ctx1.fill(self,"x:",{aNumber:aNumber},smalltalk.Point)})},
  3164. messageSends: []}),
  3165. smalltalk.Point);
  3166. smalltalk.addMethod(
  3167. smalltalk.method({
  3168. selector: "y",
  3169. fn: function (){
  3170. var self=this;
  3171. return smalltalk.withContext(function($ctx1) {
  3172. var $1;
  3173. $1=self["@y"];
  3174. return $1;
  3175. }, function($ctx1) {$ctx1.fill(self,"y",{},smalltalk.Point)})},
  3176. messageSends: []}),
  3177. smalltalk.Point);
  3178. smalltalk.addMethod(
  3179. smalltalk.method({
  3180. selector: "y:",
  3181. fn: function (aNumber){
  3182. var self=this;
  3183. return smalltalk.withContext(function($ctx1) {
  3184. self["@y"]=aNumber;
  3185. return self}, function($ctx1) {$ctx1.fill(self,"y:",{aNumber:aNumber},smalltalk.Point)})},
  3186. messageSends: []}),
  3187. smalltalk.Point);
  3188. smalltalk.addMethod(
  3189. smalltalk.method({
  3190. selector: "x:y:",
  3191. fn: function (aNumber,anotherNumber){
  3192. var self=this;
  3193. return smalltalk.withContext(function($ctx1) {
  3194. var $2,$3,$1;
  3195. $2=_st(self)._new();
  3196. _st($2)._x_(aNumber);
  3197. _st($2)._y_(anotherNumber);
  3198. $3=_st($2)._yourself();
  3199. $1=$3;
  3200. return $1;
  3201. }, function($ctx1) {$ctx1.fill(self,"x:y:",{aNumber:aNumber,anotherNumber:anotherNumber},smalltalk.Point.klass)})},
  3202. messageSends: ["x:", "new", "y:", "yourself"]}),
  3203. smalltalk.Point.klass);
  3204. smalltalk.addClass('Random', smalltalk.Object, [], 'Kernel-Objects');
  3205. smalltalk.addMethod(
  3206. smalltalk.method({
  3207. selector: "next",
  3208. fn: function (){
  3209. var self=this;
  3210. return smalltalk.withContext(function($ctx1) {
  3211. return Math.random();
  3212. return self}, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.Random)})},
  3213. messageSends: []}),
  3214. smalltalk.Random);
  3215. smalltalk.addMethod(
  3216. smalltalk.method({
  3217. selector: "next:",
  3218. fn: function (anInteger){
  3219. var self=this;
  3220. return smalltalk.withContext(function($ctx1) {
  3221. var $1;
  3222. $1=_st(_st((1))._to_(anInteger))._collect_((function(each){
  3223. return smalltalk.withContext(function($ctx2) {
  3224. return _st(self)._next();
  3225. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3226. return $1;
  3227. }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger},smalltalk.Random)})},
  3228. messageSends: ["collect:", "next", "to:"]}),
  3229. smalltalk.Random);
  3230. smalltalk.addClass('Smalltalk', smalltalk.Object, [], 'Kernel-Objects');
  3231. smalltalk.addMethod(
  3232. smalltalk.method({
  3233. selector: "asSmalltalkException:",
  3234. fn: function (anObject){
  3235. var self=this;
  3236. function $JavaScriptException(){return smalltalk.JavaScriptException||(typeof JavaScriptException=="undefined"?nil:JavaScriptException)}
  3237. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  3238. return smalltalk.withContext(function($ctx1) {
  3239. var $2,$1;
  3240. $2=_st(_st(self)._isSmalltalkObject_(anObject))._and_((function(){
  3241. return smalltalk.withContext(function($ctx2) {
  3242. return _st(anObject)._isKindOf_($Error());
  3243. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3244. if(smalltalk.assert($2)){
  3245. $1=anObject;
  3246. } else {
  3247. $1=_st($JavaScriptException())._on_(anObject);
  3248. };
  3249. return $1;
  3250. }, function($ctx1) {$ctx1.fill(self,"asSmalltalkException:",{anObject:anObject},smalltalk.Smalltalk)})},
  3251. messageSends: ["ifTrue:ifFalse:", "on:", "and:", "isKindOf:", "isSmalltalkObject:"]}),
  3252. smalltalk.Smalltalk);
  3253. smalltalk.addMethod(
  3254. smalltalk.method({
  3255. selector: "at:",
  3256. fn: function (aString){
  3257. var self=this;
  3258. return smalltalk.withContext(function($ctx1) {
  3259. return self[aString];
  3260. return self}, function($ctx1) {$ctx1.fill(self,"at:",{aString:aString},smalltalk.Smalltalk)})},
  3261. messageSends: []}),
  3262. smalltalk.Smalltalk);
  3263. smalltalk.addMethod(
  3264. smalltalk.method({
  3265. selector: "basicParse:",
  3266. fn: function (aString){
  3267. var self=this;
  3268. return smalltalk.withContext(function($ctx1) {
  3269. return smalltalk.parser.parse(aString);
  3270. return self}, function($ctx1) {$ctx1.fill(self,"basicParse:",{aString:aString},smalltalk.Smalltalk)})},
  3271. messageSends: []}),
  3272. smalltalk.Smalltalk);
  3273. smalltalk.addMethod(
  3274. smalltalk.method({
  3275. selector: "classes",
  3276. fn: function (){
  3277. var self=this;
  3278. return smalltalk.withContext(function($ctx1) {
  3279. return self.classes();
  3280. return self}, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Smalltalk)})},
  3281. messageSends: []}),
  3282. smalltalk.Smalltalk);
  3283. smalltalk.addMethod(
  3284. smalltalk.method({
  3285. selector: "createPackage:",
  3286. fn: function (packageName){
  3287. var self=this;
  3288. return smalltalk.withContext(function($ctx1) {
  3289. return smalltalk.addPackage(packageName);
  3290. return self}, function($ctx1) {$ctx1.fill(self,"createPackage:",{packageName:packageName},smalltalk.Smalltalk)})},
  3291. messageSends: []}),
  3292. smalltalk.Smalltalk);
  3293. smalltalk.addMethod(
  3294. smalltalk.method({
  3295. selector: "createPackage:properties:",
  3296. fn: function (packageName,aDict){
  3297. var self=this;
  3298. return smalltalk.withContext(function($ctx1) {
  3299. var $1,$2;
  3300. _st(self)._deprecatedAPI();
  3301. $1=_st(aDict)._isEmpty();
  3302. if(! smalltalk.assert($1)){
  3303. _st(self)._error_("createPackage:properties: called with nonempty properties");
  3304. };
  3305. $2=_st(self)._createPackage_(packageName);
  3306. return $2;
  3307. }, function($ctx1) {$ctx1.fill(self,"createPackage:properties:",{packageName:packageName,aDict:aDict},smalltalk.Smalltalk)})},
  3308. messageSends: ["deprecatedAPI", "ifFalse:", "error:", "isEmpty", "createPackage:"]}),
  3309. smalltalk.Smalltalk);
  3310. smalltalk.addMethod(
  3311. smalltalk.method({
  3312. selector: "deleteClass:",
  3313. fn: function (aClass){
  3314. var self=this;
  3315. return smalltalk.withContext(function($ctx1) {
  3316. self.removeClass(aClass);
  3317. return self}, function($ctx1) {$ctx1.fill(self,"deleteClass:",{aClass:aClass},smalltalk.Smalltalk)})},
  3318. messageSends: []}),
  3319. smalltalk.Smalltalk);
  3320. smalltalk.addMethod(
  3321. smalltalk.method({
  3322. selector: "deletePackage:",
  3323. fn: function (packageName){
  3324. var self=this;
  3325. return smalltalk.withContext(function($ctx1) {
  3326. delete smalltalk.packages[packageName];
  3327. return self}, function($ctx1) {$ctx1.fill(self,"deletePackage:",{packageName:packageName},smalltalk.Smalltalk)})},
  3328. messageSends: []}),
  3329. smalltalk.Smalltalk);
  3330. smalltalk.addMethod(
  3331. smalltalk.method({
  3332. selector: "isSmalltalkObject:",
  3333. fn: function (anObject){
  3334. var self=this;
  3335. return smalltalk.withContext(function($ctx1) {
  3336. return typeof anObject.klass !== 'undefined';
  3337. return self}, function($ctx1) {$ctx1.fill(self,"isSmalltalkObject:",{anObject:anObject},smalltalk.Smalltalk)})},
  3338. messageSends: []}),
  3339. smalltalk.Smalltalk);
  3340. smalltalk.addMethod(
  3341. smalltalk.method({
  3342. selector: "packageAt:",
  3343. fn: function (packageName){
  3344. var self=this;
  3345. return smalltalk.withContext(function($ctx1) {
  3346. return self.packages[packageName];
  3347. return self}, function($ctx1) {$ctx1.fill(self,"packageAt:",{packageName:packageName},smalltalk.Smalltalk)})},
  3348. messageSends: []}),
  3349. smalltalk.Smalltalk);
  3350. smalltalk.addMethod(
  3351. smalltalk.method({
  3352. selector: "packageAt:ifAbsent:",
  3353. fn: function (packageName,aBlock){
  3354. var self=this;
  3355. return smalltalk.withContext(function($ctx1) {
  3356. var $2,$1;
  3357. $2=_st(self)._packageAt_(packageName);
  3358. $1=_st($2)._ifNil_(aBlock);
  3359. return $1;
  3360. }, function($ctx1) {$ctx1.fill(self,"packageAt:ifAbsent:",{packageName:packageName,aBlock:aBlock},smalltalk.Smalltalk)})},
  3361. messageSends: ["ifNil:", "packageAt:"]}),
  3362. smalltalk.Smalltalk);
  3363. smalltalk.addMethod(
  3364. smalltalk.method({
  3365. selector: "packages",
  3366. fn: function (){
  3367. var self=this;
  3368. return smalltalk.withContext(function($ctx1) {
  3369. return self.packages.all();
  3370. return self}, function($ctx1) {$ctx1.fill(self,"packages",{},smalltalk.Smalltalk)})},
  3371. messageSends: []}),
  3372. smalltalk.Smalltalk);
  3373. smalltalk.addMethod(
  3374. smalltalk.method({
  3375. selector: "parse:",
  3376. fn: function (aString){
  3377. var self=this;
  3378. var result;
  3379. return smalltalk.withContext(function($ctx1) {
  3380. var $1;
  3381. _st(self)._try_catch_((function(){
  3382. return smalltalk.withContext(function($ctx2) {
  3383. result=_st(self)._basicParse_(aString);
  3384. return result;
  3385. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),(function(ex){
  3386. return smalltalk.withContext(function($ctx2) {
  3387. return _st(_st(self)._parseError_parsing_(ex,aString))._signal();
  3388. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1)})}));
  3389. $1=result;
  3390. return $1;
  3391. }, function($ctx1) {$ctx1.fill(self,"parse:",{aString:aString,result:result},smalltalk.Smalltalk)})},
  3392. messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:"]}),
  3393. smalltalk.Smalltalk);
  3394. smalltalk.addMethod(
  3395. smalltalk.method({
  3396. selector: "parseError:parsing:",
  3397. fn: function (anException,aString){
  3398. var self=this;
  3399. function $ParseError(){return smalltalk.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
  3400. return smalltalk.withContext(function($ctx1) {
  3401. var $1;
  3402. $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")));
  3403. return $1;
  3404. }, function($ctx1) {$ctx1.fill(self,"parseError:parsing:",{anException:anException,aString:aString},smalltalk.Smalltalk)})},
  3405. messageSends: ["messageText:", ",", "basicAt:", "new"]}),
  3406. smalltalk.Smalltalk);
  3407. smalltalk.addMethod(
  3408. smalltalk.method({
  3409. selector: "pseudoVariableNames",
  3410. fn: function (){
  3411. var self=this;
  3412. return smalltalk.withContext(function($ctx1) {
  3413. var $1;
  3414. $1=["self", "super", "nil", "true", "false", "thisContext"];
  3415. return $1;
  3416. }, function($ctx1) {$ctx1.fill(self,"pseudoVariableNames",{},smalltalk.Smalltalk)})},
  3417. messageSends: []}),
  3418. smalltalk.Smalltalk);
  3419. smalltalk.addMethod(
  3420. smalltalk.method({
  3421. selector: "readJSObject:",
  3422. fn: function (anObject){
  3423. var self=this;
  3424. return smalltalk.withContext(function($ctx1) {
  3425. return self.readJSObject(anObject);
  3426. return self}, function($ctx1) {$ctx1.fill(self,"readJSObject:",{anObject:anObject},smalltalk.Smalltalk)})},
  3427. messageSends: []}),
  3428. smalltalk.Smalltalk);
  3429. smalltalk.addMethod(
  3430. smalltalk.method({
  3431. selector: "removeClass:",
  3432. fn: function (aClass){
  3433. var self=this;
  3434. function $ClassRemoved(){return smalltalk.ClassRemoved||(typeof ClassRemoved=="undefined"?nil:ClassRemoved)}
  3435. function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
  3436. return smalltalk.withContext(function($ctx1) {
  3437. var $1,$2,$3;
  3438. $1=_st(aClass)._isMetaclass();
  3439. if(smalltalk.assert($1)){
  3440. _st(self)._error_(_st(_st(aClass)._asString()).__comma(" is a Metaclass and cannot be removed!"));
  3441. };
  3442. _st(self)._deleteClass_(aClass);
  3443. $2=_st($ClassRemoved())._new();
  3444. _st($2)._theClass_(aClass);
  3445. $3=_st($2)._yourself();
  3446. _st(_st($SystemAnnouncer())._current())._announce_($3);
  3447. return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.Smalltalk)})},
  3448. messageSends: ["ifTrue:", "error:", ",", "asString", "isMetaclass", "deleteClass:", "announce:", "theClass:", "new", "yourself", "current"]}),
  3449. smalltalk.Smalltalk);
  3450. smalltalk.addMethod(
  3451. smalltalk.method({
  3452. selector: "removePackage:",
  3453. fn: function (packageName){
  3454. var self=this;
  3455. var pkg;
  3456. return smalltalk.withContext(function($ctx1) {
  3457. pkg=_st(self)._packageAt_ifAbsent_(packageName,(function(){
  3458. return smalltalk.withContext(function($ctx2) {
  3459. return _st(self)._error_(_st("Missing package: ").__comma(packageName));
  3460. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3461. _st(_st(pkg)._classes())._do_((function(each){
  3462. return smalltalk.withContext(function($ctx2) {
  3463. return _st(self)._removeClass_(each);
  3464. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3465. _st(self)._deletePackage_(packageName);
  3466. return self}, function($ctx1) {$ctx1.fill(self,"removePackage:",{packageName:packageName,pkg:pkg},smalltalk.Smalltalk)})},
  3467. messageSends: ["packageAt:ifAbsent:", "error:", ",", "do:", "removeClass:", "classes", "deletePackage:"]}),
  3468. smalltalk.Smalltalk);
  3469. smalltalk.addMethod(
  3470. smalltalk.method({
  3471. selector: "renamePackage:to:",
  3472. fn: function (packageName,newName){
  3473. var self=this;
  3474. var pkg;
  3475. return smalltalk.withContext(function($ctx1) {
  3476. var $1;
  3477. pkg=_st(self)._packageAt_ifAbsent_(packageName,(function(){
  3478. return smalltalk.withContext(function($ctx2) {
  3479. return _st(self)._error_(_st("Missing package: ").__comma(packageName));
  3480. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3481. $1=_st(self)._packageAt_(newName);
  3482. if(($receiver = $1) == nil || $receiver == undefined){
  3483. $1;
  3484. } else {
  3485. _st(self)._error_(_st("Already exists a package called: ").__comma(newName));
  3486. };
  3487. _st(_st(self)._basicAt_("packages"))._at_put_(newName,pkg);
  3488. _st(pkg)._name_(newName);
  3489. _st(self)._deletePackage_(packageName);
  3490. return self}, function($ctx1) {$ctx1.fill(self,"renamePackage:to:",{packageName:packageName,newName:newName,pkg:pkg},smalltalk.Smalltalk)})},
  3491. messageSends: ["packageAt:ifAbsent:", "error:", ",", "ifNotNil:", "packageAt:", "at:put:", "basicAt:", "name:", "deletePackage:"]}),
  3492. smalltalk.Smalltalk);
  3493. smalltalk.addMethod(
  3494. smalltalk.method({
  3495. selector: "reservedWords",
  3496. fn: function (){
  3497. var self=this;
  3498. return smalltalk.withContext(function($ctx1) {
  3499. return self.reservedWords;
  3500. return self}, function($ctx1) {$ctx1.fill(self,"reservedWords",{},smalltalk.Smalltalk)})},
  3501. messageSends: []}),
  3502. smalltalk.Smalltalk);
  3503. smalltalk.addMethod(
  3504. smalltalk.method({
  3505. selector: "version",
  3506. fn: function (){
  3507. var self=this;
  3508. return smalltalk.withContext(function($ctx1) {
  3509. return "0.10";
  3510. }, function($ctx1) {$ctx1.fill(self,"version",{},smalltalk.Smalltalk)})},
  3511. messageSends: []}),
  3512. smalltalk.Smalltalk);
  3513. smalltalk.Smalltalk.klass.iVarNames = ['current'];
  3514. smalltalk.addMethod(
  3515. smalltalk.method({
  3516. selector: "current",
  3517. fn: function (){
  3518. var self=this;
  3519. return smalltalk.withContext(function($ctx1) {
  3520. return smalltalk;
  3521. return self}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.Smalltalk.klass)})},
  3522. messageSends: []}),
  3523. smalltalk.Smalltalk.klass);
  3524. smalltalk.addClass('Timeout', smalltalk.Object, ['rawTimeout'], 'Kernel-Objects');
  3525. smalltalk.addMethod(
  3526. smalltalk.method({
  3527. selector: "clearInterval",
  3528. fn: function (){
  3529. var self=this;
  3530. return smalltalk.withContext(function($ctx1) {
  3531. var interval = self["@rawTimeout"];
  3532. clearInterval(interval);
  3533. ;
  3534. return self}, function($ctx1) {$ctx1.fill(self,"clearInterval",{},smalltalk.Timeout)})},
  3535. messageSends: []}),
  3536. smalltalk.Timeout);
  3537. smalltalk.addMethod(
  3538. smalltalk.method({
  3539. selector: "clearTimeout",
  3540. fn: function (){
  3541. var self=this;
  3542. return smalltalk.withContext(function($ctx1) {
  3543. var timeout = self["@rawTimeout"];
  3544. clearTimeout(timeout);
  3545. ;
  3546. return self}, function($ctx1) {$ctx1.fill(self,"clearTimeout",{},smalltalk.Timeout)})},
  3547. messageSends: []}),
  3548. smalltalk.Timeout);
  3549. smalltalk.addMethod(
  3550. smalltalk.method({
  3551. selector: "rawTimeout:",
  3552. fn: function (anObject){
  3553. var self=this;
  3554. return smalltalk.withContext(function($ctx1) {
  3555. self["@rawTimeout"]=anObject;
  3556. return self}, function($ctx1) {$ctx1.fill(self,"rawTimeout:",{anObject:anObject},smalltalk.Timeout)})},
  3557. messageSends: []}),
  3558. smalltalk.Timeout);
  3559. smalltalk.addMethod(
  3560. smalltalk.method({
  3561. selector: "on:",
  3562. fn: function (anObject){
  3563. var self=this;
  3564. return smalltalk.withContext(function($ctx1) {
  3565. var $2,$3,$1;
  3566. $2=_st(self)._new();
  3567. _st($2)._rawTimeout_(anObject);
  3568. $3=_st($2)._yourself();
  3569. $1=$3;
  3570. return $1;
  3571. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Timeout.klass)})},
  3572. messageSends: ["rawTimeout:", "new", "yourself"]}),
  3573. smalltalk.Timeout.klass);
  3574. smalltalk.addClass('UndefinedObject', smalltalk.Object, [], 'Kernel-Objects');
  3575. smalltalk.addMethod(
  3576. smalltalk.method({
  3577. selector: "asJSON",
  3578. fn: function (){
  3579. var self=this;
  3580. return smalltalk.withContext(function($ctx1) {
  3581. var $1;
  3582. $1=null;
  3583. return $1;
  3584. }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.UndefinedObject)})},
  3585. messageSends: []}),
  3586. smalltalk.UndefinedObject);
  3587. smalltalk.addMethod(
  3588. smalltalk.method({
  3589. selector: "deepCopy",
  3590. fn: function (){
  3591. var self=this;
  3592. return smalltalk.withContext(function($ctx1) {
  3593. var $1;
  3594. $1=self;
  3595. return $1;
  3596. }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.UndefinedObject)})},
  3597. messageSends: []}),
  3598. smalltalk.UndefinedObject);
  3599. smalltalk.addMethod(
  3600. smalltalk.method({
  3601. selector: "ifNil:",
  3602. fn: function (aBlock){
  3603. var self=this;
  3604. return smalltalk.withContext(function($ctx1) {
  3605. var $2,$1;
  3606. $2=self;
  3607. $1=_st($2)._ifNil_ifNotNil_(aBlock,(function(){
  3608. return smalltalk.withContext(function($ctx2) {
  3609. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3610. return $1;
  3611. }, function($ctx1) {$ctx1.fill(self,"ifNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  3612. messageSends: ["ifNil:ifNotNil:"]}),
  3613. smalltalk.UndefinedObject);
  3614. smalltalk.addMethod(
  3615. smalltalk.method({
  3616. selector: "ifNil:ifNotNil:",
  3617. fn: function (aBlock,anotherBlock){
  3618. var self=this;
  3619. return smalltalk.withContext(function($ctx1) {
  3620. var $1;
  3621. $1=_st(aBlock)._value();
  3622. return $1;
  3623. }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  3624. messageSends: ["value"]}),
  3625. smalltalk.UndefinedObject);
  3626. smalltalk.addMethod(
  3627. smalltalk.method({
  3628. selector: "ifNotNil:",
  3629. fn: function (aBlock){
  3630. var self=this;
  3631. return smalltalk.withContext(function($ctx1) {
  3632. var $1;
  3633. $1=self;
  3634. return $1;
  3635. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
  3636. messageSends: []}),
  3637. smalltalk.UndefinedObject);
  3638. smalltalk.addMethod(
  3639. smalltalk.method({
  3640. selector: "ifNotNil:ifNil:",
  3641. fn: function (aBlock,anotherBlock){
  3642. var self=this;
  3643. return smalltalk.withContext(function($ctx1) {
  3644. var $1;
  3645. $1=_st(anotherBlock)._value();
  3646. return $1;
  3647. }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
  3648. messageSends: ["value"]}),
  3649. smalltalk.UndefinedObject);
  3650. smalltalk.addMethod(
  3651. smalltalk.method({
  3652. selector: "isImmutable",
  3653. fn: function (){
  3654. var self=this;
  3655. return smalltalk.withContext(function($ctx1) {
  3656. return true;
  3657. }, function($ctx1) {$ctx1.fill(self,"isImmutable",{},smalltalk.UndefinedObject)})},
  3658. messageSends: []}),
  3659. smalltalk.UndefinedObject);
  3660. smalltalk.addMethod(
  3661. smalltalk.method({
  3662. selector: "isNil",
  3663. fn: function (){
  3664. var self=this;
  3665. return smalltalk.withContext(function($ctx1) {
  3666. return true;
  3667. }, function($ctx1) {$ctx1.fill(self,"isNil",{},smalltalk.UndefinedObject)})},
  3668. messageSends: []}),
  3669. smalltalk.UndefinedObject);
  3670. smalltalk.addMethod(
  3671. smalltalk.method({
  3672. selector: "notNil",
  3673. fn: function (){
  3674. var self=this;
  3675. return smalltalk.withContext(function($ctx1) {
  3676. return false;
  3677. }, function($ctx1) {$ctx1.fill(self,"notNil",{},smalltalk.UndefinedObject)})},
  3678. messageSends: []}),
  3679. smalltalk.UndefinedObject);
  3680. smalltalk.addMethod(
  3681. smalltalk.method({
  3682. selector: "printOn:",
  3683. fn: function (aStream){
  3684. var self=this;
  3685. return smalltalk.withContext(function($ctx1) {
  3686. _st(aStream)._nextPutAll_("nil");
  3687. return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.UndefinedObject)})},
  3688. messageSends: ["nextPutAll:"]}),
  3689. smalltalk.UndefinedObject);
  3690. smalltalk.addMethod(
  3691. smalltalk.method({
  3692. selector: "shallowCopy",
  3693. fn: function (){
  3694. var self=this;
  3695. return smalltalk.withContext(function($ctx1) {
  3696. var $1;
  3697. $1=self;
  3698. return $1;
  3699. }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.UndefinedObject)})},
  3700. messageSends: []}),
  3701. smalltalk.UndefinedObject);
  3702. smalltalk.addMethod(
  3703. smalltalk.method({
  3704. selector: "subclass:instanceVariableNames:",
  3705. fn: function (aString,anotherString){
  3706. var self=this;
  3707. return smalltalk.withContext(function($ctx1) {
  3708. var $1;
  3709. $1=_st(self)._subclass_instanceVariableNames_package_(aString,anotherString,nil);
  3710. return $1;
  3711. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString},smalltalk.UndefinedObject)})},
  3712. messageSends: ["subclass:instanceVariableNames:package:"]}),
  3713. smalltalk.UndefinedObject);
  3714. smalltalk.addMethod(
  3715. smalltalk.method({
  3716. selector: "subclass:instanceVariableNames:category:",
  3717. fn: function (aString,aString2,aString3){
  3718. var self=this;
  3719. return smalltalk.withContext(function($ctx1) {
  3720. var $1;
  3721. _st(self)._deprecatedAPI();
  3722. $1=_st(self)._subclass_instanceVariableNames_package_(aString,aString2,aString3);
  3723. return $1;
  3724. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:category:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  3725. messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"]}),
  3726. smalltalk.UndefinedObject);
  3727. smalltalk.addMethod(
  3728. smalltalk.method({
  3729. selector: "subclass:instanceVariableNames:package:",
  3730. fn: function (aString,aString2,aString3){
  3731. var self=this;
  3732. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  3733. return smalltalk.withContext(function($ctx1) {
  3734. var $1;
  3735. $1=_st(_st($ClassBuilder())._new())._superclass_subclass_instanceVariableNames_package_(self,_st(aString)._asString(),aString2,aString3);
  3736. return $1;
  3737. }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
  3738. messageSends: ["superclass:subclass:instanceVariableNames:package:", "asString", "new"]}),
  3739. smalltalk.UndefinedObject);
  3740. smalltalk.addMethod(
  3741. smalltalk.method({
  3742. selector: "new",
  3743. fn: function (){
  3744. var self=this;
  3745. return smalltalk.withContext(function($ctx1) {
  3746. _st(self)._error_("You cannot create new instances of UndefinedObject. Use nil");
  3747. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.UndefinedObject.klass)})},
  3748. messageSends: ["error:"]}),
  3749. smalltalk.UndefinedObject.klass);
  3750. smalltalk.addMethod(
  3751. smalltalk.method({
  3752. selector: "asJavaScriptSelector",
  3753. fn: function (){
  3754. var self=this;
  3755. return smalltalk.withContext(function($ctx1) {
  3756. var $1;
  3757. $1=_st(self)._replace_with_("^([a-zA-Z0-9]*).*$","$1");
  3758. return $1;
  3759. }, function($ctx1) {$ctx1.fill(self,"asJavaScriptSelector",{},smalltalk.String)})},
  3760. messageSends: ["replace:with:"]}),
  3761. smalltalk.String);