Kernel-Objects.deploy.js 120 KB

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