Kernel-Objects.deploy.js 118 KB

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