1
0

Kernel-Collections.js 159 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644
  1. smalltalk.addPackage('Kernel-Collections', {});
  2. smalltalk.addClass('Collection', smalltalk.Object, [], 'Kernel-Collections');
  3. smalltalk.addMethod(
  4. unescape('_size'),
  5. smalltalk.method({
  6. selector: unescape('size'),
  7. category: 'accessing',
  8. fn: function (){
  9. var self=this;
  10. smalltalk.send(self, "_subclassResponsibility", []);
  11. return self;},
  12. args: [],
  13. source: unescape('size%0A%09self%20subclassResponsibility'),
  14. messageSends: ["subclassResponsibility"],
  15. referencedClasses: []
  16. }),
  17. smalltalk.Collection);
  18. smalltalk.addMethod(
  19. unescape('_readStream'),
  20. smalltalk.method({
  21. selector: unescape('readStream'),
  22. category: 'accessing',
  23. fn: function (){
  24. var self=this;
  25. return smalltalk.send(self, "_stream", []);
  26. return self;},
  27. args: [],
  28. source: unescape('readStream%0A%09%5Eself%20stream'),
  29. messageSends: ["stream"],
  30. referencedClasses: []
  31. }),
  32. smalltalk.Collection);
  33. smalltalk.addMethod(
  34. unescape('_writeStream'),
  35. smalltalk.method({
  36. selector: unescape('writeStream'),
  37. category: 'accessing',
  38. fn: function (){
  39. var self=this;
  40. return smalltalk.send(self, "_stream", []);
  41. return self;},
  42. args: [],
  43. source: unescape('writeStream%0A%09%5Eself%20stream'),
  44. messageSends: ["stream"],
  45. referencedClasses: []
  46. }),
  47. smalltalk.Collection);
  48. smalltalk.addMethod(
  49. unescape('_stream'),
  50. smalltalk.method({
  51. selector: unescape('stream'),
  52. category: 'accessing',
  53. fn: function (){
  54. var self=this;
  55. return smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [self]);
  56. return self;},
  57. args: [],
  58. source: unescape('stream%0A%09%5Eself%20streamClass%20on%3A%20self'),
  59. messageSends: ["on:", "streamClass"],
  60. referencedClasses: []
  61. }),
  62. smalltalk.Collection);
  63. smalltalk.addMethod(
  64. unescape('_streamClass'),
  65. smalltalk.method({
  66. selector: unescape('streamClass'),
  67. category: 'accessing',
  68. fn: function (){
  69. var self=this;
  70. return smalltalk.send(smalltalk.send(self, "_class", []), "_streamClass", []);
  71. return self;},
  72. args: [],
  73. source: unescape('streamClass%0A%09%5Eself%20class%20streamClass'),
  74. messageSends: ["streamClass", "class"],
  75. referencedClasses: []
  76. }),
  77. smalltalk.Collection);
  78. smalltalk.addMethod(
  79. unescape('_add_'),
  80. smalltalk.method({
  81. selector: unescape('add%3A'),
  82. category: 'adding/removing',
  83. fn: function (anObject){
  84. var self=this;
  85. smalltalk.send(self, "_subclassResponsibility", []);
  86. return self;},
  87. args: ["anObject"],
  88. source: unescape('add%3A%20anObject%0A%09self%20subclassResponsibility'),
  89. messageSends: ["subclassResponsibility"],
  90. referencedClasses: []
  91. }),
  92. smalltalk.Collection);
  93. smalltalk.addMethod(
  94. unescape('_addAll_'),
  95. smalltalk.method({
  96. selector: unescape('addAll%3A'),
  97. category: 'adding/removing',
  98. fn: function (aCollection){
  99. var self=this;
  100. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_add_", [each]);})]);
  101. return aCollection;
  102. return self;},
  103. args: ["aCollection"],
  104. source: unescape('addAll%3A%20aCollection%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20add%3A%20each%5D.%0A%09%5EaCollection'),
  105. messageSends: ["do:", "add:"],
  106. referencedClasses: []
  107. }),
  108. smalltalk.Collection);
  109. smalltalk.addMethod(
  110. unescape('__comma'),
  111. smalltalk.method({
  112. selector: unescape('%2C'),
  113. category: 'copying',
  114. fn: function (aCollection){
  115. var self=this;
  116. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  117. return self;},
  118. args: ["aCollection"],
  119. source: unescape('%2C%20aCollection%0A%09%5Eself%20copy%20%0A%09%20%20%20%20addAll%3A%20aCollection%3B%20%0A%09%20%20%20%20yourself'),
  120. messageSends: ["addAll:", "yourself", "copy"],
  121. referencedClasses: []
  122. }),
  123. smalltalk.Collection);
  124. smalltalk.addMethod(
  125. unescape('_copyWith_'),
  126. smalltalk.method({
  127. selector: unescape('copyWith%3A'),
  128. category: 'copying',
  129. fn: function (anObject){
  130. var self=this;
  131. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  132. return self;},
  133. args: ["anObject"],
  134. source: unescape('copyWith%3A%20anObject%0A%09%5Eself%20copy%20add%3A%20anObject%3B%20yourself'),
  135. messageSends: ["add:", "yourself", "copy"],
  136. referencedClasses: []
  137. }),
  138. smalltalk.Collection);
  139. smalltalk.addMethod(
  140. unescape('_copyWithAll_'),
  141. smalltalk.method({
  142. selector: unescape('copyWithAll%3A'),
  143. category: 'copying',
  144. fn: function (aCollection){
  145. var self=this;
  146. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_copy", []));
  147. return self;},
  148. args: ["aCollection"],
  149. source: unescape('copyWithAll%3A%20aCollection%0A%09%5Eself%20copy%20addAll%3A%20aCollection%3B%20yourself'),
  150. messageSends: ["addAll:", "yourself", "copy"],
  151. referencedClasses: []
  152. }),
  153. smalltalk.Collection);
  154. smalltalk.addMethod(
  155. unescape('_asArray'),
  156. smalltalk.method({
  157. selector: unescape('asArray'),
  158. category: 'converting',
  159. fn: function (){
  160. var self=this;
  161. return smalltalk.send((smalltalk.Array || Array), "_withAll_", [self]);
  162. return self;},
  163. args: [],
  164. source: unescape('asArray%0A%09%5EArray%20withAll%3A%20self'),
  165. messageSends: ["withAll:"],
  166. referencedClasses: ["Array"]
  167. }),
  168. smalltalk.Collection);
  169. smalltalk.addMethod(
  170. unescape('_do_'),
  171. smalltalk.method({
  172. selector: unescape('do%3A'),
  173. category: 'enumerating',
  174. fn: function (aBlock){
  175. var self=this;
  176. for(var i=0;i<self.length;i++){aBlock(self[i]);};
  177. return self;},
  178. args: ["aBlock"],
  179. source: unescape('do%3A%20aBlock%0A%09%3Cfor%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7BaBlock%28self%5Bi%5D%29%3B%7D%3E'),
  180. messageSends: [],
  181. referencedClasses: []
  182. }),
  183. smalltalk.Collection);
  184. smalltalk.addMethod(
  185. unescape('_collect_'),
  186. smalltalk.method({
  187. selector: unescape('collect%3A'),
  188. category: 'enumerating',
  189. fn: function (aBlock){
  190. var self=this;
  191. var newCollection=nil;
  192. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  193. smalltalk.send(self, "_do_", [(function(each){return smalltalk.send(newCollection, "_add_", [smalltalk.send(aBlock, "_value_", [each])]);})]);
  194. return newCollection;
  195. return self;},
  196. args: ["aBlock"],
  197. source: unescape('collect%3A%20aBlock%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20newCollection%20add%3A%20%28aBlock%20value%3A%20each%29%5D.%0A%09%5EnewCollection'),
  198. messageSends: ["new", "class", "do:", "add:", "value:"],
  199. referencedClasses: []
  200. }),
  201. smalltalk.Collection);
  202. smalltalk.addMethod(
  203. unescape('_detect_'),
  204. smalltalk.method({
  205. selector: unescape('detect%3A'),
  206. category: 'enumerating',
  207. fn: function (aBlock){
  208. var self=this;
  209. return smalltalk.send(self, "_detect_ifNone_", [aBlock, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  210. return self;},
  211. args: ["aBlock"],
  212. source: unescape('detect%3A%20aBlock%0A%09%5Eself%20detect%3A%20aBlock%20ifNone%3A%20%5Bself%20errorNotFound%5D'),
  213. messageSends: ["detect:ifNone:", "errorNotFound"],
  214. referencedClasses: []
  215. }),
  216. smalltalk.Collection);
  217. smalltalk.addMethod(
  218. unescape('_detect_ifNone_'),
  219. smalltalk.method({
  220. selector: unescape('detect%3AifNone%3A'),
  221. category: 'enumerating',
  222. fn: function (aBlock, anotherBlock){
  223. var self=this;
  224. for(var i = 0; i < self.length; i++)
  225. if(aBlock(self[i]))
  226. return self[i];
  227. return anotherBlock();
  228. ;
  229. return self;},
  230. args: ["aBlock", "anotherBlock"],
  231. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%3C%0A%09%09for%28var%20i%20%3D%200%3B%20i%20%3C%20self.length%3B%20i++%29%0A%09%09%09if%28aBlock%28self%5Bi%5D%29%29%0A%09%09%09%09return%20self%5Bi%5D%3B%0A%09%09return%20anotherBlock%28%29%3B%0A%09%3E'),
  232. messageSends: [],
  233. referencedClasses: []
  234. }),
  235. smalltalk.Collection);
  236. smalltalk.addMethod(
  237. unescape('_do_separatedBy_'),
  238. smalltalk.method({
  239. selector: unescape('do%3AseparatedBy%3A'),
  240. category: 'enumerating',
  241. fn: function (aBlock, anotherBlock){
  242. var self=this;
  243. var first=nil;
  244. first=true;
  245. smalltalk.send(self, "_do_", [(function(each){((($receiver = first).klass === smalltalk.Boolean) ? ($receiver ? (function(){return first=false;})() : (function(){return smalltalk.send(anotherBlock, "_value", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return first=false;}), (function(){return smalltalk.send(anotherBlock, "_value", []);})]));return smalltalk.send(aBlock, "_value_", [each]);})]);
  246. return self;},
  247. args: ["aBlock", "anotherBlock"],
  248. source: unescape('do%3A%20aBlock%20separatedBy%3A%20anotherBlock%0A%09%7C%20first%20%7C%0A%09first%20%3A%3D%20true.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20first%0A%09%09ifTrue%3A%20%5Bfirst%20%3A%3D%20false%5D%0A%09%09ifFalse%3A%20%5BanotherBlock%20value%5D.%0A%09%20%20%20%20aBlock%20value%3A%20each%5D'),
  249. messageSends: ["do:", "ifTrue:ifFalse:", "value", "value:"],
  250. referencedClasses: []
  251. }),
  252. smalltalk.Collection);
  253. smalltalk.addMethod(
  254. unescape('_inject_into_'),
  255. smalltalk.method({
  256. selector: unescape('inject%3Ainto%3A'),
  257. category: 'enumerating',
  258. fn: function (anObject, aBlock){
  259. var self=this;
  260. var result=nil;
  261. result=anObject;
  262. smalltalk.send(self, "_do_", [(function(each){return result=smalltalk.send(aBlock, "_value_value_", [result, each]);})]);
  263. return result;
  264. return self;},
  265. args: ["anObject", "aBlock"],
  266. source: unescape('inject%3A%20anObject%20into%3A%20aBlock%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%20anObject.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%20%0A%09%20%20%20%20result%20%3A%3D%20aBlock%20value%3A%20result%20value%3A%20each%5D.%0A%09%5Eresult'),
  267. messageSends: ["do:", "value:value:"],
  268. referencedClasses: []
  269. }),
  270. smalltalk.Collection);
  271. smalltalk.addMethod(
  272. unescape('_reject_'),
  273. smalltalk.method({
  274. selector: unescape('reject%3A'),
  275. category: 'enumerating',
  276. fn: function (aBlock){
  277. var self=this;
  278. return smalltalk.send(self, "_select_", [(function(each){return smalltalk.send(smalltalk.send(aBlock, "_value_", [each]), "__eq", [false]);})]);
  279. return self;},
  280. args: ["aBlock"],
  281. source: unescape('reject%3A%20aBlock%0A%09%5Eself%20select%3A%20%5B%3Aeach%20%7C%20%28aBlock%20value%3A%20each%29%20%3D%20false%5D'),
  282. messageSends: ["select:", unescape("%3D"), "value:"],
  283. referencedClasses: []
  284. }),
  285. smalltalk.Collection);
  286. smalltalk.addMethod(
  287. unescape('_select_'),
  288. smalltalk.method({
  289. selector: unescape('select%3A'),
  290. category: 'enumerating',
  291. fn: function (aBlock){
  292. var self=this;
  293. var stream=nil;
  294. stream=smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_new", []), "_writeStream", []);
  295. smalltalk.send(self, "_do_", [(function(each){return ((($receiver = smalltalk.send(aBlock, "_value_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(stream, "_nextPut_", [each]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(stream, "_nextPut_", [each]);})]));})]);
  296. return smalltalk.send(stream, "_contents", []);
  297. return self;},
  298. args: ["aBlock"],
  299. source: unescape('select%3A%20aBlock%0A%09%7C%20stream%20%7C%0A%09stream%20%3A%3D%20self%20class%20new%20writeStream.%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20%28aBlock%20value%3A%20each%29%20ifTrue%3A%20%5B%0A%09%09stream%20nextPut%3A%20each%5D%5D.%0A%09%5Estream%20contents'),
  300. messageSends: ["writeStream", "new", "class", "do:", "ifTrue:", "value:", "nextPut:", "contents"],
  301. referencedClasses: []
  302. }),
  303. smalltalk.Collection);
  304. smalltalk.addMethod(
  305. unescape('_errorNotFound'),
  306. smalltalk.method({
  307. selector: unescape('errorNotFound'),
  308. category: 'error handling',
  309. fn: function (){
  310. var self=this;
  311. smalltalk.send(self, "_error_", ["Object is not in the collection"]);
  312. return self;},
  313. args: [],
  314. source: unescape('errorNotFound%0A%09self%20error%3A%20%27Object%20is%20not%20in%20the%20collection%27'),
  315. messageSends: ["error:"],
  316. referencedClasses: []
  317. }),
  318. smalltalk.Collection);
  319. smalltalk.addMethod(
  320. unescape('_includes_'),
  321. smalltalk.method({
  322. selector: unescape('includes%3A'),
  323. category: 'testing',
  324. fn: function (anObject){
  325. var self=this;
  326. var i = self.length;
  327. while (i--) {
  328. if (smalltalk.send(self[i], "__eq", [anObject])) {return true;}
  329. }
  330. return false
  331. ;
  332. return self;},
  333. args: ["anObject"],
  334. source: unescape('includes%3A%20anObject%0A%09%3C%0A%09%09var%20i%20%3D%20self.length%3B%0A%09%09while%20%28i--%29%20%7B%0A%09%09%09if%20%28smalltalk.send%28self%5Bi%5D%2C%20%22__eq%22%2C%20%5BanObject%5D%29%29%20%7Breturn%20true%3B%7D%09%0A%09%09%7D%0A%09%09return%20false%0A%09%3E'),
  335. messageSends: [],
  336. referencedClasses: []
  337. }),
  338. smalltalk.Collection);
  339. smalltalk.addMethod(
  340. unescape('_notEmpty'),
  341. smalltalk.method({
  342. selector: unescape('notEmpty'),
  343. category: 'testing',
  344. fn: function (){
  345. var self=this;
  346. return smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_not", []);
  347. return self;},
  348. args: [],
  349. source: unescape('notEmpty%0A%09%5Eself%20isEmpty%20not'),
  350. messageSends: ["not", "isEmpty"],
  351. referencedClasses: []
  352. }),
  353. smalltalk.Collection);
  354. smalltalk.addMethod(
  355. unescape('_isEmpty'),
  356. smalltalk.method({
  357. selector: unescape('isEmpty'),
  358. category: 'testing',
  359. fn: function (){
  360. var self=this;
  361. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  362. return self;},
  363. args: [],
  364. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  365. messageSends: [unescape("%3D"), "size"],
  366. referencedClasses: []
  367. }),
  368. smalltalk.Collection);
  369. smalltalk.addMethod(
  370. unescape('_remove_'),
  371. smalltalk.method({
  372. selector: unescape('remove%3A'),
  373. category: 'adding/removing',
  374. fn: function (anObject){
  375. var self=this;
  376. return smalltalk.send(self, "_remove_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  377. return self;},
  378. args: ["anObject"],
  379. source: unescape('remove%3A%20anObject%0A%20%20%20%20%5Eself%20remove%3A%20anObject%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  380. messageSends: ["remove:ifAbsent:", "errorNotFound"],
  381. referencedClasses: []
  382. }),
  383. smalltalk.Collection);
  384. smalltalk.addMethod(
  385. unescape('_asSet'),
  386. smalltalk.method({
  387. selector: unescape('asSet'),
  388. category: 'converting',
  389. fn: function (){
  390. var self=this;
  391. return smalltalk.send((smalltalk.Set || Set), "_withAll_", [self]);
  392. return self;},
  393. args: [],
  394. source: unescape('asSet%0A%09%5ESet%20withAll%3A%20self'),
  395. messageSends: ["withAll:"],
  396. referencedClasses: ["Set"]
  397. }),
  398. smalltalk.Collection);
  399. smalltalk.addMethod(
  400. unescape('_ifNotEmpty_'),
  401. smalltalk.method({
  402. selector: unescape('ifNotEmpty%3A'),
  403. category: 'testing',
  404. fn: function (aBlock){
  405. var self=this;
  406. smalltalk.send(smalltalk.send(self, "_notEmpty", []), "_ifTrue_", [aBlock]);
  407. return self;},
  408. args: ["aBlock"],
  409. source: unescape('ifNotEmpty%3A%20aBlock%0A%09self%20notEmpty%20ifTrue%3A%20aBlock.'),
  410. messageSends: ["ifTrue:", "notEmpty"],
  411. referencedClasses: []
  412. }),
  413. smalltalk.Collection);
  414. smalltalk.addMethod(
  415. unescape('_ifEmpty_'),
  416. smalltalk.method({
  417. selector: unescape('ifEmpty%3A'),
  418. category: 'testing',
  419. fn: function (aBlock){
  420. var self=this;
  421. smalltalk.send(smalltalk.send(self, "_isEmpty", []), "_ifTrue_", [aBlock]);
  422. return self;},
  423. args: ["aBlock"],
  424. source: unescape('ifEmpty%3A%20aBlock%0A%09self%20isEmpty%20ifTrue%3A%20aBlock.'),
  425. messageSends: ["ifTrue:", "isEmpty"],
  426. referencedClasses: []
  427. }),
  428. smalltalk.Collection);
  429. smalltalk.addMethod(
  430. unescape('_copyWithoutAll_'),
  431. smalltalk.method({
  432. selector: unescape('copyWithoutAll%3A'),
  433. category: 'copying',
  434. fn: function (aCollection){
  435. var self=this;
  436. return smalltalk.send(self, "_reject_", [(function(each){return smalltalk.send(aCollection, "_includes_", [each]);})]);
  437. return self;},
  438. args: ["aCollection"],
  439. source: unescape('copyWithoutAll%3A%20aCollection%0A%09%22Answer%20a%20copy%20of%20the%20receiver%20that%20does%20not%20contain%20any%20elements%20%0A%09equal%20to%20those%20in%20aCollection.%22%0A%0A%09%5E%20self%20reject%3A%20%5B%3Aeach%20%7C%20aCollection%20includes%3A%20each%5D'),
  440. messageSends: ["reject:", "includes:"],
  441. referencedClasses: []
  442. }),
  443. smalltalk.Collection);
  444. smalltalk.addMethod(
  445. unescape('_remove_ifAbsent_'),
  446. smalltalk.method({
  447. selector: unescape('remove%3AifAbsent%3A'),
  448. category: 'adding/removing',
  449. fn: function (anObject, aBlock){
  450. var self=this;
  451. smalltalk.send(self, "_subclassResponsibility", []);
  452. return self;},
  453. args: ["anObject", "aBlock"],
  454. source: unescape('remove%3A%20anObject%20ifAbsent%3A%20aBlock%0A%20%20%20%20self%20subclassResponsibility'),
  455. messageSends: ["subclassResponsibility"],
  456. referencedClasses: []
  457. }),
  458. smalltalk.Collection);
  459. smalltalk.addMethod(
  460. unescape('_asJSONString'),
  461. smalltalk.method({
  462. selector: unescape('asJSONString'),
  463. category: 'converting',
  464. fn: function (){
  465. var self=this;
  466. return smalltalk.send((smalltalk.JSON || JSON), "_stringify_", [smalltalk.send(self, "_collect_", [(function(each){return smalltalk.send(each, "_asJSONString", []);})])]);
  467. return self;},
  468. args: [],
  469. source: unescape('asJSONString%0A%09%5EJSON%20stringify%3A%20%28self%20collect%3A%20%5B%3Aeach%20%7C%20each%20asJSONString%5D%29'),
  470. messageSends: ["stringify:", "collect:", "asJSONString"],
  471. referencedClasses: ["JSON"]
  472. }),
  473. smalltalk.Collection);
  474. smalltalk.addMethod(
  475. unescape('_asOrderedCollection'),
  476. smalltalk.method({
  477. selector: unescape('asOrderedCollection'),
  478. category: 'converting',
  479. fn: function (){
  480. var self=this;
  481. return smalltalk.send((smalltalk.OrderedCollection || OrderedCollection), "_withAll_", [self]);
  482. return self;},
  483. args: [],
  484. source: unescape('asOrderedCollection%0A%09%5EOrderedCollection%20withAll%3A%20self'),
  485. messageSends: ["withAll:"],
  486. referencedClasses: ["OrderedCollection"]
  487. }),
  488. smalltalk.Collection);
  489. smalltalk.addMethod(
  490. unescape('_streamClass'),
  491. smalltalk.method({
  492. selector: unescape('streamClass'),
  493. category: 'accessing',
  494. fn: function (){
  495. var self=this;
  496. return (smalltalk.Stream || Stream);
  497. return self;},
  498. args: [],
  499. source: unescape('streamClass%0A%09%20%20%20%20%5EStream'),
  500. messageSends: [],
  501. referencedClasses: ["Stream"]
  502. }),
  503. smalltalk.Collection.klass);
  504. smalltalk.addMethod(
  505. unescape('_with_'),
  506. smalltalk.method({
  507. selector: unescape('with%3A'),
  508. category: 'instance creation',
  509. fn: function (anObject){
  510. var self=this;
  511. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  512. return self;},
  513. args: ["anObject"],
  514. source: unescape('with%3A%20anObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20anObject%3B%0A%09%09yourself'),
  515. messageSends: ["add:", "yourself", "new"],
  516. referencedClasses: []
  517. }),
  518. smalltalk.Collection.klass);
  519. smalltalk.addMethod(
  520. unescape('_with_with_'),
  521. smalltalk.method({
  522. selector: unescape('with%3Awith%3A'),
  523. category: 'instance creation',
  524. fn: function (anObject, anotherObject){
  525. var self=this;
  526. return (function($rec){smalltalk.send($rec, "_add_", [anObject]);smalltalk.send($rec, "_add_", [anotherObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  527. return self;},
  528. args: ["anObject", "anotherObject"],
  529. source: unescape('with%3A%20anObject%20with%3A%20anotherObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20anObject%3B%0A%09%09add%3A%20anotherObject%3B%0A%09%09yourself'),
  530. messageSends: ["add:", "yourself", "new"],
  531. referencedClasses: []
  532. }),
  533. smalltalk.Collection.klass);
  534. smalltalk.addMethod(
  535. unescape('_with_with_with_'),
  536. smalltalk.method({
  537. selector: unescape('with%3Awith%3Awith%3A'),
  538. category: 'instance creation',
  539. fn: function (firstObject, secondObject, thirdObject){
  540. var self=this;
  541. return (function($rec){smalltalk.send($rec, "_add_", [firstObject]);smalltalk.send($rec, "_add_", [secondObject]);smalltalk.send($rec, "_add_", [thirdObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  542. return self;},
  543. args: ["firstObject", "secondObject", "thirdObject"],
  544. source: unescape('with%3A%20firstObject%20with%3A%20secondObject%20with%3A%20thirdObject%0A%09%20%20%20%20%5Eself%20new%0A%09%09add%3A%20firstObject%3B%0A%09%09add%3A%20secondObject%3B%0A%09%09add%3A%20thirdObject%3B%0A%09%09yourself'),
  545. messageSends: ["add:", "yourself", "new"],
  546. referencedClasses: []
  547. }),
  548. smalltalk.Collection.klass);
  549. smalltalk.addMethod(
  550. unescape('_withAll_'),
  551. smalltalk.method({
  552. selector: unescape('withAll%3A'),
  553. category: 'instance creation',
  554. fn: function (aCollection){
  555. var self=this;
  556. return (function($rec){smalltalk.send($rec, "_addAll_", [aCollection]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  557. return self;},
  558. args: ["aCollection"],
  559. source: unescape('withAll%3A%20aCollection%0A%09%20%20%20%20%5Eself%20new%0A%09%09addAll%3A%20aCollection%3B%0A%09%09yourself'),
  560. messageSends: ["addAll:", "yourself", "new"],
  561. referencedClasses: []
  562. }),
  563. smalltalk.Collection.klass);
  564. smalltalk.addMethod(
  565. unescape('_new_'),
  566. smalltalk.method({
  567. selector: unescape('new%3A'),
  568. category: 'instance creation',
  569. fn: function (anInteger){
  570. var self=this;
  571. return smalltalk.send(self, "_new", []);
  572. return self;},
  573. args: ["anInteger"],
  574. source: unescape('new%3A%20anInteger%0A%09%5Eself%20new'),
  575. messageSends: ["new"],
  576. referencedClasses: []
  577. }),
  578. smalltalk.Collection.klass);
  579. smalltalk.addClass('SequenceableCollection', smalltalk.Collection, [], 'Kernel-Collections');
  580. smalltalk.addMethod(
  581. unescape('_at_'),
  582. smalltalk.method({
  583. selector: unescape('at%3A'),
  584. category: 'accessing',
  585. fn: function (anIndex){
  586. var self=this;
  587. return smalltalk.send(self, "_at_ifAbsent_", [anIndex, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  588. return self;},
  589. args: ["anIndex"],
  590. source: unescape('at%3A%20anIndex%0A%09%5Eself%20at%3A%20anIndex%20ifAbsent%3A%20%5B%0A%09%20%20%20%20self%20errorNotFound%5D'),
  591. messageSends: ["at:ifAbsent:", "errorNotFound"],
  592. referencedClasses: []
  593. }),
  594. smalltalk.SequenceableCollection);
  595. smalltalk.addMethod(
  596. unescape('_at_ifAbsent_'),
  597. smalltalk.method({
  598. selector: unescape('at%3AifAbsent%3A'),
  599. category: 'accessing',
  600. fn: function (anIndex, aBlock){
  601. var self=this;
  602. smalltalk.send(self, "_subclassResponsibility", []);
  603. return self;},
  604. args: ["anIndex", "aBlock"],
  605. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09self%20subclassResponsibility'),
  606. messageSends: ["subclassResponsibility"],
  607. referencedClasses: []
  608. }),
  609. smalltalk.SequenceableCollection);
  610. smalltalk.addMethod(
  611. unescape('_at_put_'),
  612. smalltalk.method({
  613. selector: unescape('at%3Aput%3A'),
  614. category: 'accessing',
  615. fn: function (anIndex, anObject){
  616. var self=this;
  617. smalltalk.send(self, "_subclassResponsibility", []);
  618. return self;},
  619. args: ["anIndex", "anObject"],
  620. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09self%20subclassResponsibility'),
  621. messageSends: ["subclassResponsibility"],
  622. referencedClasses: []
  623. }),
  624. smalltalk.SequenceableCollection);
  625. smalltalk.addMethod(
  626. unescape('_copyFrom_to_'),
  627. smalltalk.method({
  628. selector: unescape('copyFrom%3Ato%3A'),
  629. category: 'copying',
  630. fn: function (anIndex, anotherIndex){
  631. var self=this;
  632. var range=nil;
  633. var newCollection=nil;
  634. range=smalltalk.send(anIndex, "_to_", [anotherIndex]);
  635. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(range, "_size", [])]);
  636. smalltalk.send(range, "_do_", [(function(each){return smalltalk.send(newCollection, "_at_put_", [each, smalltalk.send(self, "_at_", [each])]);})]);
  637. return newCollection;
  638. return self;},
  639. args: ["anIndex", "anotherIndex"],
  640. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%7C%20range%20newCollection%20%7C%0A%09range%20%3A%3D%20anIndex%20to%3A%20anotherIndex.%0A%09newCollection%20%3A%3D%20self%20class%20new%3A%20range%20size.%0A%09range%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20newCollection%20at%3A%20each%20put%3A%20%28self%20at%3A%20each%29%5D.%0A%09%5EnewCollection'),
  641. messageSends: ["to:", "new:", "class", "size", "do:", "at:put:", "at:"],
  642. referencedClasses: []
  643. }),
  644. smalltalk.SequenceableCollection);
  645. smalltalk.addMethod(
  646. unescape('_first'),
  647. smalltalk.method({
  648. selector: unescape('first'),
  649. category: 'accessing',
  650. fn: function (){
  651. var self=this;
  652. return smalltalk.send(self, "_at_", [(1)]);
  653. return self;},
  654. args: [],
  655. source: unescape('first%0A%09%5Eself%20at%3A%201'),
  656. messageSends: ["at:"],
  657. referencedClasses: []
  658. }),
  659. smalltalk.SequenceableCollection);
  660. smalltalk.addMethod(
  661. unescape('_fourth'),
  662. smalltalk.method({
  663. selector: unescape('fourth'),
  664. category: 'accessing',
  665. fn: function (){
  666. var self=this;
  667. return smalltalk.send(self, "_at_", [(4)]);
  668. return self;},
  669. args: [],
  670. source: unescape('fourth%0A%09%5Eself%20at%3A%204'),
  671. messageSends: ["at:"],
  672. referencedClasses: []
  673. }),
  674. smalltalk.SequenceableCollection);
  675. smalltalk.addMethod(
  676. unescape('_last'),
  677. smalltalk.method({
  678. selector: unescape('last'),
  679. category: 'accessing',
  680. fn: function (){
  681. var self=this;
  682. return smalltalk.send(self, "_at_", [smalltalk.send(self, "_size", [])]);
  683. return self;},
  684. args: [],
  685. source: unescape('last%0A%09%5Eself%20at%3A%20self%20size'),
  686. messageSends: ["at:", "size"],
  687. referencedClasses: []
  688. }),
  689. smalltalk.SequenceableCollection);
  690. smalltalk.addMethod(
  691. unescape('_second'),
  692. smalltalk.method({
  693. selector: unescape('second'),
  694. category: 'accessing',
  695. fn: function (){
  696. var self=this;
  697. return smalltalk.send(self, "_at_", [(2)]);
  698. return self;},
  699. args: [],
  700. source: unescape('second%0A%09%5Eself%20at%3A%202'),
  701. messageSends: ["at:"],
  702. referencedClasses: []
  703. }),
  704. smalltalk.SequenceableCollection);
  705. smalltalk.addMethod(
  706. unescape('_third'),
  707. smalltalk.method({
  708. selector: unescape('third'),
  709. category: 'accessing',
  710. fn: function (){
  711. var self=this;
  712. return smalltalk.send(self, "_at_", [(3)]);
  713. return self;},
  714. args: [],
  715. source: unescape('third%0A%09%5Eself%20at%3A%203'),
  716. messageSends: ["at:"],
  717. referencedClasses: []
  718. }),
  719. smalltalk.SequenceableCollection);
  720. smalltalk.addMethod(
  721. unescape('_removeLast'),
  722. smalltalk.method({
  723. selector: unescape('removeLast'),
  724. category: 'adding',
  725. fn: function (){
  726. var self=this;
  727. smalltalk.send(self, "_remove_", [smalltalk.send(self, "_last", [])]);
  728. return self;},
  729. args: [],
  730. source: unescape('removeLast%0A%09self%20remove%3A%20self%20last'),
  731. messageSends: ["remove:", "last"],
  732. referencedClasses: []
  733. }),
  734. smalltalk.SequenceableCollection);
  735. smalltalk.addMethod(
  736. unescape('_addLast_'),
  737. smalltalk.method({
  738. selector: unescape('addLast%3A'),
  739. category: 'adding',
  740. fn: function (anObject){
  741. var self=this;
  742. smalltalk.send(self, "_add_", [anObject]);
  743. return self;},
  744. args: ["anObject"],
  745. source: unescape('addLast%3A%20anObject%0A%09self%20add%3A%20anObject'),
  746. messageSends: ["add:"],
  747. referencedClasses: []
  748. }),
  749. smalltalk.SequenceableCollection);
  750. smalltalk.addMethod(
  751. unescape('_withIndexDo_'),
  752. smalltalk.method({
  753. selector: unescape('withIndexDo%3A'),
  754. category: 'enumerating',
  755. fn: function (aBlock){
  756. var self=this;
  757. for(var i=0;i<self.length;i++){aBlock(self[i], i+1);};
  758. return self;},
  759. args: ["aBlock"],
  760. source: unescape('withIndexDo%3A%20aBlock%0A%09%3Cfor%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7BaBlock%28self%5Bi%5D%2C%20i+1%29%3B%7D%3E'),
  761. messageSends: [],
  762. referencedClasses: []
  763. }),
  764. smalltalk.SequenceableCollection);
  765. smalltalk.addMethod(
  766. unescape('_allButFirst'),
  767. smalltalk.method({
  768. selector: unescape('allButFirst'),
  769. category: 'accessing',
  770. fn: function (){
  771. var self=this;
  772. return smalltalk.send(self, "_copyFrom_to_", [(2), smalltalk.send(self, "_size", [])]);
  773. return self;},
  774. args: [],
  775. source: unescape('allButFirst%0A%09%5Eself%20copyFrom%3A%202%20to%3A%20self%20size'),
  776. messageSends: ["copyFrom:to:", "size"],
  777. referencedClasses: []
  778. }),
  779. smalltalk.SequenceableCollection);
  780. smalltalk.addMethod(
  781. unescape('_allButLast'),
  782. smalltalk.method({
  783. selector: unescape('allButLast'),
  784. category: 'accessing',
  785. fn: function (){
  786. var self=this;
  787. return smalltalk.send(self, "_copyFrom_to_", [(1), ((($receiver = smalltalk.send(self, "_size", [])).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)]))]);
  788. return self;},
  789. args: [],
  790. source: unescape('allButLast%0A%09%5Eself%20copyFrom%3A%201%20to%3A%20self%20size%20-%201'),
  791. messageSends: ["copyFrom:to:", unescape("-"), "size"],
  792. referencedClasses: []
  793. }),
  794. smalltalk.SequenceableCollection);
  795. smalltalk.addMethod(
  796. unescape('_indexOf_'),
  797. smalltalk.method({
  798. selector: unescape('indexOf%3A'),
  799. category: 'accessing',
  800. fn: function (anObject){
  801. var self=this;
  802. return smalltalk.send(self, "_indexOf_ifAbsent_", [anObject, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  803. return self;},
  804. args: ["anObject"],
  805. source: unescape('indexOf%3A%20anObject%0A%09%5Eself%20indexOf%3A%20anObject%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  806. messageSends: ["indexOf:ifAbsent:", "errorNotFound"],
  807. referencedClasses: []
  808. }),
  809. smalltalk.SequenceableCollection);
  810. smalltalk.addMethod(
  811. unescape('_indexOf_ifAbsent_'),
  812. smalltalk.method({
  813. selector: unescape('indexOf%3AifAbsent%3A'),
  814. category: 'accessing',
  815. fn: function (anObject, aBlock){
  816. var self=this;
  817. for(var i=0;i<self.length;i++){
  818. if(self[i].__eq(anObject)) {return i+1}
  819. }
  820. return aBlock();
  821. ;
  822. return self;},
  823. args: ["anObject", "aBlock"],
  824. source: unescape('indexOf%3A%20anObject%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09for%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%7B%0A%09%09%09if%28self%5Bi%5D.__eq%28anObject%29%29%20%7Breturn%20i+1%7D%0A%09%09%7D%0A%09%09return%20aBlock%28%29%3B%0A%09%3E'),
  825. messageSends: [],
  826. referencedClasses: []
  827. }),
  828. smalltalk.SequenceableCollection);
  829. smalltalk.addMethod(
  830. unescape('_indexOf_startingAt_ifAbsent_'),
  831. smalltalk.method({
  832. selector: unescape('indexOf%3AstartingAt%3AifAbsent%3A'),
  833. category: 'accessing',
  834. fn: function (anObject, start, aBlock){
  835. var self=this;
  836. for(var i=start-1;i<self.length;i++){
  837. if(self[i].__eq(anObject)) {return i+1}
  838. }
  839. return aBlock();
  840. ;
  841. return self;},
  842. args: ["anObject", "start", "aBlock"],
  843. source: unescape('indexOf%3A%20anObject%20startingAt%3A%20start%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09for%28var%20i%3Dstart-1%3Bi%3Cself.length%3Bi++%29%7B%0A%09%09%09if%28self%5Bi%5D.__eq%28anObject%29%29%20%7Breturn%20i+1%7D%0A%09%09%7D%0A%09%09return%20aBlock%28%29%3B%0A%09%3E'),
  844. messageSends: [],
  845. referencedClasses: []
  846. }),
  847. smalltalk.SequenceableCollection);
  848. smalltalk.addMethod(
  849. unescape('_indexOf_startingAt_'),
  850. smalltalk.method({
  851. selector: unescape('indexOf%3AstartingAt%3A'),
  852. category: 'accessing',
  853. fn: function (anObject, start){
  854. var self=this;
  855. return smalltalk.send(self, "_indexOf_startingAt_ifAbsent_", [anObject, start, (function(){return (0);})]);
  856. return self;},
  857. args: ["anObject", "start"],
  858. source: unescape('indexOf%3A%20anObject%20startingAt%3A%20start%0A%09%22Answer%20the%20index%20of%20the%20first%20occurence%20of%20anElement%20after%20start%0A%09within%20the%20receiver.%20If%20the%20receiver%20does%20not%20contain%20anElement%2C%20%0A%09answer%200.%22%0A%09%5Eself%20indexOf%3A%20anObject%20startingAt%3A%20start%20ifAbsent%3A%20%5B0%5D'),
  859. messageSends: ["indexOf:startingAt:ifAbsent:"],
  860. referencedClasses: []
  861. }),
  862. smalltalk.SequenceableCollection);
  863. smalltalk.addMethod(
  864. unescape('_reversed'),
  865. smalltalk.method({
  866. selector: unescape('reversed'),
  867. category: 'converting',
  868. fn: function (){
  869. var self=this;
  870. smalltalk.send(self, "_subclassResponsibility", []);
  871. return self;},
  872. args: [],
  873. source: unescape('reversed%0A%09self%20subclassResponsibility'),
  874. messageSends: ["subclassResponsibility"],
  875. referencedClasses: []
  876. }),
  877. smalltalk.SequenceableCollection);
  878. smalltalk.addMethod(
  879. unescape('_atRandom'),
  880. smalltalk.method({
  881. selector: unescape('atRandom'),
  882. category: 'accessing',
  883. fn: function (){
  884. var self=this;
  885. return smalltalk.send(self, "_at_", [smalltalk.send(smalltalk.send(self, "_size", []), "_atRandom", [])]);
  886. return self;},
  887. args: [],
  888. source: unescape('atRandom%0A%09%5E%20self%20at%3A%20self%20size%20atRandom'),
  889. messageSends: ["at:", "atRandom", "size"],
  890. referencedClasses: []
  891. }),
  892. smalltalk.SequenceableCollection);
  893. smalltalk.addMethod(
  894. unescape('__eq'),
  895. smalltalk.method({
  896. selector: unescape('%3D'),
  897. category: 'comparing',
  898. fn: function (aCollection){
  899. var self=this;
  900. try{((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aCollection, "_size", [])]);})])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  901. smalltalk.send(self, "_withIndexDo_", [(function(each, i){return ((($receiver = smalltalk.send(smalltalk.send(aCollection, "_at_", [i]), "__eq", [each])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));})]);
  902. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return true}})})();
  903. return self;
  904. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  905. args: ["aCollection"],
  906. source: unescape('%3D%20aCollection%0A%09%28self%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%09%09self%20size%20%3D%20aCollection%20size%5D%29%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20withIndexDo%3A%20%5B%3Aeach%20%3Ai%20%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28aCollection%20at%3A%20i%29%20%3D%20each%20ifFalse%3A%20%5B%5Efalse%5D%5D.%0A%09%5Etrue'),
  907. messageSends: ["ifFalse:", "and:", unescape("%3D"), "class", "size", "withIndexDo:", "at:"],
  908. referencedClasses: []
  909. }),
  910. smalltalk.SequenceableCollection);
  911. smalltalk.addMethod(
  912. unescape('_shallowCopy'),
  913. smalltalk.method({
  914. selector: unescape('shallowCopy'),
  915. category: 'copying',
  916. fn: function (){
  917. var self=this;
  918. var newCollection=nil;
  919. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(self, "_size", [])]);
  920. smalltalk.send(self, "_withIndexDo_", [(function(each, index){return smalltalk.send(newCollection, "_at_put_", [index, each]);})]);
  921. return newCollection;
  922. return self;},
  923. args: [],
  924. source: unescape('shallowCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new%3A%20self%20size.%0A%09self%20withIndexDo%3A%20%5B%20%3Aeach%20%3Aindex%20%7C%20%0A%09%09newCollection%20at%3A%20index%20put%3A%20each%5D.%0A%09%5EnewCollection'),
  925. messageSends: ["new:", "class", "size", "withIndexDo:", "at:put:"],
  926. referencedClasses: []
  927. }),
  928. smalltalk.SequenceableCollection);
  929. smalltalk.addMethod(
  930. unescape('_deepCopy'),
  931. smalltalk.method({
  932. selector: unescape('deepCopy'),
  933. category: 'copying',
  934. fn: function (){
  935. var self=this;
  936. var newCollection=nil;
  937. newCollection=smalltalk.send(smalltalk.send(self, "_class", []), "_new_", [smalltalk.send(self, "_size", [])]);
  938. smalltalk.send(self, "_withIndexDo_", [(function(each, index){return smalltalk.send(newCollection, "_at_put_", [index, smalltalk.send(each, "_deepCopy", [])]);})]);
  939. return newCollection;
  940. return self;},
  941. args: [],
  942. source: unescape('deepCopy%0A%09%7C%20newCollection%20%7C%0A%09newCollection%20%3A%3D%20self%20class%20new%3A%20self%20size.%0A%09self%20withIndexDo%3A%20%5B%3Aeach%20%3Aindex%20%7C%20%0A%09%09newCollection%20at%3A%20index%20put%3A%20each%20deepCopy%5D.%0A%09%5EnewCollection'),
  943. messageSends: ["new:", "class", "size", "withIndexDo:", "at:put:", "deepCopy"],
  944. referencedClasses: []
  945. }),
  946. smalltalk.SequenceableCollection);
  947. smalltalk.addMethod(
  948. unescape('_printString'),
  949. smalltalk.method({
  950. selector: unescape('printString'),
  951. category: 'printing',
  952. fn: function (){
  953. var self=this;
  954. var str=nil;
  955. str=smalltalk.send("", "_writeStream", []);
  956. smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.Collection), "__comma", [unescape("%20%28")])]);
  957. smalltalk.send(self, "_do_separatedBy_", [(function(each){return smalltalk.send(str, "_nextPutAll_", [smalltalk.send(each, "_printString", [])]);}), (function(){return smalltalk.send(str, "_nextPutAll_", [" "]);})]);
  958. smalltalk.send(str, "_nextPutAll_", [unescape("%29")]);
  959. return smalltalk.send(str, "_contents", []);
  960. return self;},
  961. args: [],
  962. source: unescape('printString%0A%09%7C%20str%20%7C%0A%09str%20%3A%3D%20%27%27%20writeStream.%0A%09str%20nextPutAll%3A%20super%20printString%2C%20%27%20%28%27.%0A%09self%20%0A%09%09do%3A%20%5B%3Aeach%20%7C%20str%20nextPutAll%3A%20each%20printString%5D%0A%09%09separatedBy%3A%20%5Bstr%20nextPutAll%3A%20%27%20%27%5D.%0A%09str%20nextPutAll%3A%20%27%29%27.%0A%09%5Estr%20contents'),
  963. messageSends: ["writeStream", "nextPutAll:", unescape("%2C"), "printString", "do:separatedBy:", "contents"],
  964. referencedClasses: []
  965. }),
  966. smalltalk.SequenceableCollection);
  967. smalltalk.addClass('CharacterArray', smalltalk.SequenceableCollection, [], 'Kernel-Collections');
  968. smalltalk.addMethod(
  969. unescape('_at_put_'),
  970. smalltalk.method({
  971. selector: unescape('at%3Aput%3A'),
  972. category: 'accessing',
  973. fn: function (anIndex, anObject){
  974. var self=this;
  975. smalltalk.send(self, "_errorReadOnly", []);
  976. return self;},
  977. args: ["anIndex", "anObject"],
  978. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09self%20errorReadOnly'),
  979. messageSends: ["errorReadOnly"],
  980. referencedClasses: []
  981. }),
  982. smalltalk.CharacterArray);
  983. smalltalk.addMethod(
  984. unescape('_add_'),
  985. smalltalk.method({
  986. selector: unescape('add%3A'),
  987. category: 'adding',
  988. fn: function (anObject){
  989. var self=this;
  990. smalltalk.send(self, "_errorReadOnly", []);
  991. return self;},
  992. args: ["anObject"],
  993. source: unescape('add%3A%20anObject%0A%09self%20errorReadOnly'),
  994. messageSends: ["errorReadOnly"],
  995. referencedClasses: []
  996. }),
  997. smalltalk.CharacterArray);
  998. smalltalk.addMethod(
  999. unescape('__comma'),
  1000. smalltalk.method({
  1001. selector: unescape('%2C'),
  1002. category: 'copying',
  1003. fn: function (aString){
  1004. var self=this;
  1005. return smalltalk.send(smalltalk.send(self, "_asString", []), "__comma", [smalltalk.send(aString, "_asString", [])]);
  1006. return self;},
  1007. args: ["aString"],
  1008. source: unescape('%2C%20aString%0A%09%5Eself%20asString%2C%20aString%20asString'),
  1009. messageSends: [unescape("%2C"), "asString"],
  1010. referencedClasses: []
  1011. }),
  1012. smalltalk.CharacterArray);
  1013. smalltalk.addMethod(
  1014. unescape('_asString'),
  1015. smalltalk.method({
  1016. selector: unescape('asString'),
  1017. category: 'converting',
  1018. fn: function (){
  1019. var self=this;
  1020. return smalltalk.send(self, "_subclassResponsibility", []);
  1021. return self;},
  1022. args: [],
  1023. source: unescape('asString%0A%09%5Eself%20subclassResponsibility'),
  1024. messageSends: ["subclassResponsibility"],
  1025. referencedClasses: []
  1026. }),
  1027. smalltalk.CharacterArray);
  1028. smalltalk.addMethod(
  1029. unescape('_asNumber'),
  1030. smalltalk.method({
  1031. selector: unescape('asNumber'),
  1032. category: 'converting',
  1033. fn: function (){
  1034. var self=this;
  1035. return smalltalk.send(smalltalk.send(self, "_asString", []), "_asNumber", []);
  1036. return self;},
  1037. args: [],
  1038. source: unescape('asNumber%0A%09%5Eself%20asString%20asNumber'),
  1039. messageSends: ["asNumber", "asString"],
  1040. referencedClasses: []
  1041. }),
  1042. smalltalk.CharacterArray);
  1043. smalltalk.addMethod(
  1044. unescape('_errorReadOnly'),
  1045. smalltalk.method({
  1046. selector: unescape('errorReadOnly'),
  1047. category: 'error handling',
  1048. fn: function (){
  1049. var self=this;
  1050. smalltalk.send(self, "_error_", [unescape("Object%20is%20read-only")]);
  1051. return self;},
  1052. args: [],
  1053. source: unescape('errorReadOnly%0A%09self%20error%3A%20%27Object%20is%20read-only%27'),
  1054. messageSends: ["error:"],
  1055. referencedClasses: []
  1056. }),
  1057. smalltalk.CharacterArray);
  1058. smalltalk.addMethod(
  1059. unescape('_printString'),
  1060. smalltalk.method({
  1061. selector: unescape('printString'),
  1062. category: 'printing',
  1063. fn: function (){
  1064. var self=this;
  1065. return smalltalk.send(smalltalk.send(self, "_asString", []), "_printString", []);
  1066. return self;},
  1067. args: [],
  1068. source: unescape('printString%0A%09%5Eself%20asString%20printString'),
  1069. messageSends: ["printString", "asString"],
  1070. referencedClasses: []
  1071. }),
  1072. smalltalk.CharacterArray);
  1073. smalltalk.addMethod(
  1074. unescape('_remove_'),
  1075. smalltalk.method({
  1076. selector: unescape('remove%3A'),
  1077. category: 'adding',
  1078. fn: function (anObject){
  1079. var self=this;
  1080. smalltalk.send(self, "_errorReadOnly", []);
  1081. return self;},
  1082. args: ["anObject"],
  1083. source: unescape('remove%3A%20anObject%0A%09self%20errorReadOnly'),
  1084. messageSends: ["errorReadOnly"],
  1085. referencedClasses: []
  1086. }),
  1087. smalltalk.CharacterArray);
  1088. smalltalk.addMethod(
  1089. unescape('_asUppercase'),
  1090. smalltalk.method({
  1091. selector: unescape('asUppercase'),
  1092. category: 'converting',
  1093. fn: function (){
  1094. var self=this;
  1095. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_asUppercase", [])]);
  1096. return self;},
  1097. args: [],
  1098. source: unescape('asUppercase%0A%09%5Eself%20class%20fromString%3A%20self%20asString%20asUppercase'),
  1099. messageSends: ["fromString:", "class", "asUppercase", "asString"],
  1100. referencedClasses: []
  1101. }),
  1102. smalltalk.CharacterArray);
  1103. smalltalk.addMethod(
  1104. unescape('_asSymbol'),
  1105. smalltalk.method({
  1106. selector: unescape('asSymbol'),
  1107. category: 'converting',
  1108. fn: function (){
  1109. var self=this;
  1110. return smalltalk.send(self, "_subclassResponsibility", []);
  1111. return self;},
  1112. args: [],
  1113. source: unescape('asSymbol%0A%09%5Eself%20subclassResponsibility'),
  1114. messageSends: ["subclassResponsibility"],
  1115. referencedClasses: []
  1116. }),
  1117. smalltalk.CharacterArray);
  1118. smalltalk.addMethod(
  1119. unescape('_asLowercase'),
  1120. smalltalk.method({
  1121. selector: unescape('asLowercase'),
  1122. category: 'converting',
  1123. fn: function (){
  1124. var self=this;
  1125. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_asLowercase", [])]);
  1126. return self;},
  1127. args: [],
  1128. source: unescape('asLowercase%0A%09%5Eself%20class%20fromString%3A%20self%20asString%20asLowercase'),
  1129. messageSends: ["fromString:", "class", "asLowercase", "asString"],
  1130. referencedClasses: []
  1131. }),
  1132. smalltalk.CharacterArray);
  1133. smalltalk.addMethod(
  1134. unescape('_fromString_'),
  1135. smalltalk.method({
  1136. selector: unescape('fromString%3A'),
  1137. category: 'instance creation',
  1138. fn: function (aString){
  1139. var self=this;
  1140. smalltalk.send(self, "_subclassResponsibility", []);
  1141. return self;},
  1142. args: ["aString"],
  1143. source: unescape('fromString%3A%20aString%0A%09self%20subclassResponsibility'),
  1144. messageSends: ["subclassResponsibility"],
  1145. referencedClasses: []
  1146. }),
  1147. smalltalk.CharacterArray.klass);
  1148. smalltalk.addClass('String', smalltalk.CharacterArray, [], 'Kernel-Collections');
  1149. smalltalk.addMethod(
  1150. unescape('__eq'),
  1151. smalltalk.method({
  1152. selector: unescape('%3D'),
  1153. category: 'comparing',
  1154. fn: function (aString){
  1155. var self=this;
  1156. try{((($receiver = smalltalk.send(smalltalk.send(aString, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  1157. return String(self) === String(aString);
  1158. return self;
  1159. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  1160. args: ["aString"],
  1161. source: unescape('%3D%20aString%0A%09aString%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%3Creturn%20String%28self%29%20%3D%3D%3D%20String%28aString%29%3E'),
  1162. messageSends: ["ifFalse:", unescape("%3D"), "class"],
  1163. referencedClasses: []
  1164. }),
  1165. smalltalk.String);
  1166. smalltalk.addMethod(
  1167. unescape('_size'),
  1168. smalltalk.method({
  1169. selector: unescape('size'),
  1170. category: 'accessing',
  1171. fn: function (){
  1172. var self=this;
  1173. return self.length;
  1174. return self;},
  1175. args: [],
  1176. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  1177. messageSends: [],
  1178. referencedClasses: []
  1179. }),
  1180. smalltalk.String);
  1181. smalltalk.addMethod(
  1182. unescape('_at_ifAbsent_'),
  1183. smalltalk.method({
  1184. selector: unescape('at%3AifAbsent%3A'),
  1185. category: 'accessing',
  1186. fn: function (anIndex, aBlock){
  1187. var self=this;
  1188. return self[anIndex - 1] || aBlock();
  1189. return self;},
  1190. args: ["anIndex", "aBlock"],
  1191. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%20%7C%7C%20aBlock%28%29%3E'),
  1192. messageSends: [],
  1193. referencedClasses: []
  1194. }),
  1195. smalltalk.String);
  1196. smalltalk.addMethod(
  1197. unescape('_escaped'),
  1198. smalltalk.method({
  1199. selector: unescape('escaped'),
  1200. category: 'accessing',
  1201. fn: function (){
  1202. var self=this;
  1203. return escape(self);
  1204. return self;},
  1205. args: [],
  1206. source: unescape('escaped%0A%09%3Creturn%20escape%28self%29%3E'),
  1207. messageSends: [],
  1208. referencedClasses: []
  1209. }),
  1210. smalltalk.String);
  1211. smalltalk.addMethod(
  1212. unescape('_unescaped'),
  1213. smalltalk.method({
  1214. selector: unescape('unescaped'),
  1215. category: 'accessing',
  1216. fn: function (){
  1217. var self=this;
  1218. return unescape(self);
  1219. return self;},
  1220. args: [],
  1221. source: unescape('unescaped%0A%09%3Creturn%20unescape%28self%29%3E'),
  1222. messageSends: [],
  1223. referencedClasses: []
  1224. }),
  1225. smalltalk.String);
  1226. smalltalk.addMethod(
  1227. unescape('__comma'),
  1228. smalltalk.method({
  1229. selector: unescape('%2C'),
  1230. category: 'copying',
  1231. fn: function (aString){
  1232. var self=this;
  1233. return self + aString;
  1234. return self;},
  1235. args: ["aString"],
  1236. source: unescape('%2C%20aString%0A%09%3Creturn%20self%20+%20aString%3E'),
  1237. messageSends: [],
  1238. referencedClasses: []
  1239. }),
  1240. smalltalk.String);
  1241. smalltalk.addMethod(
  1242. unescape('_copyFrom_to_'),
  1243. smalltalk.method({
  1244. selector: unescape('copyFrom%3Ato%3A'),
  1245. category: 'copying',
  1246. fn: function (anIndex, anotherIndex){
  1247. var self=this;
  1248. return self.substring(anIndex - 1, anotherIndex);
  1249. return self;},
  1250. args: ["anIndex", "anotherIndex"],
  1251. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%3Creturn%20self.substring%28anIndex%20-%201%2C%20anotherIndex%29%3E'),
  1252. messageSends: [],
  1253. referencedClasses: []
  1254. }),
  1255. smalltalk.String);
  1256. smalltalk.addMethod(
  1257. unescape('_shallowCopy'),
  1258. smalltalk.method({
  1259. selector: unescape('shallowCopy'),
  1260. category: 'copying',
  1261. fn: function (){
  1262. var self=this;
  1263. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [self]);
  1264. return self;},
  1265. args: [],
  1266. source: unescape('shallowCopy%0A%09%5Eself%20class%20fromString%3A%20self'),
  1267. messageSends: ["fromString:", "class"],
  1268. referencedClasses: []
  1269. }),
  1270. smalltalk.String);
  1271. smalltalk.addMethod(
  1272. unescape('_deepCopy'),
  1273. smalltalk.method({
  1274. selector: unescape('deepCopy'),
  1275. category: 'copying',
  1276. fn: function (){
  1277. var self=this;
  1278. return smalltalk.send(self, "_shallowCopy", []);
  1279. return self;},
  1280. args: [],
  1281. source: unescape('deepCopy%0A%09%5Eself%20shallowCopy'),
  1282. messageSends: ["shallowCopy"],
  1283. referencedClasses: []
  1284. }),
  1285. smalltalk.String);
  1286. smalltalk.addMethod(
  1287. unescape('_asSelector'),
  1288. smalltalk.method({
  1289. selector: unescape('asSelector'),
  1290. category: 'converting',
  1291. fn: function (){
  1292. var self=this;
  1293. var selector=nil;
  1294. selector=smalltalk.send("_", "__comma", [self]);
  1295. selector=smalltalk.send(selector, "_replace_with_", [":", "_"]);
  1296. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B+%5D"), "_plus"]);
  1297. selector=smalltalk.send(selector, "_replace_with_", [unescape("-"), "_minus"]);
  1298. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B*%5D"), "_star"]);
  1299. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B/%5D"), "_slash"]);
  1300. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3E"), "_gt"]);
  1301. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3C"), "_lt"]);
  1302. selector=smalltalk.send(selector, "_replace_with_", [unescape("%3D"), "_eq"]);
  1303. selector=smalltalk.send(selector, "_replace_with_", [unescape("%2C"), "_comma"]);
  1304. selector=smalltalk.send(selector, "_replace_with_", [unescape("%5B@%5D"), "_at"]);
  1305. return selector;
  1306. return self;},
  1307. args: [],
  1308. source: unescape('asSelector%0A%09%22If%20you%20change%20this%20method%2C%20change%20smalltalk.convertSelector%20too%20%28see%20js/boot.js%20file%29%22%0A%0A%09%7C%20selector%20%7C%0A%09selector%20%3A%3D%20%27_%27%2C%20self.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%3A%27%20with%3A%20%27_%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B+%5D%27%20with%3A%20%27_plus%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27-%27%20with%3A%20%27_minus%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B*%5D%27%20with%3A%20%27_star%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B/%5D%27%20with%3A%20%27_slash%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%3E%27%20with%3A%20%27_gt%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%3C%27%20with%3A%20%27_lt%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%3D%27%20with%3A%20%27_eq%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%2C%27%20with%3A%20%27_comma%27.%0A%09selector%20%3A%3D%20selector%20replace%3A%20%27%5B@%5D%27%20with%3A%20%27_at%27.%0A%09%5Eselector'),
  1309. messageSends: [unescape("%2C"), "replace:with:"],
  1310. referencedClasses: []
  1311. }),
  1312. smalltalk.String);
  1313. smalltalk.addMethod(
  1314. unescape('_asJavascript'),
  1315. smalltalk.method({
  1316. selector: unescape('asJavascript'),
  1317. category: 'converting',
  1318. fn: function (){
  1319. var self=this;
  1320. if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)
  1321. return "unescape(\"" + escape(self) + "\")";
  1322. else
  1323. return "\"" + self + "\"";
  1324. ;
  1325. return self;},
  1326. args: [],
  1327. source: unescape('asJavascript%0A%09%3C%0A%09%09if%28self.search%28/%5E%5Ba-zA-Z0-9_%3A.%24%20%5D*%24/%29%20%3D%3D%20-1%29%0A%09%09%09return%20%22unescape%28%5C%22%22%20+%20escape%28self%29%20+%20%22%5C%22%29%22%3B%0A%09%09else%0A%09%09%09return%20%22%5C%22%22%20+%20self%20+%20%22%5C%22%22%3B%0A%09%3E'),
  1328. messageSends: [],
  1329. referencedClasses: []
  1330. }),
  1331. smalltalk.String);
  1332. smalltalk.addMethod(
  1333. unescape('_replace_with_'),
  1334. smalltalk.method({
  1335. selector: unescape('replace%3Awith%3A'),
  1336. category: 'regular expressions',
  1337. fn: function (aString, anotherString){
  1338. var self=this;
  1339. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [aString, "g"]), anotherString]);
  1340. return self;},
  1341. args: ["aString", "anotherString"],
  1342. source: unescape('replace%3A%20aString%20with%3A%20anotherString%0A%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20aString%20flag%3A%20%27g%27%29%20with%3A%20anotherString'),
  1343. messageSends: ["replaceRegexp:with:", "fromString:flag:"],
  1344. referencedClasses: ["RegularExpression"]
  1345. }),
  1346. smalltalk.String);
  1347. smalltalk.addMethod(
  1348. unescape('_replaceRegexp_with_'),
  1349. smalltalk.method({
  1350. selector: unescape('replaceRegexp%3Awith%3A'),
  1351. category: 'regular expressions',
  1352. fn: function (aRegexp, aString){
  1353. var self=this;
  1354. return self.replace(aRegexp, aString);
  1355. return self;},
  1356. args: ["aRegexp", "aString"],
  1357. source: unescape('replaceRegexp%3A%20aRegexp%20with%3A%20aString%0A%09%3Creturn%20self.replace%28aRegexp%2C%20aString%29%3E'),
  1358. messageSends: [],
  1359. referencedClasses: []
  1360. }),
  1361. smalltalk.String);
  1362. smalltalk.addMethod(
  1363. unescape('_tokenize_'),
  1364. smalltalk.method({
  1365. selector: unescape('tokenize%3A'),
  1366. category: 'converting',
  1367. fn: function (aString){
  1368. var self=this;
  1369. return self.split(aString);
  1370. return self;},
  1371. args: ["aString"],
  1372. source: unescape('tokenize%3A%20aString%0A%09%3Creturn%20self.split%28aString%29%3E'),
  1373. messageSends: [],
  1374. referencedClasses: []
  1375. }),
  1376. smalltalk.String);
  1377. smalltalk.addMethod(
  1378. unescape('_match_'),
  1379. smalltalk.method({
  1380. selector: unescape('match%3A'),
  1381. category: 'regular expressions',
  1382. fn: function (aRegexp){
  1383. var self=this;
  1384. return self.search(aRegexp) != -1;
  1385. return self;},
  1386. args: ["aRegexp"],
  1387. source: unescape('match%3A%20aRegexp%0A%09%3Creturn%20self.search%28aRegexp%29%20%21%3D%20-1%3E'),
  1388. messageSends: [],
  1389. referencedClasses: []
  1390. }),
  1391. smalltalk.String);
  1392. smalltalk.addMethod(
  1393. unescape('_asString'),
  1394. smalltalk.method({
  1395. selector: unescape('asString'),
  1396. category: 'converting',
  1397. fn: function (){
  1398. var self=this;
  1399. return self;
  1400. return self;},
  1401. args: [],
  1402. source: unescape('asString%0A%09%5Eself'),
  1403. messageSends: [],
  1404. referencedClasses: []
  1405. }),
  1406. smalltalk.String);
  1407. smalltalk.addMethod(
  1408. unescape('_asNumber'),
  1409. smalltalk.method({
  1410. selector: unescape('asNumber'),
  1411. category: 'converting',
  1412. fn: function (){
  1413. var self=this;
  1414. return Number(self);
  1415. return self;},
  1416. args: [],
  1417. source: unescape('asNumber%0A%09%3Creturn%20Number%28self%29%3E'),
  1418. messageSends: [],
  1419. referencedClasses: []
  1420. }),
  1421. smalltalk.String);
  1422. smalltalk.addMethod(
  1423. unescape('_printString'),
  1424. smalltalk.method({
  1425. selector: unescape('printString'),
  1426. category: 'printing',
  1427. fn: function (){
  1428. var self=this;
  1429. return smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [self]), "__comma", [unescape("%27")]);
  1430. return self;},
  1431. args: [],
  1432. source: unescape('printString%0A%09%5E%27%27%27%27%2C%20self%2C%20%27%27%27%27'),
  1433. messageSends: [unescape("%2C")],
  1434. referencedClasses: []
  1435. }),
  1436. smalltalk.String);
  1437. smalltalk.addMethod(
  1438. unescape('_printNl'),
  1439. smalltalk.method({
  1440. selector: unescape('printNl'),
  1441. category: 'printing',
  1442. fn: function (){
  1443. var self=this;
  1444. console.log(self);
  1445. return self;},
  1446. args: [],
  1447. source: unescape('printNl%0A%09%3Cconsole.log%28self%29%3E'),
  1448. messageSends: [],
  1449. referencedClasses: []
  1450. }),
  1451. smalltalk.String);
  1452. smalltalk.addMethod(
  1453. unescape('_isString'),
  1454. smalltalk.method({
  1455. selector: unescape('isString'),
  1456. category: 'testing',
  1457. fn: function (){
  1458. var self=this;
  1459. return true;
  1460. return self;},
  1461. args: [],
  1462. source: unescape('isString%0A%09%5Etrue'),
  1463. messageSends: [],
  1464. referencedClasses: []
  1465. }),
  1466. smalltalk.String);
  1467. smalltalk.addMethod(
  1468. unescape('__gt'),
  1469. smalltalk.method({
  1470. selector: unescape('%3E'),
  1471. category: 'comparing',
  1472. fn: function (aString){
  1473. var self=this;
  1474. return String(self) > aString._asString();
  1475. return self;},
  1476. args: ["aString"],
  1477. source: unescape('%3E%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%20aString._asString%28%29%3E'),
  1478. messageSends: [],
  1479. referencedClasses: []
  1480. }),
  1481. smalltalk.String);
  1482. smalltalk.addMethod(
  1483. unescape('__lt'),
  1484. smalltalk.method({
  1485. selector: unescape('%3C'),
  1486. category: 'comparing',
  1487. fn: function (aString){
  1488. var self=this;
  1489. return String(self) < aString._asString();
  1490. return self;},
  1491. args: ["aString"],
  1492. source: unescape('%3C%20aString%0A%09%3Creturn%20String%28self%29%20%3C%20aString._asString%28%29%3E'),
  1493. messageSends: [],
  1494. referencedClasses: []
  1495. }),
  1496. smalltalk.String);
  1497. smalltalk.addMethod(
  1498. unescape('__gt_eq'),
  1499. smalltalk.method({
  1500. selector: unescape('%3E%3D'),
  1501. category: 'comparing',
  1502. fn: function (aString){
  1503. var self=this;
  1504. return String(self) >= aString._asString();
  1505. return self;},
  1506. args: ["aString"],
  1507. source: unescape('%3E%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3E%3E%3D%20aString._asString%28%29%3E'),
  1508. messageSends: [],
  1509. referencedClasses: []
  1510. }),
  1511. smalltalk.String);
  1512. smalltalk.addMethod(
  1513. unescape('__lt_eq'),
  1514. smalltalk.method({
  1515. selector: unescape('%3C%3D'),
  1516. category: 'comparing',
  1517. fn: function (aString){
  1518. var self=this;
  1519. return String(self) <= aString._asString();
  1520. return self;},
  1521. args: ["aString"],
  1522. source: unescape('%3C%3D%20aString%0A%09%3Creturn%20String%28self%29%20%3C%3D%20aString._asString%28%29%3E'),
  1523. messageSends: [],
  1524. referencedClasses: []
  1525. }),
  1526. smalltalk.String);
  1527. smalltalk.addMethod(
  1528. unescape('_trimLeft_'),
  1529. smalltalk.method({
  1530. selector: unescape('trimLeft%3A'),
  1531. category: 'regular expressions',
  1532. fn: function (separators){
  1533. var self=this;
  1534. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5E%5B"), "__comma", [separators]), "__comma", [unescape("%5D+")]), "g"]), ""]);
  1535. return self;},
  1536. args: ["separators"],
  1537. source: unescape('trimLeft%3A%20separators%0A%0A%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5E%5B%27%2C%20separators%2C%20%27%5D+%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27'),
  1538. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  1539. referencedClasses: ["RegularExpression"]
  1540. }),
  1541. smalltalk.String);
  1542. smalltalk.addMethod(
  1543. unescape('_trimRight_'),
  1544. smalltalk.method({
  1545. selector: unescape('trimRight%3A'),
  1546. category: 'regular expressions',
  1547. fn: function (separators){
  1548. var self=this;
  1549. return smalltalk.send(self, "_replaceRegexp_with_", [smalltalk.send((smalltalk.RegularExpression || RegularExpression), "_fromString_flag_", [smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [separators]), "__comma", [unescape("%5D+%24")]), "g"]), ""]);
  1550. return self;},
  1551. args: ["separators"],
  1552. source: unescape('trimRight%3A%20separators%0A%0A%09%5Eself%20replaceRegexp%3A%20%28RegularExpression%20fromString%3A%20%27%5B%27%2C%20separators%2C%20%27%5D+%24%27%20flag%3A%20%27g%27%29%20with%3A%20%27%27'),
  1553. messageSends: ["replaceRegexp:with:", "fromString:flag:", unescape("%2C")],
  1554. referencedClasses: ["RegularExpression"]
  1555. }),
  1556. smalltalk.String);
  1557. smalltalk.addMethod(
  1558. unescape('_trimLeft'),
  1559. smalltalk.method({
  1560. selector: unescape('trimLeft'),
  1561. category: 'regular expressions',
  1562. fn: function (){
  1563. var self=this;
  1564. return smalltalk.send(self, "_trimLeft_", [unescape("%5Cs")]);
  1565. return self;},
  1566. args: [],
  1567. source: unescape('trimLeft%0A%09%5Eself%20trimLeft%3A%20%27%5Cs%27'),
  1568. messageSends: ["trimLeft:"],
  1569. referencedClasses: []
  1570. }),
  1571. smalltalk.String);
  1572. smalltalk.addMethod(
  1573. unescape('_trimRight'),
  1574. smalltalk.method({
  1575. selector: unescape('trimRight'),
  1576. category: 'regular expressions',
  1577. fn: function (){
  1578. var self=this;
  1579. return smalltalk.send(self, "_trimRight_", [unescape("%5Cs")]);
  1580. return self;},
  1581. args: [],
  1582. source: unescape('trimRight%0A%09%5Eself%20trimRight%3A%20%27%5Cs%27'),
  1583. messageSends: ["trimRight:"],
  1584. referencedClasses: []
  1585. }),
  1586. smalltalk.String);
  1587. smalltalk.addMethod(
  1588. unescape('_trimBoth'),
  1589. smalltalk.method({
  1590. selector: unescape('trimBoth'),
  1591. category: 'regular expressions',
  1592. fn: function (){
  1593. var self=this;
  1594. return smalltalk.send(self, "_trimBoth_", [unescape("%5Cs")]);
  1595. return self;},
  1596. args: [],
  1597. source: unescape('trimBoth%0A%09%5Eself%20trimBoth%3A%20%27%5Cs%27'),
  1598. messageSends: ["trimBoth:"],
  1599. referencedClasses: []
  1600. }),
  1601. smalltalk.String);
  1602. smalltalk.addMethod(
  1603. unescape('_trimBoth_'),
  1604. smalltalk.method({
  1605. selector: unescape('trimBoth%3A'),
  1606. category: 'regular expressions',
  1607. fn: function (separators){
  1608. var self=this;
  1609. return smalltalk.send(smalltalk.send(self, "_trimLeft_", [separators]), "_trimRight_", [separators]);
  1610. return self;},
  1611. args: ["separators"],
  1612. source: unescape('trimBoth%3A%20separators%0A%0A%09%5E%28self%20trimLeft%3A%20separators%29%20trimRight%3A%20separators'),
  1613. messageSends: ["trimRight:", "trimLeft:"],
  1614. referencedClasses: []
  1615. }),
  1616. smalltalk.String);
  1617. smalltalk.addMethod(
  1618. unescape('_asLowercase'),
  1619. smalltalk.method({
  1620. selector: unescape('asLowercase'),
  1621. category: 'converting',
  1622. fn: function (){
  1623. var self=this;
  1624. return self.toLowerCase();
  1625. return self;},
  1626. args: [],
  1627. source: unescape('asLowercase%0A%09%3Creturn%20self.toLowerCase%28%29%3E'),
  1628. messageSends: [],
  1629. referencedClasses: []
  1630. }),
  1631. smalltalk.String);
  1632. smalltalk.addMethod(
  1633. unescape('_asUppercase'),
  1634. smalltalk.method({
  1635. selector: unescape('asUppercase'),
  1636. category: 'converting',
  1637. fn: function (){
  1638. var self=this;
  1639. return self.toUpperCase();
  1640. return self;},
  1641. args: [],
  1642. source: unescape('asUppercase%0A%09%3Creturn%20self.toUpperCase%28%29%3E'),
  1643. messageSends: [],
  1644. referencedClasses: []
  1645. }),
  1646. smalltalk.String);
  1647. smalltalk.addMethod(
  1648. unescape('_join_'),
  1649. smalltalk.method({
  1650. selector: unescape('join%3A'),
  1651. category: 'split join',
  1652. fn: function (aCollection){
  1653. var self=this;
  1654. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){return smalltalk.send(aCollection, "_do_separatedBy_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(each, "_asString", [])]);}), (function(){return smalltalk.send(stream, "_nextPutAll_", [self]);})]);})]);
  1655. return self;},
  1656. args: ["aCollection"],
  1657. source: unescape('join%3A%20aCollection%20%0A%09%5E%20String%0A%09%09streamContents%3A%20%5B%3Astream%20%7C%20aCollection%0A%09%09%09%09do%3A%20%5B%3Aeach%20%7C%20stream%20nextPutAll%3A%20each%20asString%5D%20%0A%09%09%09%09separatedBy%3A%20%5Bstream%20nextPutAll%3A%20self%5D%5D'),
  1658. messageSends: ["streamContents:", "do:separatedBy:", "nextPutAll:", "asString"],
  1659. referencedClasses: ["String"]
  1660. }),
  1661. smalltalk.String);
  1662. smalltalk.addMethod(
  1663. unescape('_includesSubString_'),
  1664. smalltalk.method({
  1665. selector: unescape('includesSubString%3A'),
  1666. category: 'testing',
  1667. fn: function (subString){
  1668. var self=this;
  1669. return self.indexOf(subString) != -1 ;
  1670. return self;},
  1671. args: ["subString"],
  1672. source: unescape('includesSubString%3A%20subString%0A%09%3C%20return%20self.indexOf%28subString%29%20%21%3D%20-1%20%3E'),
  1673. messageSends: [],
  1674. referencedClasses: []
  1675. }),
  1676. smalltalk.String);
  1677. smalltalk.addMethod(
  1678. unescape('_asciiValue'),
  1679. smalltalk.method({
  1680. selector: unescape('asciiValue'),
  1681. category: 'accessing',
  1682. fn: function (){
  1683. var self=this;
  1684. return self.charCodeAt(0);;
  1685. return self;},
  1686. args: [],
  1687. source: unescape('asciiValue%0A%09%3Creturn%20self.charCodeAt%280%29%3B%3E'),
  1688. messageSends: [],
  1689. referencedClasses: []
  1690. }),
  1691. smalltalk.String);
  1692. smalltalk.addMethod(
  1693. unescape('_lineIndicesDo_'),
  1694. smalltalk.method({
  1695. selector: unescape('lineIndicesDo%3A'),
  1696. category: 'split join',
  1697. fn: function (aBlock){
  1698. var self=this;
  1699. try{var cr=nil;
  1700. var lf=nil;
  1701. var start=nil;
  1702. var sz=nil;
  1703. var nextLF=nil;
  1704. var nextCR=nil;
  1705. start=(1);
  1706. sz=smalltalk.send(self, "_size", []);
  1707. cr=smalltalk.send((smalltalk.String || String), "_cr", []);
  1708. nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, (1)]);
  1709. lf=smalltalk.send((smalltalk.String || String), "_lf", []);
  1710. nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, (1)]);
  1711. (function(){while((function(){return ((($receiver = start).klass === smalltalk.Number) ? $receiver <=sz : smalltalk.send($receiver, "__lt_eq", [sz]));})()) {(function(){((($receiver = smalltalk.send(smalltalk.send(nextLF, "__eq", [(0)]), "_and_", [(function(){return smalltalk.send(nextCR, "__eq", [(0)]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, sz, sz]);return (function(){throw({name: 'stReturn', selector: '_lineIndicesDo_', fn: function(){return self}})})();})]));return ((($receiver = smalltalk.send(smalltalk.send(nextCR, "__eq", [(0)]), "_or_", [(function(){return smalltalk.send((0) < nextLF, "_and_", [(function(){return ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver <nextCR : smalltalk.send($receiver, "__lt", [nextCR]));})]);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);})() : (function(){return ((($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextLF).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);}), (function(){return ((($receiver = smalltalk.send((1) + nextCR, "__eq", [nextLF])).klass === smalltalk.Boolean) ? ($receiver ? (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);})() : (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextLF]);start=(1) + nextLF;nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);return nextLF=smalltalk.send(self, "_indexOf_startingAt_", [lf, start]);}), (function(){smalltalk.send(aBlock, "_value_value_value_", [start, ((($receiver = nextCR).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])), nextCR]);start=(1) + nextCR;return nextCR=smalltalk.send(self, "_indexOf_startingAt_", [cr, start]);})]));})]));})()}})();
  1712. return self;
  1713. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineIndicesDo_'){return e.fn()} throw(e)}},
  1714. args: ["aBlock"],
  1715. source: unescape('lineIndicesDo%3A%20aBlock%0A%09%22execute%20aBlock%20with%203%20arguments%20for%20each%20line%3A%0A%09-%20start%20index%20of%20line%0A%09-%20end%20index%20of%20line%20without%20line%20delimiter%0A%09-%20end%20index%20of%20line%20including%20line%20delimiter%28s%29%20CR%2C%20LF%20or%20CRLF%22%0A%09%0A%09%7C%20cr%20lf%20start%20sz%20nextLF%20nextCR%20%7C%0A%09start%20%3A%3D%201.%0A%09sz%20%3A%3D%20self%20size.%0A%09cr%20%3A%3D%20String%20cr.%0A%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%201.%0A%09lf%20%3A%3D%20String%20lf.%0A%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%201.%0A%09%5B%20start%20%3C%3D%20sz%20%5D%20whileTrue%3A%20%5B%0A%09%09%28nextLF%20%3D%200%20and%3A%20%5B%20nextCR%20%3D%200%20%5D%29%0A%09%09%09ifTrue%3A%20%5B%20%22No%20more%20CR%2C%20nor%20LF%2C%20the%20string%20is%20over%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20sz%20value%3A%20sz.%0A%09%09%09%09%09%5Eself%20%5D.%0A%09%09%28nextCR%20%3D%200%20or%3A%20%5B%200%20%3C%20nextLF%20and%3A%20%5B%20nextLF%20%3C%20nextCR%20%5D%20%5D%29%0A%09%09%09ifTrue%3A%20%5B%20%22Found%20a%20LF%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextLF%20-%201%20value%3A%20nextLF.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextLF.%0A%09%09%09%09%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%20start%20%5D%0A%09%09%09ifFalse%3A%20%5B%201%20+%20nextCR%20%3D%20nextLF%0A%09%09%09%09ifTrue%3A%20%5B%20%22Found%20a%20CR-LF%20pair%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextCR%20-%201%20value%3A%20nextLF.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextLF.%0A%09%09%09%09%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%20start.%0A%09%09%09%09%09nextLF%20%3A%3D%20self%20indexOf%3A%20lf%20startingAt%3A%20start%20%5D%0A%09%09%09%09ifFalse%3A%20%5B%20%22Found%20a%20CR%22%0A%09%09%09%09%09aBlock%20value%3A%20start%20value%3A%20nextCR%20-%201%20value%3A%20nextCR.%0A%09%09%09%09%09start%20%3A%3D%201%20+%20nextCR.%0A%09%09%09%09%09nextCR%20%3A%3D%20self%20indexOf%3A%20cr%20startingAt%3A%20start%20%5D%5D%5D'),
  1716. messageSends: ["size", "cr", "indexOf:startingAt:", "lf", "whileTrue:", unescape("%3C%3D"), "ifTrue:", "and:", unescape("%3D"), "value:value:value:", "ifTrue:ifFalse:", "or:", unescape("%3C"), unescape("-"), unescape("+")],
  1717. referencedClasses: ["String"]
  1718. }),
  1719. smalltalk.String);
  1720. smalltalk.addMethod(
  1721. unescape('_linesDo_'),
  1722. smalltalk.method({
  1723. selector: unescape('linesDo%3A'),
  1724. category: 'split join',
  1725. fn: function (aBlock){
  1726. var self=this;
  1727. smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])]);})]);
  1728. return self;},
  1729. args: ["aBlock"],
  1730. source: unescape('linesDo%3A%20aBlock%0A%09%22Execute%20aBlock%20with%20each%20line%20in%20this%20string.%20The%20terminating%20line%0A%09delimiters%20CR%2C%20LF%20or%20CRLF%20pairs%20are%20not%20included%20in%20what%20is%20passed%20to%20aBlock%22%0A%0A%09self%20lineIndicesDo%3A%20%5B%3Astart%20%3AendWithoutDelimiters%20%3Aend%20%7C%0A%09%09aBlock%20value%3A%20%28self%20copyFrom%3A%20start%20to%3A%20endWithoutDelimiters%29%5D'),
  1731. messageSends: ["lineIndicesDo:", "value:", "copyFrom:to:"],
  1732. referencedClasses: []
  1733. }),
  1734. smalltalk.String);
  1735. smalltalk.addMethod(
  1736. unescape('_lines'),
  1737. smalltalk.method({
  1738. selector: unescape('lines'),
  1739. category: 'split join',
  1740. fn: function (){
  1741. var self=this;
  1742. var lines=nil;
  1743. lines=smalltalk.send((smalltalk.Array || Array), "_new", []);
  1744. smalltalk.send(self, "_linesDo_", [(function(aLine){return smalltalk.send(lines, "_add_", [aLine]);})]);
  1745. return lines;
  1746. return self;},
  1747. args: [],
  1748. source: unescape('lines%0A%09%22Answer%20an%20array%20of%20lines%20composing%20this%20receiver%20without%20the%20line%20ending%20delimiters.%22%0A%0A%09%7C%20lines%20%7C%0A%09lines%20%3A%3D%20Array%20new.%0A%09self%20linesDo%3A%20%5B%3AaLine%20%7C%20lines%20add%3A%20aLine%5D.%0A%09%5Elines'),
  1749. messageSends: ["new", "linesDo:", "add:"],
  1750. referencedClasses: ["Array"]
  1751. }),
  1752. smalltalk.String);
  1753. smalltalk.addMethod(
  1754. unescape('_lineNumber_'),
  1755. smalltalk.method({
  1756. selector: unescape('lineNumber%3A'),
  1757. category: 'split join',
  1758. fn: function (anIndex){
  1759. var self=this;
  1760. try{var lineCount=nil;
  1761. lineCount=(0);
  1762. smalltalk.send(self, "_lineIndicesDo_", [(function(start, endWithoutDelimiters, end){return ((($receiver = smalltalk.send(lineCount=((($receiver = lineCount).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])), "__eq", [anIndex])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])}})})();})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return smalltalk.send(self, "_copyFrom_to_", [start, endWithoutDelimiters])}})})();})]));})]);
  1763. (function(){throw({name: 'stReturn', selector: '_lineNumber_', fn: function(){return nil}})})();
  1764. return self;
  1765. } catch(e) {if(e.name === 'stReturn' && e.selector === '_lineNumber_'){return e.fn()} throw(e)}},
  1766. args: ["anIndex"],
  1767. source: unescape('lineNumber%3A%20anIndex%0A%09%22Answer%20a%20string%20containing%20the%20characters%20in%20the%20given%20line%20number.%22%0A%0A%09%7C%20lineCount%20%7C%0A%09lineCount%20%3A%3D%200.%0A%09self%20lineIndicesDo%3A%20%5B%3Astart%20%3AendWithoutDelimiters%20%3Aend%20%7C%0A%09%09%28lineCount%20%3A%3D%20lineCount%20+%201%29%20%3D%20anIndex%20ifTrue%3A%20%5B%5Eself%20copyFrom%3A%20start%20to%3A%20endWithoutDelimiters%5D%5D.%0A%09%5Enil'),
  1768. messageSends: ["lineIndicesDo:", "ifTrue:", unescape("%3D"), unescape("+"), "copyFrom:to:"],
  1769. referencedClasses: []
  1770. }),
  1771. smalltalk.String);
  1772. smalltalk.addMethod(
  1773. unescape('_reversed'),
  1774. smalltalk.method({
  1775. selector: unescape('reversed'),
  1776. category: 'converting',
  1777. fn: function (){
  1778. var self=this;
  1779. return self.split("").reverse().join("");
  1780. return self;},
  1781. args: [],
  1782. source: unescape('reversed%0A%09%3Creturn%20self.split%28%22%22%29.reverse%28%29.join%28%22%22%29%3E'),
  1783. messageSends: [],
  1784. referencedClasses: []
  1785. }),
  1786. smalltalk.String);
  1787. smalltalk.addMethod(
  1788. unescape('_asJavaScriptSelector'),
  1789. smalltalk.method({
  1790. selector: unescape('asJavaScriptSelector'),
  1791. category: 'converting',
  1792. fn: function (){
  1793. var self=this;
  1794. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_asSelector", []), "_replace_with_", [unescape("%5E_"), ""]), "_replace_with_", [unescape("_.*"), ""]);
  1795. return self;},
  1796. args: [],
  1797. source: unescape('asJavaScriptSelector%0A%09%5E%28self%20asSelector%20replace%3A%20%27%5E_%27%20with%3A%20%27%27%29%20replace%3A%20%27_.*%27%20with%3A%20%27%27.'),
  1798. messageSends: ["replace:with:", "asSelector"],
  1799. referencedClasses: []
  1800. }),
  1801. smalltalk.String);
  1802. smalltalk.addMethod(
  1803. unescape('_asJSONString'),
  1804. smalltalk.method({
  1805. selector: unescape('asJSONString'),
  1806. category: 'converting',
  1807. fn: function (){
  1808. var self=this;
  1809. return self;
  1810. return self;},
  1811. args: [],
  1812. source: unescape('asJSONString%0A%09%5Eself'),
  1813. messageSends: [],
  1814. referencedClasses: []
  1815. }),
  1816. smalltalk.String);
  1817. smalltalk.addMethod(
  1818. unescape('_asSymbol'),
  1819. smalltalk.method({
  1820. selector: unescape('asSymbol'),
  1821. category: 'converting',
  1822. fn: function (){
  1823. var self=this;
  1824. return smalltalk.send((smalltalk.Symbol || Symbol), "_lookup_", [self]);
  1825. return self;},
  1826. args: [],
  1827. source: unescape('asSymbol%0A%09%5ESymbol%20lookup%3A%20self'),
  1828. messageSends: ["lookup:"],
  1829. referencedClasses: ["Symbol"]
  1830. }),
  1831. smalltalk.String);
  1832. smalltalk.addMethod(
  1833. unescape('_streamClass'),
  1834. smalltalk.method({
  1835. selector: unescape('streamClass'),
  1836. category: 'accessing',
  1837. fn: function (){
  1838. var self=this;
  1839. return (smalltalk.StringStream || StringStream);
  1840. return self;},
  1841. args: [],
  1842. source: unescape('streamClass%0A%09%20%20%20%20%5EStringStream'),
  1843. messageSends: [],
  1844. referencedClasses: ["StringStream"]
  1845. }),
  1846. smalltalk.String.klass);
  1847. smalltalk.addMethod(
  1848. unescape('_fromString_'),
  1849. smalltalk.method({
  1850. selector: unescape('fromString%3A'),
  1851. category: 'instance creation',
  1852. fn: function (aString){
  1853. var self=this;
  1854. return new self.fn(aString);
  1855. return self;},
  1856. args: ["aString"],
  1857. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%3Creturn%20new%20self.fn%28aString%29%3E'),
  1858. messageSends: [],
  1859. referencedClasses: []
  1860. }),
  1861. smalltalk.String.klass);
  1862. smalltalk.addMethod(
  1863. unescape('_cr'),
  1864. smalltalk.method({
  1865. selector: unescape('cr'),
  1866. category: 'accessing',
  1867. fn: function (){
  1868. var self=this;
  1869. return '\r';
  1870. return self;},
  1871. args: [],
  1872. source: unescape('cr%0A%09%3Creturn%20%27%5Cr%27%3E'),
  1873. messageSends: [],
  1874. referencedClasses: []
  1875. }),
  1876. smalltalk.String.klass);
  1877. smalltalk.addMethod(
  1878. unescape('_lf'),
  1879. smalltalk.method({
  1880. selector: unescape('lf'),
  1881. category: 'accessing',
  1882. fn: function (){
  1883. var self=this;
  1884. return '\n';
  1885. return self;},
  1886. args: [],
  1887. source: unescape('lf%0A%09%3Creturn%20%27%5Cn%27%3E'),
  1888. messageSends: [],
  1889. referencedClasses: []
  1890. }),
  1891. smalltalk.String.klass);
  1892. smalltalk.addMethod(
  1893. unescape('_space'),
  1894. smalltalk.method({
  1895. selector: unescape('space'),
  1896. category: 'accessing',
  1897. fn: function (){
  1898. var self=this;
  1899. return ' ';
  1900. return self;},
  1901. args: [],
  1902. source: unescape('space%0A%09%3Creturn%20%27%20%27%3E'),
  1903. messageSends: [],
  1904. referencedClasses: []
  1905. }),
  1906. smalltalk.String.klass);
  1907. smalltalk.addMethod(
  1908. unescape('_tab'),
  1909. smalltalk.method({
  1910. selector: unescape('tab'),
  1911. category: 'accessing',
  1912. fn: function (){
  1913. var self=this;
  1914. return '\t';
  1915. return self;},
  1916. args: [],
  1917. source: unescape('tab%0A%09%3Creturn%20%27%5Ct%27%3E'),
  1918. messageSends: [],
  1919. referencedClasses: []
  1920. }),
  1921. smalltalk.String.klass);
  1922. smalltalk.addMethod(
  1923. unescape('_crlf'),
  1924. smalltalk.method({
  1925. selector: unescape('crlf'),
  1926. category: 'accessing',
  1927. fn: function (){
  1928. var self=this;
  1929. return '\r\n';
  1930. return self;},
  1931. args: [],
  1932. source: unescape('crlf%0A%09%3Creturn%20%27%5Cr%5Cn%27%3E'),
  1933. messageSends: [],
  1934. referencedClasses: []
  1935. }),
  1936. smalltalk.String.klass);
  1937. smalltalk.addMethod(
  1938. unescape('_streamContents_'),
  1939. smalltalk.method({
  1940. selector: unescape('streamContents%3A'),
  1941. category: 'instance creation',
  1942. fn: function (blockWithArg){
  1943. var self=this;
  1944. var stream=nil;
  1945. stream=smalltalk.send(smalltalk.send(self, "_streamClass", []), "_on_", [smalltalk.send((smalltalk.String || String), "_new", [])]);
  1946. smalltalk.send(blockWithArg, "_value_", [stream]);
  1947. return smalltalk.send(stream, "_contents", []);
  1948. return self;},
  1949. args: ["blockWithArg"],
  1950. source: unescape('streamContents%3A%20blockWithArg%0A%09%7Cstream%7C%0A%09stream%20%3A%3D%20%28self%20streamClass%20on%3A%20String%20new%29.%0A%09blockWithArg%20value%3A%20stream.%0A%09%5E%20stream%20contents'),
  1951. messageSends: ["on:", "streamClass", "new", "value:", "contents"],
  1952. referencedClasses: ["String"]
  1953. }),
  1954. smalltalk.String.klass);
  1955. smalltalk.addMethod(
  1956. unescape('_value_'),
  1957. smalltalk.method({
  1958. selector: unescape('value%3A'),
  1959. category: 'instance creation',
  1960. fn: function (aUTFCharCode){
  1961. var self=this;
  1962. return String.fromCharCode(aUTFCharCode);;
  1963. return self;},
  1964. args: ["aUTFCharCode"],
  1965. source: unescape('value%3A%20aUTFCharCode%0A%0A%09%3Creturn%20String.fromCharCode%28aUTFCharCode%29%3B%3E'),
  1966. messageSends: [],
  1967. referencedClasses: []
  1968. }),
  1969. smalltalk.String.klass);
  1970. smalltalk.addClass('Symbol', smalltalk.CharacterArray, [], 'Kernel-Collections');
  1971. smalltalk.addMethod(
  1972. unescape('_at_ifAbsent_'),
  1973. smalltalk.method({
  1974. selector: unescape('at%3AifAbsent%3A'),
  1975. category: 'accessing',
  1976. fn: function (anIndex, aBlock){
  1977. var self=this;
  1978. return smalltalk.send(smalltalk.send(self, "_asString", []), "_at_ifAbsent_", [anIndex, aBlock]);
  1979. return self;},
  1980. args: ["anIndex", "aBlock"],
  1981. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09%5Eself%20asString%20at%3A%20anIndex%20ifAbsent%3A%20aBlock'),
  1982. messageSends: ["at:ifAbsent:", "asString"],
  1983. referencedClasses: []
  1984. }),
  1985. smalltalk.Symbol);
  1986. smalltalk.addMethod(
  1987. unescape('_asString'),
  1988. smalltalk.method({
  1989. selector: unescape('asString'),
  1990. category: 'converting',
  1991. fn: function (){
  1992. var self=this;
  1993. return self.value;
  1994. return self;},
  1995. args: [],
  1996. source: unescape('asString%0A%09%3Creturn%20self.value%3E'),
  1997. messageSends: [],
  1998. referencedClasses: []
  1999. }),
  2000. smalltalk.Symbol);
  2001. smalltalk.addMethod(
  2002. unescape('_printString'),
  2003. smalltalk.method({
  2004. selector: unescape('printString'),
  2005. category: 'printing',
  2006. fn: function (){
  2007. var self=this;
  2008. return smalltalk.send(unescape("%23"), "__comma", [smalltalk.send(self, "_asString", [])]);
  2009. return self;},
  2010. args: [],
  2011. source: unescape('printString%0A%09%5E%27%23%27%2C%20self%20asString'),
  2012. messageSends: [unescape("%2C"), "asString"],
  2013. referencedClasses: []
  2014. }),
  2015. smalltalk.Symbol);
  2016. smalltalk.addMethod(
  2017. unescape('_size'),
  2018. smalltalk.method({
  2019. selector: unescape('size'),
  2020. category: 'accessing',
  2021. fn: function (){
  2022. var self=this;
  2023. return smalltalk.send(smalltalk.send(self, "_asString", []), "_size", []);
  2024. return self;},
  2025. args: [],
  2026. source: unescape('size%0A%09%5Eself%20asString%20size'),
  2027. messageSends: ["size", "asString"],
  2028. referencedClasses: []
  2029. }),
  2030. smalltalk.Symbol);
  2031. smalltalk.addMethod(
  2032. unescape('_asSymbol'),
  2033. smalltalk.method({
  2034. selector: unescape('asSymbol'),
  2035. category: 'converting',
  2036. fn: function (){
  2037. var self=this;
  2038. return self;
  2039. return self;},
  2040. args: [],
  2041. source: unescape('asSymbol%0A%09%5Eself'),
  2042. messageSends: [],
  2043. referencedClasses: []
  2044. }),
  2045. smalltalk.Symbol);
  2046. smalltalk.addMethod(
  2047. unescape('_copyFrom_to_'),
  2048. smalltalk.method({
  2049. selector: unescape('copyFrom%3Ato%3A'),
  2050. category: 'copying',
  2051. fn: function (anIndex, anotherIndex){
  2052. var self=this;
  2053. return smalltalk.send(smalltalk.send(self, "_class", []), "_fromString_", [smalltalk.send(smalltalk.send(self, "_asString", []), "_copyFrom_to_", [anIndex, anotherIndex])]);
  2054. return self;},
  2055. args: ["anIndex", "anotherIndex"],
  2056. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09%5Eself%20class%20fromString%3A%20%28self%20asString%20copyFrom%3A%20anIndex%20to%3A%20anotherIndex%29'),
  2057. messageSends: ["fromString:", "class", "copyFrom:to:", "asString"],
  2058. referencedClasses: []
  2059. }),
  2060. smalltalk.Symbol);
  2061. smalltalk.addMethod(
  2062. unescape('_deepCopy'),
  2063. smalltalk.method({
  2064. selector: unescape('deepCopy'),
  2065. category: 'copying',
  2066. fn: function (){
  2067. var self=this;
  2068. return self;
  2069. return self;},
  2070. args: [],
  2071. source: unescape('deepCopy%0A%09%5Eself'),
  2072. messageSends: [],
  2073. referencedClasses: []
  2074. }),
  2075. smalltalk.Symbol);
  2076. smalltalk.addMethod(
  2077. unescape('__lt'),
  2078. smalltalk.method({
  2079. selector: unescape('%3C'),
  2080. category: 'comparing',
  2081. fn: function (aSymbol){
  2082. var self=this;
  2083. return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver <smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__lt", [smalltalk.send(aSymbol, "_asString", [])]));
  2084. return self;},
  2085. args: ["aSymbol"],
  2086. source: unescape('%3C%20aSymbol%0A%09%5Eself%20asString%20%3C%20aSymbol%20asString'),
  2087. messageSends: [unescape("%3C"), "asString"],
  2088. referencedClasses: []
  2089. }),
  2090. smalltalk.Symbol);
  2091. smalltalk.addMethod(
  2092. unescape('__lt_eq'),
  2093. smalltalk.method({
  2094. selector: unescape('%3C%3D'),
  2095. category: 'comparing',
  2096. fn: function (aSymbol){
  2097. var self=this;
  2098. return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(aSymbol, "_asString", [])]));
  2099. return self;},
  2100. args: ["aSymbol"],
  2101. source: unescape('%3C%3D%20aSymbol%0A%09%5Eself%20asString%20%3C%3D%20aSymbol%20asString'),
  2102. messageSends: [unescape("%3C%3D"), "asString"],
  2103. referencedClasses: []
  2104. }),
  2105. smalltalk.Symbol);
  2106. smalltalk.addMethod(
  2107. unescape('__gt_eq'),
  2108. smalltalk.method({
  2109. selector: unescape('%3E%3D'),
  2110. category: 'comparing',
  2111. fn: function (aSymbol){
  2112. var self=this;
  2113. return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver >=smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__gt_eq", [smalltalk.send(aSymbol, "_asString", [])]));
  2114. return self;},
  2115. args: ["aSymbol"],
  2116. source: unescape('%3E%3D%20aSymbol%0A%09%5Eself%20asString%20%3E%3D%20aSymbol%20asString'),
  2117. messageSends: [unescape("%3E%3D"), "asString"],
  2118. referencedClasses: []
  2119. }),
  2120. smalltalk.Symbol);
  2121. smalltalk.addMethod(
  2122. unescape('__eq'),
  2123. smalltalk.method({
  2124. selector: unescape('%3D'),
  2125. category: 'comparing',
  2126. fn: function (aSymbol){
  2127. var self=this;
  2128. try{((($receiver = smalltalk.send(smalltalk.send(aSymbol, "_class", []), "__eq", [smalltalk.send(self, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  2129. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return smalltalk.send(smalltalk.send(self, "_asString", []), "__eq", [smalltalk.send(aSymbol, "_asString", [])])}})})();
  2130. return self;
  2131. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  2132. args: ["aSymbol"],
  2133. source: unescape('%3D%20aSymbol%0A%09aSymbol%20class%20%3D%20self%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%5Eself%20asString%20%3D%20aSymbol%20asString'),
  2134. messageSends: ["ifFalse:", unescape("%3D"), "class", "asString"],
  2135. referencedClasses: []
  2136. }),
  2137. smalltalk.Symbol);
  2138. smalltalk.addMethod(
  2139. unescape('_isSymbol'),
  2140. smalltalk.method({
  2141. selector: unescape('isSymbol'),
  2142. category: 'printing',
  2143. fn: function (){
  2144. var self=this;
  2145. return true;
  2146. return self;},
  2147. args: [],
  2148. source: unescape('isSymbol%0A%09%5Etrue'),
  2149. messageSends: [],
  2150. referencedClasses: []
  2151. }),
  2152. smalltalk.Symbol);
  2153. smalltalk.addMethod(
  2154. unescape('_asJavascript'),
  2155. smalltalk.method({
  2156. selector: unescape('asJavascript'),
  2157. category: 'converting',
  2158. fn: function (){
  2159. var self=this;
  2160. return smalltalk.send(smalltalk.send(unescape("smalltalk.symbolFor%28%22"), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [unescape("%22%29")]);
  2161. return self;},
  2162. args: [],
  2163. source: unescape('asJavascript%0A%09%5E%27smalltalk.symbolFor%28%22%27%2C%20self%20asString%2C%20%27%22%29%27'),
  2164. messageSends: [unescape("%2C"), "asString"],
  2165. referencedClasses: []
  2166. }),
  2167. smalltalk.Symbol);
  2168. smalltalk.addMethod(
  2169. unescape('__gt'),
  2170. smalltalk.method({
  2171. selector: unescape('%3E'),
  2172. category: 'comparing',
  2173. fn: function (aSymbol){
  2174. var self=this;
  2175. return ((($receiver = smalltalk.send(self, "_asString", [])).klass === smalltalk.Number) ? $receiver >smalltalk.send(aSymbol, "_asString", []) : smalltalk.send($receiver, "__gt", [smalltalk.send(aSymbol, "_asString", [])]));
  2176. return self;},
  2177. args: ["aSymbol"],
  2178. source: unescape('%3E%20aSymbol%0A%09%5Eself%20asString%20%3E%20aSymbol%20asString'),
  2179. messageSends: [unescape("%3E"), "asString"],
  2180. referencedClasses: []
  2181. }),
  2182. smalltalk.Symbol);
  2183. smalltalk.addMethod(
  2184. unescape('_shallowCopy'),
  2185. smalltalk.method({
  2186. selector: unescape('shallowCopy'),
  2187. category: 'copying',
  2188. fn: function (){
  2189. var self=this;
  2190. return self;
  2191. return self;},
  2192. args: [],
  2193. source: unescape('shallowCopy%0A%09%5Eself'),
  2194. messageSends: [],
  2195. referencedClasses: []
  2196. }),
  2197. smalltalk.Symbol);
  2198. smalltalk.addMethod(
  2199. unescape('_asSelector'),
  2200. smalltalk.method({
  2201. selector: unescape('asSelector'),
  2202. category: 'converting',
  2203. fn: function (){
  2204. var self=this;
  2205. return smalltalk.send(smalltalk.send(self, "_asString", []), "_asSelector", []);
  2206. return self;},
  2207. args: [],
  2208. source: unescape('asSelector%0A%09%5Eself%20asString%20asSelector'),
  2209. messageSends: ["asSelector", "asString"],
  2210. referencedClasses: []
  2211. }),
  2212. smalltalk.Symbol);
  2213. smalltalk.addMethod(
  2214. unescape('_lookup_'),
  2215. smalltalk.method({
  2216. selector: unescape('lookup%3A'),
  2217. category: 'instance creation',
  2218. fn: function (aString){
  2219. var self=this;
  2220. return smalltalk.symbolFor(aString);;
  2221. return self;},
  2222. args: ["aString"],
  2223. source: unescape('lookup%3A%20aString%0A%09%3Creturn%20smalltalk.symbolFor%28aString%29%3B%3E'),
  2224. messageSends: [],
  2225. referencedClasses: []
  2226. }),
  2227. smalltalk.Symbol.klass);
  2228. smalltalk.addMethod(
  2229. unescape('_basicNew'),
  2230. smalltalk.method({
  2231. selector: unescape('basicNew'),
  2232. category: 'instance creation',
  2233. fn: function (){
  2234. var self=this;
  2235. smalltalk.send(self, "_shouldNotImplement", []);
  2236. return self;},
  2237. args: [],
  2238. source: unescape('basicNew%0A%09self%20shouldNotImplement'),
  2239. messageSends: ["shouldNotImplement"],
  2240. referencedClasses: []
  2241. }),
  2242. smalltalk.Symbol.klass);
  2243. smalltalk.addMethod(
  2244. unescape('_fromString_'),
  2245. smalltalk.method({
  2246. selector: unescape('fromString%3A'),
  2247. category: 'instance creation',
  2248. fn: function (aString){
  2249. var self=this;
  2250. return smalltalk.send(self, "_lookup_", [aString]);
  2251. return self;},
  2252. args: ["aString"],
  2253. source: unescape('fromString%3A%20aString%0A%09%5Eself%20lookup%3A%20aString'),
  2254. messageSends: ["lookup:"],
  2255. referencedClasses: []
  2256. }),
  2257. smalltalk.Symbol.klass);
  2258. smalltalk.addClass('Array', smalltalk.SequenceableCollection, [], 'Kernel-Collections');
  2259. smalltalk.addMethod(
  2260. unescape('_size'),
  2261. smalltalk.method({
  2262. selector: unescape('size'),
  2263. category: 'accessing',
  2264. fn: function (){
  2265. var self=this;
  2266. return self.length;
  2267. return self;},
  2268. args: [],
  2269. source: unescape('size%0A%09%3Creturn%20self.length%3E'),
  2270. messageSends: [],
  2271. referencedClasses: []
  2272. }),
  2273. smalltalk.Array);
  2274. smalltalk.addMethod(
  2275. unescape('_at_put_'),
  2276. smalltalk.method({
  2277. selector: unescape('at%3Aput%3A'),
  2278. category: 'accessing',
  2279. fn: function (anIndex, anObject){
  2280. var self=this;
  2281. return self[anIndex - 1] = anObject;
  2282. return self;},
  2283. args: ["anIndex", "anObject"],
  2284. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09%3Creturn%20self%5BanIndex%20-%201%5D%20%3D%20anObject%3E'),
  2285. messageSends: [],
  2286. referencedClasses: []
  2287. }),
  2288. smalltalk.Array);
  2289. smalltalk.addMethod(
  2290. unescape('_at_ifAbsent_'),
  2291. smalltalk.method({
  2292. selector: unescape('at%3AifAbsent%3A'),
  2293. category: 'accessing',
  2294. fn: function (anIndex, aBlock){
  2295. var self=this;
  2296. var value = self[anIndex - 1];
  2297. if(value === undefined) {
  2298. return aBlock();
  2299. } else {
  2300. return value;
  2301. }
  2302. ;
  2303. return self;},
  2304. args: ["anIndex", "aBlock"],
  2305. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%20%20%20%20var%20value%20%3D%20self%5BanIndex%20-%201%5D%3B%0A%09%20%20%20%20if%28value%20%3D%3D%3D%20undefined%29%20%7B%0A%09%09return%20aBlock%28%29%3B%0A%09%20%20%20%20%7D%20else%20%7B%0A%09%09return%20value%3B%0A%09%20%20%20%20%7D%0A%09%3E'),
  2306. messageSends: [],
  2307. referencedClasses: []
  2308. }),
  2309. smalltalk.Array);
  2310. smalltalk.addMethod(
  2311. unescape('_add_'),
  2312. smalltalk.method({
  2313. selector: unescape('add%3A'),
  2314. category: 'adding/removing',
  2315. fn: function (anObject){
  2316. var self=this;
  2317. self.push(anObject); return anObject;;
  2318. return self;},
  2319. args: ["anObject"],
  2320. source: unescape('add%3A%20anObject%0A%09%3Cself.push%28anObject%29%3B%20return%20anObject%3B%3E'),
  2321. messageSends: [],
  2322. referencedClasses: []
  2323. }),
  2324. smalltalk.Array);
  2325. smalltalk.addMethod(
  2326. unescape('_join_'),
  2327. smalltalk.method({
  2328. selector: unescape('join%3A'),
  2329. category: 'enumerating',
  2330. fn: function (aString){
  2331. var self=this;
  2332. return self.join(aString);
  2333. return self;},
  2334. args: ["aString"],
  2335. source: unescape('join%3A%20aString%0A%09%3Creturn%20self.join%28aString%29%3E'),
  2336. messageSends: [],
  2337. referencedClasses: []
  2338. }),
  2339. smalltalk.Array);
  2340. smalltalk.addMethod(
  2341. unescape('_asJavascript'),
  2342. smalltalk.method({
  2343. selector: unescape('asJavascript'),
  2344. category: 'converting',
  2345. fn: function (){
  2346. var self=this;
  2347. return smalltalk.send(smalltalk.send(unescape("%5B"), "__comma", [smalltalk.send(smalltalk.send(self, "_collect_", [(function(each){return smalltalk.send(each, "_asJavascript", []);})]), "_join_", [unescape("%2C%20")])]), "__comma", [unescape("%5D")]);
  2348. return self;},
  2349. args: [],
  2350. source: unescape('asJavascript%0A%09%5E%27%5B%27%2C%20%28%28self%20collect%3A%20%5B%3Aeach%20%7C%20each%20asJavascript%5D%29%20join%3A%20%27%2C%20%27%29%2C%20%20%27%5D%27'),
  2351. messageSends: [unescape("%2C"), "join:", "collect:", "asJavascript"],
  2352. referencedClasses: []
  2353. }),
  2354. smalltalk.Array);
  2355. smalltalk.addMethod(
  2356. unescape('_sort'),
  2357. smalltalk.method({
  2358. selector: unescape('sort'),
  2359. category: 'enumerating',
  2360. fn: function (){
  2361. var self=this;
  2362. return smalltalk.send(self, "_basicPerform_", ["sort"]);
  2363. return self;},
  2364. args: [],
  2365. source: unescape('sort%0A%20%20%20%20%5Eself%20basicPerform%3A%20%27sort%27'),
  2366. messageSends: ["basicPerform:"],
  2367. referencedClasses: []
  2368. }),
  2369. smalltalk.Array);
  2370. smalltalk.addMethod(
  2371. unescape('_sort_'),
  2372. smalltalk.method({
  2373. selector: unescape('sort%3A'),
  2374. category: 'enumerating',
  2375. fn: function (aBlock){
  2376. var self=this;
  2377. return self.sort(function(a, b) {
  2378. if(aBlock(a,b)) {return -1} else {return 1}
  2379. })
  2380. ;
  2381. return self;},
  2382. args: ["aBlock"],
  2383. source: unescape('sort%3A%20aBlock%0A%09%3C%0A%09%09return%20self.sort%28function%28a%2C%20b%29%20%7B%0A%09%09%09if%28aBlock%28a%2Cb%29%29%20%7Breturn%20-1%7D%20else%20%7Breturn%201%7D%0A%09%09%7D%29%0A%09%3E'),
  2384. messageSends: [],
  2385. referencedClasses: []
  2386. }),
  2387. smalltalk.Array);
  2388. smalltalk.addMethod(
  2389. unescape('_remove_'),
  2390. smalltalk.method({
  2391. selector: unescape('remove%3A'),
  2392. category: 'adding/removing',
  2393. fn: function (anObject){
  2394. var self=this;
  2395. for(var i=0;i<self.length;i++) {
  2396. if(self[i] == anObject) {
  2397. self.splice(i,1);
  2398. break;
  2399. }
  2400. }
  2401. ;
  2402. return self;},
  2403. args: ["anObject"],
  2404. source: unescape('remove%3A%20anObject%0A%09%3C%0A%09%09for%28var%20i%3D0%3Bi%3Cself.length%3Bi++%29%20%7B%0A%09%09%09if%28self%5Bi%5D%20%3D%3D%20anObject%29%20%7B%0A%09%09%09%09self.splice%28i%2C1%29%3B%0A%09%09%09%09break%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%3E'),
  2405. messageSends: [],
  2406. referencedClasses: []
  2407. }),
  2408. smalltalk.Array);
  2409. smalltalk.addMethod(
  2410. unescape('_sorted'),
  2411. smalltalk.method({
  2412. selector: unescape('sorted'),
  2413. category: 'enumerating',
  2414. fn: function (){
  2415. var self=this;
  2416. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort", []);
  2417. return self;},
  2418. args: [],
  2419. source: unescape('sorted%0A%09%5Eself%20copy%20sort'),
  2420. messageSends: ["sort", "copy"],
  2421. referencedClasses: []
  2422. }),
  2423. smalltalk.Array);
  2424. smalltalk.addMethod(
  2425. unescape('_sorted_'),
  2426. smalltalk.method({
  2427. selector: unescape('sorted%3A'),
  2428. category: 'enumerating',
  2429. fn: function (aBlock){
  2430. var self=this;
  2431. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
  2432. return self;},
  2433. args: ["aBlock"],
  2434. source: unescape('sorted%3A%20aBlock%0A%09%5Eself%20copy%20sort%3A%20aBlock'),
  2435. messageSends: ["sort:", "copy"],
  2436. referencedClasses: []
  2437. }),
  2438. smalltalk.Array);
  2439. smalltalk.addMethod(
  2440. unescape('_removeFrom_to_'),
  2441. smalltalk.method({
  2442. selector: unescape('removeFrom%3Ato%3A'),
  2443. category: 'adding/removing',
  2444. fn: function (aNumber, anotherNumber){
  2445. var self=this;
  2446. self.splice(aNumber - 1,anotherNumber - 1);
  2447. return self;},
  2448. args: ["aNumber", "anotherNumber"],
  2449. source: unescape('removeFrom%3A%20aNumber%20to%3A%20anotherNumber%0A%09%3Cself.splice%28aNumber%20-%201%2CanotherNumber%20-%201%29%3E'),
  2450. messageSends: [],
  2451. referencedClasses: []
  2452. }),
  2453. smalltalk.Array);
  2454. smalltalk.addMethod(
  2455. unescape('_reversed'),
  2456. smalltalk.method({
  2457. selector: unescape('reversed'),
  2458. category: 'converting',
  2459. fn: function (){
  2460. var self=this;
  2461. return self._copy().reverse();
  2462. return self;},
  2463. args: [],
  2464. source: unescape('reversed%0A%09%3Creturn%20self._copy%28%29.reverse%28%29%3E'),
  2465. messageSends: [],
  2466. referencedClasses: []
  2467. }),
  2468. smalltalk.Array);
  2469. smalltalk.addMethod(
  2470. unescape('_new_'),
  2471. smalltalk.method({
  2472. selector: unescape('new%3A'),
  2473. category: 'instance creation',
  2474. fn: function (anInteger){
  2475. var self=this;
  2476. return new Array(anInteger);
  2477. return self;},
  2478. args: ["anInteger"],
  2479. source: unescape('new%3A%20anInteger%0A%09%3Creturn%20new%20Array%28anInteger%29%3E%09'),
  2480. messageSends: [],
  2481. referencedClasses: []
  2482. }),
  2483. smalltalk.Array.klass);
  2484. smalltalk.addMethod(
  2485. unescape('_with_'),
  2486. smalltalk.method({
  2487. selector: unescape('with%3A'),
  2488. category: 'instance creation',
  2489. fn: function (anObject){
  2490. var self=this;
  2491. return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(1)]));
  2492. return self;},
  2493. args: ["anObject"],
  2494. source: unescape('with%3A%20anObject%0A%09%20%20%20%20%5E%28self%20new%3A%201%29%0A%09%09at%3A%201%20put%3A%20anObject%3B%0A%09%09yourself'),
  2495. messageSends: ["at:put:", "yourself", "new:"],
  2496. referencedClasses: []
  2497. }),
  2498. smalltalk.Array.klass);
  2499. smalltalk.addMethod(
  2500. unescape('_with_with_'),
  2501. smalltalk.method({
  2502. selector: unescape('with%3Awith%3A'),
  2503. category: 'instance creation',
  2504. fn: function (anObject, anObject2){
  2505. var self=this;
  2506. return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(2)]));
  2507. return self;},
  2508. args: ["anObject", "anObject2"],
  2509. source: unescape('with%3A%20anObject%20with%3A%20anObject2%0A%09%20%20%20%20%5E%28self%20new%3A%202%29%0A%09%09at%3A%201%20put%3A%20anObject%3B%0A%09%09at%3A%202%20put%3A%20anObject2%3B%0A%09%09yourself'),
  2510. messageSends: ["at:put:", "yourself", "new:"],
  2511. referencedClasses: []
  2512. }),
  2513. smalltalk.Array.klass);
  2514. smalltalk.addMethod(
  2515. unescape('_with_with_with_'),
  2516. smalltalk.method({
  2517. selector: unescape('with%3Awith%3Awith%3A'),
  2518. category: 'instance creation',
  2519. fn: function (anObject, anObject2, anObject3){
  2520. var self=this;
  2521. return (function($rec){smalltalk.send($rec, "_at_put_", [(1), anObject]);smalltalk.send($rec, "_at_put_", [(2), anObject2]);smalltalk.send($rec, "_at_put_", [(3), anObject3]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new_", [(3)]));
  2522. return self;},
  2523. args: ["anObject", "anObject2", "anObject3"],
  2524. source: unescape('with%3A%20anObject%20with%3A%20anObject2%20with%3A%20anObject3%0A%09%20%20%20%20%5E%28self%20new%3A%203%29%0A%09%09at%3A%201%20put%3A%20anObject%3B%0A%09%09at%3A%202%20put%3A%20anObject2%3B%0A%09%09at%3A%203%20put%3A%20anObject3%3B%0A%09%09yourself'),
  2525. messageSends: ["at:put:", "yourself", "new:"],
  2526. referencedClasses: []
  2527. }),
  2528. smalltalk.Array.klass);
  2529. smalltalk.addMethod(
  2530. unescape('_withAll_'),
  2531. smalltalk.method({
  2532. selector: unescape('withAll%3A'),
  2533. category: 'instance creation',
  2534. fn: function (aCollection){
  2535. var self=this;
  2536. var instance=nil;
  2537. instance=smalltalk.send(self, "_new_", [smalltalk.send(aCollection, "_size", [])]);
  2538. smalltalk.send(aCollection, "_withIndexDo_", [(function(index, each){return smalltalk.send(instance, "_at_put_", [index, each]);})]);
  2539. return instance;
  2540. return self;},
  2541. args: ["aCollection"],
  2542. source: unescape('withAll%3A%20aCollection%0A%09%7C%20instance%20%7C%0A%09instance%20%3A%3D%20self%20new%3A%20aCollection%20size.%0A%09aCollection%20withIndexDo%3A%20%5B%3Aindex%20%3Aeach%20%7C%0A%09%09instance%20at%3A%20index%20put%3A%20each%5D.%0A%09%5Einstance'),
  2543. messageSends: ["new:", "size", "withIndexDo:", "at:put:"],
  2544. referencedClasses: []
  2545. }),
  2546. smalltalk.Array.klass);
  2547. smalltalk.addClass('RegularExpression', smalltalk.Object, [], 'Kernel-Collections');
  2548. smalltalk.addMethod(
  2549. unescape('_compile_'),
  2550. smalltalk.method({
  2551. selector: unescape('compile%3A'),
  2552. category: 'evaluating',
  2553. fn: function (aString){
  2554. var self=this;
  2555. return self.compile(aString);
  2556. return self;},
  2557. args: ["aString"],
  2558. source: unescape('compile%3A%20aString%0A%09%3Creturn%20self.compile%28aString%29%3E'),
  2559. messageSends: [],
  2560. referencedClasses: []
  2561. }),
  2562. smalltalk.RegularExpression);
  2563. smalltalk.addMethod(
  2564. unescape('_exec_'),
  2565. smalltalk.method({
  2566. selector: unescape('exec%3A'),
  2567. category: 'evaluating',
  2568. fn: function (aString){
  2569. var self=this;
  2570. return self.exec(aString) || nil;
  2571. return self;},
  2572. args: ["aString"],
  2573. source: unescape('exec%3A%20aString%0A%09%3Creturn%20self.exec%28aString%29%20%7C%7C%20nil%3E'),
  2574. messageSends: [],
  2575. referencedClasses: []
  2576. }),
  2577. smalltalk.RegularExpression);
  2578. smalltalk.addMethod(
  2579. unescape('_test_'),
  2580. smalltalk.method({
  2581. selector: unescape('test%3A'),
  2582. category: 'evaluating',
  2583. fn: function (aString){
  2584. var self=this;
  2585. return self.test(aString);
  2586. return self;},
  2587. args: ["aString"],
  2588. source: unescape('test%3A%20aString%0A%09%3Creturn%20self.test%28aString%29%3E'),
  2589. messageSends: [],
  2590. referencedClasses: []
  2591. }),
  2592. smalltalk.RegularExpression);
  2593. smalltalk.addMethod(
  2594. unescape('_fromString_flag_'),
  2595. smalltalk.method({
  2596. selector: unescape('fromString%3Aflag%3A'),
  2597. category: 'instance creation',
  2598. fn: function (aString, anotherString){
  2599. var self=this;
  2600. return new RegExp(aString, anotherString);
  2601. return self;},
  2602. args: ["aString", "anotherString"],
  2603. source: unescape('fromString%3A%20aString%20flag%3A%20anotherString%0A%09%3Creturn%20new%20RegExp%28aString%2C%20anotherString%29%3E'),
  2604. messageSends: [],
  2605. referencedClasses: []
  2606. }),
  2607. smalltalk.RegularExpression.klass);
  2608. smalltalk.addMethod(
  2609. unescape('_fromString_'),
  2610. smalltalk.method({
  2611. selector: unescape('fromString%3A'),
  2612. category: 'instance creation',
  2613. fn: function (aString){
  2614. var self=this;
  2615. return smalltalk.send(self, "_fromString_flag_", [aString, ""]);
  2616. return self;},
  2617. args: ["aString"],
  2618. source: unescape('fromString%3A%20aString%0A%09%20%20%20%20%5Eself%20fromString%3A%20aString%20flag%3A%20%27%27'),
  2619. messageSends: ["fromString:flag:"],
  2620. referencedClasses: []
  2621. }),
  2622. smalltalk.RegularExpression.klass);
  2623. smalltalk.addClass('Association', smalltalk.Object, ['key', 'value'], 'Kernel-Collections');
  2624. smalltalk.addMethod(
  2625. unescape('__eq'),
  2626. smalltalk.method({
  2627. selector: unescape('%3D'),
  2628. category: 'comparing',
  2629. fn: function (anAssociation){
  2630. var self=this;
  2631. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(anAssociation, "_class", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_key", []), "__eq", [smalltalk.send(anAssociation, "_key", [])]), "_and_", [(function(){return smalltalk.send(smalltalk.send(self, "_value", []), "__eq", [smalltalk.send(anAssociation, "_value", [])]);})]);})]);
  2632. return self;},
  2633. args: ["anAssociation"],
  2634. source: unescape('%3D%20anAssociation%0A%09%5Eself%20class%20%3D%20anAssociation%20class%20and%3A%20%5B%0A%09%20%20%20%20self%20key%20%3D%20anAssociation%20key%20and%3A%20%5B%0A%09%09self%20value%20%3D%20anAssociation%20value%5D%5D'),
  2635. messageSends: ["and:", unescape("%3D"), "class", "key", "value"],
  2636. referencedClasses: []
  2637. }),
  2638. smalltalk.Association);
  2639. smalltalk.addMethod(
  2640. unescape('_key_'),
  2641. smalltalk.method({
  2642. selector: unescape('key%3A'),
  2643. category: 'accessing',
  2644. fn: function (aKey){
  2645. var self=this;
  2646. self['@key']=aKey;
  2647. return self;},
  2648. args: ["aKey"],
  2649. source: unescape('key%3A%20aKey%0A%09key%20%3A%3D%20aKey'),
  2650. messageSends: [],
  2651. referencedClasses: []
  2652. }),
  2653. smalltalk.Association);
  2654. smalltalk.addMethod(
  2655. unescape('_key'),
  2656. smalltalk.method({
  2657. selector: unescape('key'),
  2658. category: 'accessing',
  2659. fn: function (){
  2660. var self=this;
  2661. return self['@key'];
  2662. return self;},
  2663. args: [],
  2664. source: unescape('key%0A%09%5Ekey'),
  2665. messageSends: [],
  2666. referencedClasses: []
  2667. }),
  2668. smalltalk.Association);
  2669. smalltalk.addMethod(
  2670. unescape('_value_'),
  2671. smalltalk.method({
  2672. selector: unescape('value%3A'),
  2673. category: 'accessing',
  2674. fn: function (aValue){
  2675. var self=this;
  2676. self['@value']=aValue;
  2677. return self;},
  2678. args: ["aValue"],
  2679. source: unescape('value%3A%20aValue%0A%09value%20%3A%3D%20aValue'),
  2680. messageSends: [],
  2681. referencedClasses: []
  2682. }),
  2683. smalltalk.Association);
  2684. smalltalk.addMethod(
  2685. unescape('_value'),
  2686. smalltalk.method({
  2687. selector: unescape('value'),
  2688. category: 'accessing',
  2689. fn: function (){
  2690. var self=this;
  2691. return self['@value'];
  2692. return self;},
  2693. args: [],
  2694. source: unescape('value%0A%09%5Evalue'),
  2695. messageSends: [],
  2696. referencedClasses: []
  2697. }),
  2698. smalltalk.Association);
  2699. smalltalk.addMethod(
  2700. unescape('_storeOn_'),
  2701. smalltalk.method({
  2702. selector: unescape('storeOn%3A'),
  2703. category: 'comparing',
  2704. fn: function (aStream){
  2705. var self=this;
  2706. smalltalk.send(self['@key'], "_storeOn_", [aStream]);
  2707. smalltalk.send(aStream, "_nextPutAll_", [unescape("-%3E")]);
  2708. smalltalk.send(self['@value'], "_storeOn_", [aStream]);
  2709. return self;},
  2710. args: ["aStream"],
  2711. source: unescape('storeOn%3A%20aStream%0A%09%22Store%20in%20the%20format%20%28key-%3Evalue%29%22%0A%0A%09%22aStream%20nextPutAll%3A%20%27%28%27.%22%0A%09key%20storeOn%3A%20aStream.%0A%09aStream%20nextPutAll%3A%20%27-%3E%27.%0A%09value%20storeOn%3A%20aStream.%0A%09%22aStream%20nextPutAll%3A%20%27%29%27%22'),
  2712. messageSends: ["storeOn:", "nextPutAll:"],
  2713. referencedClasses: []
  2714. }),
  2715. smalltalk.Association);
  2716. smalltalk.addMethod(
  2717. unescape('_key_value_'),
  2718. smalltalk.method({
  2719. selector: unescape('key%3Avalue%3A'),
  2720. category: 'instance creation',
  2721. fn: function (aKey, aValue){
  2722. var self=this;
  2723. return (function($rec){smalltalk.send($rec, "_key_", [aKey]);smalltalk.send($rec, "_value_", [aValue]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  2724. return self;},
  2725. args: ["aKey", "aValue"],
  2726. source: unescape('key%3A%20aKey%20value%3A%20aValue%0A%09%20%20%20%20%5Eself%20new%0A%09%09key%3A%20aKey%3B%0A%09%09value%3A%20aValue%3B%0A%09%09yourself'),
  2727. messageSends: ["key:", "value:", "yourself", "new"],
  2728. referencedClasses: []
  2729. }),
  2730. smalltalk.Association.klass);
  2731. smalltalk.addClass('Stream', smalltalk.Object, ['collection', 'position', 'streamSize'], 'Kernel-Collections');
  2732. smalltalk.addMethod(
  2733. unescape('_collection'),
  2734. smalltalk.method({
  2735. selector: unescape('collection'),
  2736. category: 'accessing',
  2737. fn: function (){
  2738. var self=this;
  2739. return self['@collection'];
  2740. return self;},
  2741. args: [],
  2742. source: unescape('collection%0A%09%5Ecollection'),
  2743. messageSends: [],
  2744. referencedClasses: []
  2745. }),
  2746. smalltalk.Stream);
  2747. smalltalk.addMethod(
  2748. unescape('_setCollection_'),
  2749. smalltalk.method({
  2750. selector: unescape('setCollection%3A'),
  2751. category: 'accessing',
  2752. fn: function (aCollection){
  2753. var self=this;
  2754. self['@collection']=aCollection;
  2755. return self;},
  2756. args: ["aCollection"],
  2757. source: unescape('setCollection%3A%20aCollection%0A%09collection%20%3A%3D%20aCollection'),
  2758. messageSends: [],
  2759. referencedClasses: []
  2760. }),
  2761. smalltalk.Stream);
  2762. smalltalk.addMethod(
  2763. unescape('_position'),
  2764. smalltalk.method({
  2765. selector: unescape('position'),
  2766. category: 'accessing',
  2767. fn: function (){
  2768. var self=this;
  2769. return (($receiver = self['@position']) == nil || $receiver == undefined) ? (function(){return self['@position']=(0);})() : $receiver;
  2770. return self;},
  2771. args: [],
  2772. source: unescape('position%0A%09%5Eposition%20ifNil%3A%20%5Bposition%20%3A%3D%200%5D'),
  2773. messageSends: ["ifNil:"],
  2774. referencedClasses: []
  2775. }),
  2776. smalltalk.Stream);
  2777. smalltalk.addMethod(
  2778. unescape('_position_'),
  2779. smalltalk.method({
  2780. selector: unescape('position%3A'),
  2781. category: 'accessing',
  2782. fn: function (anInteger){
  2783. var self=this;
  2784. self['@position']=anInteger;
  2785. return self;},
  2786. args: ["anInteger"],
  2787. source: unescape('position%3A%20anInteger%0A%09position%20%3A%3D%20anInteger'),
  2788. messageSends: [],
  2789. referencedClasses: []
  2790. }),
  2791. smalltalk.Stream);
  2792. smalltalk.addMethod(
  2793. unescape('_streamSize'),
  2794. smalltalk.method({
  2795. selector: unescape('streamSize'),
  2796. category: 'accessing',
  2797. fn: function (){
  2798. var self=this;
  2799. return self['@streamSize'];
  2800. return self;},
  2801. args: [],
  2802. source: unescape('streamSize%0A%09%5EstreamSize'),
  2803. messageSends: [],
  2804. referencedClasses: []
  2805. }),
  2806. smalltalk.Stream);
  2807. smalltalk.addMethod(
  2808. unescape('_setStreamSize_'),
  2809. smalltalk.method({
  2810. selector: unescape('setStreamSize%3A'),
  2811. category: 'accessing',
  2812. fn: function (anInteger){
  2813. var self=this;
  2814. self['@streamSize']=anInteger;
  2815. return self;},
  2816. args: ["anInteger"],
  2817. source: unescape('setStreamSize%3A%20anInteger%0A%09streamSize%20%3A%3D%20anInteger'),
  2818. messageSends: [],
  2819. referencedClasses: []
  2820. }),
  2821. smalltalk.Stream);
  2822. smalltalk.addMethod(
  2823. unescape('_contents'),
  2824. smalltalk.method({
  2825. selector: unescape('contents'),
  2826. category: 'accessing',
  2827. fn: function (){
  2828. var self=this;
  2829. return smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_streamSize", [])]);
  2830. return self;},
  2831. args: [],
  2832. source: unescape('contents%0A%09%5Eself%20collection%0A%09%20%20%20%20copyFrom%3A%201%20%0A%09%20%20%20%20to%3A%20self%20streamSize'),
  2833. messageSends: ["copyFrom:to:", "collection", "streamSize"],
  2834. referencedClasses: []
  2835. }),
  2836. smalltalk.Stream);
  2837. smalltalk.addMethod(
  2838. unescape('_size'),
  2839. smalltalk.method({
  2840. selector: unescape('size'),
  2841. category: 'accessing',
  2842. fn: function (){
  2843. var self=this;
  2844. return smalltalk.send(self, "_streamSize", []);
  2845. return self;},
  2846. args: [],
  2847. source: unescape('size%0A%09%5Eself%20streamSize'),
  2848. messageSends: ["streamSize"],
  2849. referencedClasses: []
  2850. }),
  2851. smalltalk.Stream);
  2852. smalltalk.addMethod(
  2853. unescape('_reset'),
  2854. smalltalk.method({
  2855. selector: unescape('reset'),
  2856. category: 'actions',
  2857. fn: function (){
  2858. var self=this;
  2859. smalltalk.send(self, "_position_", [(0)]);
  2860. return self;},
  2861. args: [],
  2862. source: unescape('reset%0A%09self%20position%3A%200'),
  2863. messageSends: ["position:"],
  2864. referencedClasses: []
  2865. }),
  2866. smalltalk.Stream);
  2867. smalltalk.addMethod(
  2868. unescape('_close'),
  2869. smalltalk.method({
  2870. selector: unescape('close'),
  2871. category: 'actions',
  2872. fn: function (){
  2873. var self=this;
  2874. return self;},
  2875. args: [],
  2876. source: unescape('close'),
  2877. messageSends: [],
  2878. referencedClasses: []
  2879. }),
  2880. smalltalk.Stream);
  2881. smalltalk.addMethod(
  2882. unescape('_flush'),
  2883. smalltalk.method({
  2884. selector: unescape('flush'),
  2885. category: 'actions',
  2886. fn: function (){
  2887. var self=this;
  2888. return self;},
  2889. args: [],
  2890. source: unescape('flush'),
  2891. messageSends: [],
  2892. referencedClasses: []
  2893. }),
  2894. smalltalk.Stream);
  2895. smalltalk.addMethod(
  2896. unescape('_resetContents'),
  2897. smalltalk.method({
  2898. selector: unescape('resetContents'),
  2899. category: 'actions',
  2900. fn: function (){
  2901. var self=this;
  2902. smalltalk.send(self, "_reset", []);
  2903. smalltalk.send(self, "_setStreamSize_", [(0)]);
  2904. return self;},
  2905. args: [],
  2906. source: unescape('resetContents%0A%09self%20reset.%0A%09self%20setStreamSize%3A%200'),
  2907. messageSends: ["reset", "setStreamSize:"],
  2908. referencedClasses: []
  2909. }),
  2910. smalltalk.Stream);
  2911. smalltalk.addMethod(
  2912. unescape('_do_'),
  2913. smalltalk.method({
  2914. selector: unescape('do%3A'),
  2915. category: 'enumerating',
  2916. fn: function (aBlock){
  2917. var self=this;
  2918. (function(){while(!(function(){return smalltalk.send(self, "_atEnd", []);})()) {(function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_next", [])]);})()}})();
  2919. return self;},
  2920. args: ["aBlock"],
  2921. source: unescape('do%3A%20aBlock%0A%09%5Bself%20atEnd%5D%20whileFalse%3A%20%5BaBlock%20value%3A%20self%20next%5D'),
  2922. messageSends: ["whileFalse:", "atEnd", "value:", "next"],
  2923. referencedClasses: []
  2924. }),
  2925. smalltalk.Stream);
  2926. smalltalk.addMethod(
  2927. unescape('_setToEnd'),
  2928. smalltalk.method({
  2929. selector: unescape('setToEnd'),
  2930. category: 'positioning',
  2931. fn: function (){
  2932. var self=this;
  2933. smalltalk.send(self, "_position_", [smalltalk.send(self, "_size", [])]);
  2934. return self;},
  2935. args: [],
  2936. source: unescape('setToEnd%0A%09self%20position%3A%20self%20size'),
  2937. messageSends: ["position:", "size"],
  2938. referencedClasses: []
  2939. }),
  2940. smalltalk.Stream);
  2941. smalltalk.addMethod(
  2942. unescape('_skip_'),
  2943. smalltalk.method({
  2944. selector: unescape('skip%3A'),
  2945. category: 'positioning',
  2946. fn: function (anInteger){
  2947. var self=this;
  2948. smalltalk.send(self, "_position_", [smalltalk.send(((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +anInteger : smalltalk.send($receiver, "__plus", [anInteger])), "_min_max_", [smalltalk.send(self, "_size", []), (0)])]);
  2949. return self;},
  2950. args: ["anInteger"],
  2951. source: unescape('skip%3A%20anInteger%0A%09self%20position%3A%20%28%28self%20position%20+%20anInteger%29%20min%3A%20self%20size%20max%3A%200%29'),
  2952. messageSends: ["position:", "min:max:", unescape("+"), "position", "size"],
  2953. referencedClasses: []
  2954. }),
  2955. smalltalk.Stream);
  2956. smalltalk.addMethod(
  2957. unescape('_next'),
  2958. smalltalk.method({
  2959. selector: unescape('next'),
  2960. category: 'reading',
  2961. fn: function (){
  2962. var self=this;
  2963. return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return nil;})() : (function(){smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return nil;}), (function(){smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);return smalltalk.send(self['@collection'], "_at_", [smalltalk.send(self, "_position", [])]);})]));
  2964. return self;},
  2965. args: [],
  2966. source: unescape('next%0A%09%5Eself%20atEnd%20%0A%09%09ifTrue%3A%20%5Bnil%5D%0A%09%09ifFalse%3A%20%5B%0A%09%09%09self%20position%3A%20self%20position%20+%201.%20%0A%09%09%09collection%20at%3A%20self%20position%5D'),
  2967. messageSends: ["ifTrue:ifFalse:", "atEnd", "position:", unescape("+"), "position", "at:"],
  2968. referencedClasses: []
  2969. }),
  2970. smalltalk.Stream);
  2971. smalltalk.addMethod(
  2972. unescape('_next_'),
  2973. smalltalk.method({
  2974. selector: unescape('next%3A'),
  2975. category: 'reading',
  2976. fn: function (anInteger){
  2977. var self=this;
  2978. var tempCollection=nil;
  2979. tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []);
  2980. smalltalk.send(anInteger, "_timesRepeat_", [(function(){return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(tempCollection, "_add_", [smalltalk.send(self, "_next", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(tempCollection, "_add_", [smalltalk.send(self, "_next", [])]);})]));})]);
  2981. return tempCollection;
  2982. return self;},
  2983. args: ["anInteger"],
  2984. source: unescape('next%3A%20anInteger%0A%09%7C%20tempCollection%20%7C%0A%09tempCollection%20%3A%3D%20self%20collection%20class%20new.%0A%09anInteger%20timesRepeat%3A%20%5B%0A%09%20%20%20%20self%20atEnd%20ifFalse%3A%20%5B%0A%09%09tempCollection%20add%3A%20self%20next%5D%5D.%0A%09%5EtempCollection'),
  2985. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", "add:", "next"],
  2986. referencedClasses: []
  2987. }),
  2988. smalltalk.Stream);
  2989. smalltalk.addMethod(
  2990. unescape('_nextPut_'),
  2991. smalltalk.method({
  2992. selector: unescape('nextPut%3A'),
  2993. category: 'writing',
  2994. fn: function (anObject){
  2995. var self=this;
  2996. smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);
  2997. smalltalk.send(smalltalk.send(self, "_collection", []), "_at_put_", [smalltalk.send(self, "_position", []), anObject]);
  2998. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  2999. return self;},
  3000. args: ["anObject"],
  3001. source: unescape('nextPut%3A%20anObject%0A%09self%20position%3A%20self%20position%20+%201.%0A%09self%20collection%20at%3A%20self%20position%20put%3A%20anObject.%0A%09self%20setStreamSize%3A%20%28self%20streamSize%20max%3A%20self%20position%29'),
  3002. messageSends: ["position:", unescape("+"), "position", "at:put:", "collection", "setStreamSize:", "max:", "streamSize"],
  3003. referencedClasses: []
  3004. }),
  3005. smalltalk.Stream);
  3006. smalltalk.addMethod(
  3007. unescape('_nextPutAll_'),
  3008. smalltalk.method({
  3009. selector: unescape('nextPutAll%3A'),
  3010. category: 'writing',
  3011. fn: function (aCollection){
  3012. var self=this;
  3013. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(self, "_nextPut_", [each]);})]);
  3014. return self;},
  3015. args: ["aCollection"],
  3016. source: unescape('nextPutAll%3A%20aCollection%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20self%20nextPut%3A%20each%5D'),
  3017. messageSends: ["do:", "nextPut:"],
  3018. referencedClasses: []
  3019. }),
  3020. smalltalk.Stream);
  3021. smalltalk.addMethod(
  3022. unescape('_peek'),
  3023. smalltalk.method({
  3024. selector: unescape('peek'),
  3025. category: 'reading',
  3026. fn: function (){
  3027. var self=this;
  3028. return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_collection", []), "_at_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))]);})]));
  3029. return self;},
  3030. args: [],
  3031. source: unescape('peek%0A%09%5Eself%20atEnd%20ifFalse%3A%20%5B%0A%09%20%20%20%20self%20collection%20at%3A%20self%20position%20+%201%5D'),
  3032. messageSends: ["ifFalse:", "atEnd", "at:", "collection", unescape("+"), "position"],
  3033. referencedClasses: []
  3034. }),
  3035. smalltalk.Stream);
  3036. smalltalk.addMethod(
  3037. unescape('_atEnd'),
  3038. smalltalk.method({
  3039. selector: unescape('atEnd'),
  3040. category: 'testing',
  3041. fn: function (){
  3042. var self=this;
  3043. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [smalltalk.send(self, "_size", [])]);
  3044. return self;},
  3045. args: [],
  3046. source: unescape('atEnd%0A%09%5Eself%20position%20%3D%20self%20size'),
  3047. messageSends: [unescape("%3D"), "position", "size"],
  3048. referencedClasses: []
  3049. }),
  3050. smalltalk.Stream);
  3051. smalltalk.addMethod(
  3052. unescape('_atStart'),
  3053. smalltalk.method({
  3054. selector: unescape('atStart'),
  3055. category: 'testing',
  3056. fn: function (){
  3057. var self=this;
  3058. return smalltalk.send(smalltalk.send(self, "_position", []), "__eq", [(0)]);
  3059. return self;},
  3060. args: [],
  3061. source: unescape('atStart%0A%09%5Eself%20position%20%3D%200'),
  3062. messageSends: [unescape("%3D"), "position"],
  3063. referencedClasses: []
  3064. }),
  3065. smalltalk.Stream);
  3066. smalltalk.addMethod(
  3067. unescape('_isEmpty'),
  3068. smalltalk.method({
  3069. selector: unescape('isEmpty'),
  3070. category: 'testing',
  3071. fn: function (){
  3072. var self=this;
  3073. return smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [(0)]);
  3074. return self;},
  3075. args: [],
  3076. source: unescape('isEmpty%0A%09%5Eself%20size%20%3D%200'),
  3077. messageSends: [unescape("%3D"), "size"],
  3078. referencedClasses: []
  3079. }),
  3080. smalltalk.Stream);
  3081. smalltalk.addMethod(
  3082. unescape('_on_'),
  3083. smalltalk.method({
  3084. selector: unescape('on%3A'),
  3085. category: 'instance creation',
  3086. fn: function (aCollection){
  3087. var self=this;
  3088. return (function($rec){smalltalk.send($rec, "_setCollection_", [aCollection]);smalltalk.send($rec, "_setStreamSize_", [smalltalk.send(aCollection, "_size", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
  3089. return self;},
  3090. args: ["aCollection"],
  3091. source: unescape('on%3A%20aCollection%0A%09%20%20%20%20%5Eself%20new%20%0A%09%09setCollection%3A%20aCollection%3B%0A%09%09setStreamSize%3A%20aCollection%20size%3B%0A%09%09yourself'),
  3092. messageSends: ["setCollection:", "setStreamSize:", "size", "yourself", "new"],
  3093. referencedClasses: []
  3094. }),
  3095. smalltalk.Stream.klass);
  3096. smalltalk.addClass('StringStream', smalltalk.Stream, [], 'Kernel-Collections');
  3097. smalltalk.addMethod(
  3098. unescape('_next_'),
  3099. smalltalk.method({
  3100. selector: unescape('next%3A'),
  3101. category: 'reading',
  3102. fn: function (anInteger){
  3103. var self=this;
  3104. var tempCollection=nil;
  3105. tempCollection=smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_class", []), "_new", []);
  3106. smalltalk.send(anInteger, "_timesRepeat_", [(function(){return ((($receiver = smalltalk.send(self, "_atEnd", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return tempCollection=smalltalk.send(tempCollection, "__comma", [smalltalk.send(self, "_next", [])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return tempCollection=smalltalk.send(tempCollection, "__comma", [smalltalk.send(self, "_next", [])]);})]));})]);
  3107. return tempCollection;
  3108. return self;},
  3109. args: ["anInteger"],
  3110. source: unescape('next%3A%20anInteger%0A%09%7C%20tempCollection%20%7C%0A%09tempCollection%20%3A%3D%20self%20collection%20class%20new.%0A%09anInteger%20timesRepeat%3A%20%5B%0A%09%20%20%20%20self%20atEnd%20ifFalse%3A%20%5B%0A%09%09tempCollection%20%3A%3D%20tempCollection%2C%20self%20next%5D%5D.%0A%09%5EtempCollection'),
  3111. messageSends: ["new", "class", "collection", "timesRepeat:", "ifFalse:", "atEnd", unescape("%2C"), "next"],
  3112. referencedClasses: []
  3113. }),
  3114. smalltalk.StringStream);
  3115. smalltalk.addMethod(
  3116. unescape('_nextPut_'),
  3117. smalltalk.method({
  3118. selector: unescape('nextPut%3A'),
  3119. category: 'writing',
  3120. fn: function (aString){
  3121. var self=this;
  3122. smalltalk.send(self, "_nextPutAll_", [aString]);
  3123. return self;},
  3124. args: ["aString"],
  3125. source: unescape('nextPut%3A%20aString%0A%09self%20nextPutAll%3A%20aString'),
  3126. messageSends: ["nextPutAll:"],
  3127. referencedClasses: []
  3128. }),
  3129. smalltalk.StringStream);
  3130. smalltalk.addMethod(
  3131. unescape('_nextPutAll_'),
  3132. smalltalk.method({
  3133. selector: unescape('nextPutAll%3A'),
  3134. category: 'writing',
  3135. fn: function (aString){
  3136. var self=this;
  3137. smalltalk.send(self, "_setCollection_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [(1), smalltalk.send(self, "_position", [])]), "__comma", [aString]), "__comma", [smalltalk.send(smalltalk.send(self, "_collection", []), "_copyFrom_to_", [((($receiver = ((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]))).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])])), smalltalk.send(smalltalk.send(self, "_collection", []), "_size", [])])])]);
  3138. smalltalk.send(self, "_position_", [((($receiver = smalltalk.send(self, "_position", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(aString, "_size", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(aString, "_size", [])]))]);
  3139. smalltalk.send(self, "_setStreamSize_", [smalltalk.send(smalltalk.send(self, "_streamSize", []), "_max_", [smalltalk.send(self, "_position", [])])]);
  3140. return self;},
  3141. args: ["aString"],
  3142. source: unescape('nextPutAll%3A%20aString%0A%09self%20setCollection%3A%20%0A%09%20%20%20%20%28self%20collection%20copyFrom%3A%201%20to%3A%20self%20position%29%2C%0A%09%20%20%20%20aString%2C%0A%09%20%20%20%20%28self%20collection%20copyFrom%3A%20%28self%20position%20+%201%20+%20aString%20size%29%20to%3A%20self%20collection%20size%29.%0A%09self%20position%3A%20self%20position%20+%20aString%20size.%0A%09self%20setStreamSize%3A%20%28self%20streamSize%20max%3A%20self%20position%29'),
  3143. messageSends: ["setCollection:", unescape("%2C"), "copyFrom:to:", "collection", "position", unescape("+"), "size", "position:", "setStreamSize:", "max:", "streamSize"],
  3144. referencedClasses: []
  3145. }),
  3146. smalltalk.StringStream);
  3147. smalltalk.addMethod(
  3148. unescape('_cr'),
  3149. smalltalk.method({
  3150. selector: unescape('cr'),
  3151. category: 'writing',
  3152. fn: function (){
  3153. var self=this;
  3154. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
  3155. return self;},
  3156. args: [],
  3157. source: unescape('cr%0A%09%5Eself%20nextPutAll%3A%20String%20cr'),
  3158. messageSends: ["nextPutAll:", "cr"],
  3159. referencedClasses: ["String"]
  3160. }),
  3161. smalltalk.StringStream);
  3162. smalltalk.addMethod(
  3163. unescape('_crlf'),
  3164. smalltalk.method({
  3165. selector: unescape('crlf'),
  3166. category: 'writing',
  3167. fn: function (){
  3168. var self=this;
  3169. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_crlf", [])]);
  3170. return self;},
  3171. args: [],
  3172. source: unescape('crlf%0A%09%5Eself%20nextPutAll%3A%20String%20crlf'),
  3173. messageSends: ["nextPutAll:", "crlf"],
  3174. referencedClasses: ["String"]
  3175. }),
  3176. smalltalk.StringStream);
  3177. smalltalk.addMethod(
  3178. unescape('_lf'),
  3179. smalltalk.method({
  3180. selector: unescape('lf'),
  3181. category: 'writing',
  3182. fn: function (){
  3183. var self=this;
  3184. return smalltalk.send(self, "_nextPutAll_", [smalltalk.send((smalltalk.String || String), "_lf", [])]);
  3185. return self;},
  3186. args: [],
  3187. source: unescape('lf%0A%09%5Eself%20nextPutAll%3A%20String%20lf'),
  3188. messageSends: ["nextPutAll:", "lf"],
  3189. referencedClasses: ["String"]
  3190. }),
  3191. smalltalk.StringStream);
  3192. smalltalk.addMethod(
  3193. unescape('_space'),
  3194. smalltalk.method({
  3195. selector: unescape('space'),
  3196. category: 'writing',
  3197. fn: function (){
  3198. var self=this;
  3199. smalltalk.send(self, "_nextPut_", [" "]);
  3200. return self;},
  3201. args: [],
  3202. source: unescape('space%0A%09self%20nextPut%3A%20%27%20%27'),
  3203. messageSends: ["nextPut:"],
  3204. referencedClasses: []
  3205. }),
  3206. smalltalk.StringStream);
  3207. smalltalk.addClass('Set', smalltalk.Collection, ['elements'], 'Kernel-Collections');
  3208. smalltalk.addMethod(
  3209. unescape('_add_'),
  3210. smalltalk.method({
  3211. selector: unescape('add%3A'),
  3212. category: 'adding/removing',
  3213. fn: function (anObject){
  3214. var self=this;
  3215. var found;
  3216. for(var i in self['@elements']) {
  3217. if(anObject == self['@elements'][i]) {
  3218. found = true;
  3219. break;
  3220. }
  3221. }
  3222. if(!found) {self['@elements'].push(anObject)}
  3223. ;
  3224. return self;},
  3225. args: ["anObject"],
  3226. source: unescape('add%3A%20anObject%0A%09%3C%0A%09%09var%20found%3B%0A%09%09for%28var%20i%20in%20self%5B%27@elements%27%5D%29%20%7B%0A%09%09%09if%28anObject%20%3D%3D%20self%5B%27@elements%27%5D%5Bi%5D%29%20%7B%0A%09%09%09%09found%20%3D%20true%3B%0A%09%09%09%09break%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%09if%28%21found%29%20%7Bself%5B%27@elements%27%5D.push%28anObject%29%7D%0A%09%3E'),
  3227. messageSends: [],
  3228. referencedClasses: []
  3229. }),
  3230. smalltalk.Set);
  3231. smalltalk.addMethod(
  3232. unescape('_remove_'),
  3233. smalltalk.method({
  3234. selector: unescape('remove%3A'),
  3235. category: 'adding/removing',
  3236. fn: function (anObject){
  3237. var self=this;
  3238. smalltalk.send(self['@elements'], "_remove_", [anObject]);
  3239. return self;},
  3240. args: ["anObject"],
  3241. source: unescape('remove%3A%20anObject%0A%09elements%20remove%3A%20anObject'),
  3242. messageSends: ["remove:"],
  3243. referencedClasses: []
  3244. }),
  3245. smalltalk.Set);
  3246. smalltalk.addMethod(
  3247. unescape('_initialize'),
  3248. smalltalk.method({
  3249. selector: unescape('initialize'),
  3250. category: 'initialization',
  3251. fn: function (){
  3252. var self=this;
  3253. smalltalk.send(self, "_initialize", [], smalltalk.Collection);
  3254. self['@elements']=[];
  3255. return self;},
  3256. args: [],
  3257. source: unescape('initialize%0A%09super%20initialize.%0A%09elements%20%3A%3D%20%23%28%29'),
  3258. messageSends: ["initialize"],
  3259. referencedClasses: []
  3260. }),
  3261. smalltalk.Set);
  3262. smalltalk.addMethod(
  3263. unescape('_size'),
  3264. smalltalk.method({
  3265. selector: unescape('size'),
  3266. category: 'accessing',
  3267. fn: function (){
  3268. var self=this;
  3269. return smalltalk.send(self['@elements'], "_size", []);
  3270. return self;},
  3271. args: [],
  3272. source: unescape('size%0A%09%5Eelements%20size'),
  3273. messageSends: ["size"],
  3274. referencedClasses: []
  3275. }),
  3276. smalltalk.Set);
  3277. smalltalk.addMethod(
  3278. unescape('_asArray'),
  3279. smalltalk.method({
  3280. selector: unescape('asArray'),
  3281. category: 'converting',
  3282. fn: function (){
  3283. var self=this;
  3284. return smalltalk.send(self['@elements'], "_copy", []);
  3285. return self;},
  3286. args: [],
  3287. source: unescape('asArray%0A%09%5Eelements%20copy'),
  3288. messageSends: ["copy"],
  3289. referencedClasses: []
  3290. }),
  3291. smalltalk.Set);
  3292. smalltalk.addMethod(
  3293. unescape('_detect_ifNone_'),
  3294. smalltalk.method({
  3295. selector: unescape('detect%3AifNone%3A'),
  3296. category: 'enumerating',
  3297. fn: function (aBlock, anotherBlock){
  3298. var self=this;
  3299. return smalltalk.send(self['@elements'], "_detect_ifNone_", [aBlock, anotherBlock]);
  3300. return self;},
  3301. args: ["aBlock", "anotherBlock"],
  3302. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eelements%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  3303. messageSends: ["detect:ifNone:"],
  3304. referencedClasses: []
  3305. }),
  3306. smalltalk.Set);
  3307. smalltalk.addMethod(
  3308. unescape('_do_'),
  3309. smalltalk.method({
  3310. selector: unescape('do%3A'),
  3311. category: 'enumerating',
  3312. fn: function (aBlock){
  3313. var self=this;
  3314. smalltalk.send(self['@elements'], "_do_", [aBlock]);
  3315. return self;},
  3316. args: ["aBlock"],
  3317. source: unescape('do%3A%20aBlock%0A%09elements%20do%3A%20aBlock'),
  3318. messageSends: ["do:"],
  3319. referencedClasses: []
  3320. }),
  3321. smalltalk.Set);
  3322. smalltalk.addMethod(
  3323. unescape('_includes_'),
  3324. smalltalk.method({
  3325. selector: unescape('includes%3A'),
  3326. category: 'testing',
  3327. fn: function (anObject){
  3328. var self=this;
  3329. return smalltalk.send(self['@elements'], "_includes_", [anObject]);
  3330. return self;},
  3331. args: ["anObject"],
  3332. source: unescape('includes%3A%20anObject%0A%09%5Eelements%20includes%3A%20anObject'),
  3333. messageSends: ["includes:"],
  3334. referencedClasses: []
  3335. }),
  3336. smalltalk.Set);
  3337. smalltalk.addMethod(
  3338. unescape('__eq'),
  3339. smalltalk.method({
  3340. selector: unescape('%3D'),
  3341. category: 'comparing',
  3342. fn: function (aCollection){
  3343. var self=this;
  3344. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aCollection, "_class", [])]), "_and_", [(function(){return smalltalk.send(self['@elements'], "__eq", [smalltalk.send(aCollection, "_asArray", [])]);})]);
  3345. return self;},
  3346. args: ["aCollection"],
  3347. source: unescape('%3D%20aCollection%0A%09%5Eself%20class%20%3D%20aCollection%20class%20and%3A%20%5B%0A%09%09elements%20%3D%20aCollection%20asArray%5D'),
  3348. messageSends: ["and:", unescape("%3D"), "class", "asArray"],
  3349. referencedClasses: []
  3350. }),
  3351. smalltalk.Set);
  3352. smalltalk.addMethod(
  3353. unescape('_select_'),
  3354. smalltalk.method({
  3355. selector: unescape('select%3A'),
  3356. category: 'enumerating',
  3357. fn: function (aBlock){
  3358. var self=this;
  3359. var collection=nil;
  3360. collection=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  3361. smalltalk.send(self, "_do_", [(function(each){return ((($receiver = smalltalk.send(aBlock, "_value_", [each])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(collection, "_add_", [each]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(collection, "_add_", [each]);})]));})]);
  3362. return collection;
  3363. return self;},
  3364. args: ["aBlock"],
  3365. source: unescape('select%3A%20aBlock%0A%09%7C%20collection%20%7C%0A%09collection%20%3A%3D%20self%20class%20new.%20%0A%09self%20do%3A%20%5B%3Aeach%20%7C%0A%09%09%28aBlock%20value%3A%20each%29%20ifTrue%3A%20%5B%0A%09%09%09collection%20add%3A%20each%5D%5D.%0A%09%5Ecollection'),
  3366. messageSends: ["new", "class", "do:", "ifTrue:", "value:", "add:"],
  3367. referencedClasses: []
  3368. }),
  3369. smalltalk.Set);
  3370. smalltalk.addClass('HashedCollection', smalltalk.Collection, [], 'Kernel-Collections');
  3371. smalltalk.HashedCollection.comment=unescape('A%20HashedCollection%20is%20a%20traditional%20JavaScript%20object%2C%20or%20a%20Smalltalk%20Dictionary.%0A%0AUnlike%20a%20Dictionary%2C%20it%20can%20only%20have%20strings%20as%20keys.')
  3372. smalltalk.addMethod(
  3373. unescape('_size'),
  3374. smalltalk.method({
  3375. selector: unescape('size'),
  3376. category: 'accessing',
  3377. fn: function (){
  3378. var self=this;
  3379. return smalltalk.send(smalltalk.send(self, "_keys", []), "_size", []);
  3380. return self;},
  3381. args: [],
  3382. source: unescape('size%0A%09%5Eself%20keys%20size'),
  3383. messageSends: ["size", "keys"],
  3384. referencedClasses: []
  3385. }),
  3386. smalltalk.HashedCollection);
  3387. smalltalk.addMethod(
  3388. unescape('_associations'),
  3389. smalltalk.method({
  3390. selector: unescape('associations'),
  3391. category: 'accessing',
  3392. fn: function (){
  3393. var self=this;
  3394. var associations=nil;
  3395. associations=[];
  3396. smalltalk.send(smalltalk.send(self, "_keys", []), "_do_", [(function(each){return smalltalk.send(associations, "_add_", [smalltalk.send((smalltalk.Association || Association), "_key_value_", [each, smalltalk.send(self, "_at_", [each])])]);})]);
  3397. return associations;
  3398. return self;},
  3399. args: [],
  3400. source: unescape('associations%0A%09%7C%20associations%20%7C%0A%09associations%20%3A%3D%20%23%28%29.%0A%09self%20keys%20do%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20associations%20add%3A%20%28Association%20key%3A%20each%20value%3A%20%28self%20at%3A%20each%29%29%5D.%0A%09%5Eassociations'),
  3401. messageSends: ["do:", "keys", "add:", "key:value:", "at:"],
  3402. referencedClasses: ["Association"]
  3403. }),
  3404. smalltalk.HashedCollection);
  3405. smalltalk.addMethod(
  3406. unescape('_keys'),
  3407. smalltalk.method({
  3408. selector: unescape('keys'),
  3409. category: 'accessing',
  3410. fn: function (){
  3411. var self=this;
  3412. var keys = [];
  3413. for(var i in self) {
  3414. if(self.hasOwnProperty(i)) {
  3415. keys.push(i);
  3416. }
  3417. };
  3418. return keys;
  3419. ;
  3420. return self;},
  3421. args: [],
  3422. source: unescape('keys%0A%09%3C%0A%09%09var%20keys%20%3D%20%5B%5D%3B%0A%09%09for%28var%20i%20in%20self%29%20%7B%0A%09%09%09if%28self.hasOwnProperty%28i%29%29%20%7B%0A%09%09%09%09keys.push%28i%29%3B%0A%09%09%09%7D%0A%09%09%7D%3B%0A%09%09return%20keys%3B%0A%09%3E'),
  3423. messageSends: [],
  3424. referencedClasses: []
  3425. }),
  3426. smalltalk.HashedCollection);
  3427. smalltalk.addMethod(
  3428. unescape('_values'),
  3429. smalltalk.method({
  3430. selector: unescape('values'),
  3431. category: 'accessing',
  3432. fn: function (){
  3433. var self=this;
  3434. return smalltalk.send(smalltalk.send(self, "_keys", []), "_collect_", [(function(each){return smalltalk.send(self, "_at_", [each]);})]);
  3435. return self;},
  3436. args: [],
  3437. source: unescape('values%0A%09%5Eself%20keys%20collect%3A%20%5B%3Aeach%20%7C%20self%20at%3A%20each%5D'),
  3438. messageSends: ["collect:", "keys", "at:"],
  3439. referencedClasses: []
  3440. }),
  3441. smalltalk.HashedCollection);
  3442. smalltalk.addMethod(
  3443. unescape('_at_put_'),
  3444. smalltalk.method({
  3445. selector: unescape('at%3Aput%3A'),
  3446. category: 'accessing',
  3447. fn: function (aKey, aValue){
  3448. var self=this;
  3449. return smalltalk.send(self, "_basicAt_put_", [aKey, aValue]);
  3450. return self;},
  3451. args: ["aKey", "aValue"],
  3452. source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%09%5Eself%20basicAt%3A%20aKey%20put%3A%20aValue'),
  3453. messageSends: ["basicAt:put:"],
  3454. referencedClasses: []
  3455. }),
  3456. smalltalk.HashedCollection);
  3457. smalltalk.addMethod(
  3458. unescape('_at_ifAbsent_'),
  3459. smalltalk.method({
  3460. selector: unescape('at%3AifAbsent%3A'),
  3461. category: 'accessing',
  3462. fn: function (aKey, aBlock){
  3463. var self=this;
  3464. return smalltalk.send(smalltalk.send(self, "_includesKey_", [aKey]), "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self, "_basicAt_", [aKey]);}), aBlock]);
  3465. return self;},
  3466. args: ["aKey", "aBlock"],
  3467. source: unescape('at%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%5E%28self%20includesKey%3A%20aKey%29%0A%09%09ifTrue%3A%20%5Bself%20basicAt%3A%20aKey%5D%0A%09%09ifFalse%3A%20aBlock'),
  3468. messageSends: ["ifTrue:ifFalse:", "includesKey:", "basicAt:"],
  3469. referencedClasses: []
  3470. }),
  3471. smalltalk.HashedCollection);
  3472. smalltalk.addMethod(
  3473. unescape('_at_ifAbsentPut_'),
  3474. smalltalk.method({
  3475. selector: unescape('at%3AifAbsentPut%3A'),
  3476. category: 'accessing',
  3477. fn: function (aKey, aBlock){
  3478. var self=this;
  3479. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_at_put_", [aKey, smalltalk.send(aBlock, "_value", [])]);})]);
  3480. return self;},
  3481. args: ["aKey", "aBlock"],
  3482. source: unescape('at%3A%20aKey%20ifAbsentPut%3A%20aBlock%0A%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5B%0A%09%20%20%20%20self%20at%3A%20aKey%20put%3A%20aBlock%20value%5D'),
  3483. messageSends: ["at:ifAbsent:", "at:put:", "value"],
  3484. referencedClasses: []
  3485. }),
  3486. smalltalk.HashedCollection);
  3487. smalltalk.addMethod(
  3488. unescape('_at_ifPresent_'),
  3489. smalltalk.method({
  3490. selector: unescape('at%3AifPresent%3A'),
  3491. category: 'accessing',
  3492. fn: function (aKey, aBlock){
  3493. var self=this;
  3494. return (($receiver = smalltalk.send(self, "_basicAt_", [aKey])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})() : nil;
  3495. return self;},
  3496. args: ["aKey", "aBlock"],
  3497. source: unescape('at%3A%20aKey%20ifPresent%3A%20aBlock%0A%09%5E%28self%20basicAt%3A%20aKey%29%20ifNotNil%3A%20%5BaBlock%20value%3A%20%28self%20at%3A%20aKey%29%5D'),
  3498. messageSends: ["ifNotNil:", "basicAt:", "value:", "at:"],
  3499. referencedClasses: []
  3500. }),
  3501. smalltalk.HashedCollection);
  3502. smalltalk.addMethod(
  3503. unescape('_at_ifPresent_ifAbsent_'),
  3504. smalltalk.method({
  3505. selector: unescape('at%3AifPresent%3AifAbsent%3A'),
  3506. category: 'accessing',
  3507. fn: function (aKey, aBlock, anotherBlock){
  3508. var self=this;
  3509. return smalltalk.send(smalltalk.send(self, "_basicAt_", [aKey]), "_ifNil_ifNotNil_", [anotherBlock, (function(){return smalltalk.send(aBlock, "_value_", [smalltalk.send(self, "_at_", [aKey])]);})]);
  3510. return self;},
  3511. args: ["aKey", "aBlock", "anotherBlock"],
  3512. source: unescape('at%3A%20aKey%20ifPresent%3A%20aBlock%20ifAbsent%3A%20anotherBlock%0A%09%5E%28self%20basicAt%3A%20aKey%29%0A%09%20%20%20%20ifNil%3A%20anotherBlock%0A%09%20%20%20%20ifNotNil%3A%20%5BaBlock%20value%3A%20%28self%20at%3A%20aKey%29%5D'),
  3513. messageSends: ["ifNil:ifNotNil:", "basicAt:", "value:", "at:"],
  3514. referencedClasses: []
  3515. }),
  3516. smalltalk.HashedCollection);
  3517. smalltalk.addMethod(
  3518. unescape('_at_'),
  3519. smalltalk.method({
  3520. selector: unescape('at%3A'),
  3521. category: 'accessing',
  3522. fn: function (aKey){
  3523. var self=this;
  3524. return smalltalk.send(self, "_at_ifAbsent_", [aKey, (function(){return smalltalk.send(self, "_errorNotFound", []);})]);
  3525. return self;},
  3526. args: ["aKey"],
  3527. source: unescape('at%3A%20aKey%0A%09%5Eself%20at%3A%20aKey%20ifAbsent%3A%20%5Bself%20errorNotFound%5D'),
  3528. messageSends: ["at:ifAbsent:", "errorNotFound"],
  3529. referencedClasses: []
  3530. }),
  3531. smalltalk.HashedCollection);
  3532. smalltalk.addMethod(
  3533. unescape('_add_'),
  3534. smalltalk.method({
  3535. selector: unescape('add%3A'),
  3536. category: 'adding/removing',
  3537. fn: function (anAssociation){
  3538. var self=this;
  3539. smalltalk.send(self, "_at_put_", [smalltalk.send(anAssociation, "_key", []), smalltalk.send(anAssociation, "_value", [])]);
  3540. return self;},
  3541. args: ["anAssociation"],
  3542. source: unescape('add%3A%20anAssociation%0A%09self%20at%3A%20anAssociation%20key%20put%3A%20anAssociation%20value'),
  3543. messageSends: ["at:put:", "key", "value"],
  3544. referencedClasses: []
  3545. }),
  3546. smalltalk.HashedCollection);
  3547. smalltalk.addMethod(
  3548. unescape('_addAll_'),
  3549. smalltalk.method({
  3550. selector: unescape('addAll%3A'),
  3551. category: 'adding/removing',
  3552. fn: function (aHashedCollection){
  3553. var self=this;
  3554. smalltalk.send(self, "_addAll_", [smalltalk.send(aHashedCollection, "_associations", [])], smalltalk.Collection);
  3555. return aHashedCollection;
  3556. return self;},
  3557. args: ["aHashedCollection"],
  3558. source: unescape('addAll%3A%20aHashedCollection%0A%09super%20addAll%3A%20aHashedCollection%20associations.%0A%09%5EaHashedCollection'),
  3559. messageSends: ["addAll:", "associations"],
  3560. referencedClasses: []
  3561. }),
  3562. smalltalk.HashedCollection);
  3563. smalltalk.addMethod(
  3564. unescape('_removeKey_'),
  3565. smalltalk.method({
  3566. selector: unescape('removeKey%3A'),
  3567. category: 'adding/removing',
  3568. fn: function (aKey){
  3569. var self=this;
  3570. smalltalk.send(self, "_remove_", [aKey]);
  3571. return self;},
  3572. args: ["aKey"],
  3573. source: unescape('removeKey%3A%20aKey%0A%20%20%20%20self%20remove%3A%20aKey'),
  3574. messageSends: ["remove:"],
  3575. referencedClasses: []
  3576. }),
  3577. smalltalk.HashedCollection);
  3578. smalltalk.addMethod(
  3579. unescape('_remove_ifAbsent_'),
  3580. smalltalk.method({
  3581. selector: unescape('remove%3AifAbsent%3A'),
  3582. category: 'adding/removing',
  3583. fn: function (aKey, aBlock){
  3584. var self=this;
  3585. return smalltalk.send(self, "_removeKey_ifAbsent_", [aKey, aBlock]);
  3586. return self;},
  3587. args: ["aKey", "aBlock"],
  3588. source: unescape('remove%3A%20aKey%20ifAbsent%3A%20aBlock%0A%20%20%20%20%5Eself%20removeKey%3A%20aKey%20ifAbsent%3A%20aBlock'),
  3589. messageSends: ["removeKey:ifAbsent:"],
  3590. referencedClasses: []
  3591. }),
  3592. smalltalk.HashedCollection);
  3593. smalltalk.addMethod(
  3594. unescape('_removeKey_ifAbsent_'),
  3595. smalltalk.method({
  3596. selector: unescape('removeKey%3AifAbsent%3A'),
  3597. category: 'adding/removing',
  3598. fn: function (aKey, aBlock){
  3599. var self=this;
  3600. return ((($receiver = smalltalk.send(self, "_includesKey_", [aKey])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(aBlock, "_value", []);})() : (function(){return smalltalk.send(self, "_basicDelete_", [aKey]);})()) : smalltalk.send($receiver, "_ifFalse_ifTrue_", [(function(){return smalltalk.send(aBlock, "_value", []);}), (function(){return smalltalk.send(self, "_basicDelete_", [aKey]);})]));
  3601. return self;},
  3602. args: ["aKey", "aBlock"],
  3603. source: unescape('removeKey%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%5E%28self%20includesKey%3A%20aKey%29%20%0A%09%09ifFalse%3A%20%5BaBlock%20value%5D%0A%09%09ifTrue%3A%20%5Bself%20basicDelete%3A%20aKey%5D'),
  3604. messageSends: ["ifFalse:ifTrue:", "includesKey:", "value", "basicDelete:"],
  3605. referencedClasses: []
  3606. }),
  3607. smalltalk.HashedCollection);
  3608. smalltalk.addMethod(
  3609. unescape('__eq'),
  3610. smalltalk.method({
  3611. selector: unescape('%3D'),
  3612. category: 'comparing',
  3613. fn: function (aHashedCollection){
  3614. var self=this;
  3615. try{((($receiver = smalltalk.send(smalltalk.send(self, "_class", []), "__eq", [smalltalk.send(aHashedCollection, "_class", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  3616. ((($receiver = smalltalk.send(smalltalk.send(self, "_size", []), "__eq", [smalltalk.send(aHashedCollection, "_size", [])])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return false}})})();})]));
  3617. (function(){throw({name: 'stReturn', selector: '__eq', fn: function(){return smalltalk.send(smalltalk.send(self, "_associations", []), "__eq", [smalltalk.send(aHashedCollection, "_associations", [])])}})})();
  3618. return self;
  3619. } catch(e) {if(e.name === 'stReturn' && e.selector === '__eq'){return e.fn()} throw(e)}},
  3620. args: ["aHashedCollection"],
  3621. source: unescape('%3D%20aHashedCollection%0A%09self%20class%20%3D%20aHashedCollection%20class%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09self%20size%20%3D%20aHashedCollection%20size%20ifFalse%3A%20%5B%5Efalse%5D.%0A%09%5Eself%20associations%20%3D%20aHashedCollection%20associations'),
  3622. messageSends: ["ifFalse:", unescape("%3D"), "class", "size", "associations"],
  3623. referencedClasses: []
  3624. }),
  3625. smalltalk.HashedCollection);
  3626. smalltalk.addMethod(
  3627. unescape('_shallowCopy'),
  3628. smalltalk.method({
  3629. selector: unescape('shallowCopy'),
  3630. category: 'copying',
  3631. fn: function (){
  3632. var self=this;
  3633. var copy=nil;
  3634. copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  3635. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(copy, "_at_put_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  3636. return copy;
  3637. return self;},
  3638. args: [],
  3639. source: unescape('shallowCopy%0A%09%7C%20copy%20%7C%0A%09copy%20%3A%3D%20self%20class%20new.%0A%09self%20associationsDo%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20copy%20at%3A%20each%20key%20%20put%3A%20each%20value%5D.%0A%09%5Ecopy'),
  3640. messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "value"],
  3641. referencedClasses: []
  3642. }),
  3643. smalltalk.HashedCollection);
  3644. smalltalk.addMethod(
  3645. unescape('__comma'),
  3646. smalltalk.method({
  3647. selector: unescape('%2C'),
  3648. category: 'copying',
  3649. fn: function (aCollection){
  3650. var self=this;
  3651. smalltalk.send(self, "_shouldNotImplement", []);
  3652. return self;},
  3653. args: ["aCollection"],
  3654. source: unescape('%2C%20aCollection%0A%09self%20shouldNotImplement'),
  3655. messageSends: ["shouldNotImplement"],
  3656. referencedClasses: []
  3657. }),
  3658. smalltalk.HashedCollection);
  3659. smalltalk.addMethod(
  3660. unescape('_copyFrom_to_'),
  3661. smalltalk.method({
  3662. selector: unescape('copyFrom%3Ato%3A'),
  3663. category: 'copying',
  3664. fn: function (anIndex, anotherIndex){
  3665. var self=this;
  3666. smalltalk.send(self, "_shouldNotImplement", []);
  3667. return self;},
  3668. args: ["anIndex", "anotherIndex"],
  3669. source: unescape('copyFrom%3A%20anIndex%20to%3A%20anotherIndex%0A%09self%20shouldNotImplement'),
  3670. messageSends: ["shouldNotImplement"],
  3671. referencedClasses: []
  3672. }),
  3673. smalltalk.HashedCollection);
  3674. smalltalk.addMethod(
  3675. unescape('_deepCopy'),
  3676. smalltalk.method({
  3677. selector: unescape('deepCopy'),
  3678. category: 'copying',
  3679. fn: function (){
  3680. var self=this;
  3681. var copy=nil;
  3682. copy=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  3683. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(copy, "_at_put_", [smalltalk.send(each, "_key", []), smalltalk.send(smalltalk.send(each, "_value", []), "_deepCopy", [])]);})]);
  3684. return copy;
  3685. return self;},
  3686. args: [],
  3687. source: unescape('deepCopy%0A%09%7C%20copy%20%7C%0A%09copy%20%3A%3D%20self%20class%20new.%0A%09self%20associationsDo%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20copy%20at%3A%20each%20key%20%20put%3A%20each%20value%20deepCopy%5D.%0A%09%5Ecopy'),
  3688. messageSends: ["new", "class", "associationsDo:", "at:put:", "key", "deepCopy", "value"],
  3689. referencedClasses: []
  3690. }),
  3691. smalltalk.HashedCollection);
  3692. smalltalk.addMethod(
  3693. unescape('_associationsDo_'),
  3694. smalltalk.method({
  3695. selector: unescape('associationsDo%3A'),
  3696. category: 'enumerating',
  3697. fn: function (aBlock){
  3698. var self=this;
  3699. smalltalk.send(smalltalk.send(self, "_associations", []), "_do_", [aBlock]);
  3700. return self;},
  3701. args: ["aBlock"],
  3702. source: unescape('associationsDo%3A%20aBlock%0A%09self%20associations%20do%3A%20aBlock'),
  3703. messageSends: ["do:", "associations"],
  3704. referencedClasses: []
  3705. }),
  3706. smalltalk.HashedCollection);
  3707. smalltalk.addMethod(
  3708. unescape('_keysAndValuesDo_'),
  3709. smalltalk.method({
  3710. selector: unescape('keysAndValuesDo%3A'),
  3711. category: 'enumerating',
  3712. fn: function (aBlock){
  3713. var self=this;
  3714. smalltalk.send(self, "_associationsDo_", [(function(each){return smalltalk.send(aBlock, "_value_value_", [smalltalk.send(each, "_key", []), smalltalk.send(each, "_value", [])]);})]);
  3715. return self;},
  3716. args: ["aBlock"],
  3717. source: unescape('keysAndValuesDo%3A%20aBlock%0A%09self%20associationsDo%3A%20%5B%3Aeach%20%7C%0A%09%20%20%20%20aBlock%20value%3A%20each%20key%20value%3A%20each%20value%5D'),
  3718. messageSends: ["associationsDo:", "value:value:", "key", "value"],
  3719. referencedClasses: []
  3720. }),
  3721. smalltalk.HashedCollection);
  3722. smalltalk.addMethod(
  3723. unescape('_do_'),
  3724. smalltalk.method({
  3725. selector: unescape('do%3A'),
  3726. category: 'enumerating',
  3727. fn: function (aBlock){
  3728. var self=this;
  3729. smalltalk.send(smalltalk.send(self, "_values", []), "_do_", [aBlock]);
  3730. return self;},
  3731. args: ["aBlock"],
  3732. source: unescape('do%3A%20aBlock%0A%09self%20values%20do%3A%20aBlock'),
  3733. messageSends: ["do:", "values"],
  3734. referencedClasses: []
  3735. }),
  3736. smalltalk.HashedCollection);
  3737. smalltalk.addMethod(
  3738. unescape('_select_'),
  3739. smalltalk.method({
  3740. selector: unescape('select%3A'),
  3741. category: 'enumerating',
  3742. fn: function (aBlock){
  3743. var self=this;
  3744. var newDict=nil;
  3745. newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  3746. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return ((($receiver = smalltalk.send(aBlock, "_value_", [value])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(newDict, "_at_put_", [key, value]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(newDict, "_at_put_", [key, value]);})]));})]);
  3747. return newDict;
  3748. return self;},
  3749. args: ["aBlock"],
  3750. source: unescape('select%3A%20aBlock%0A%09%7C%20newDict%20%7C%0A%09newDict%20%3A%3D%20self%20class%20new.%0A%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%20%20%20%20%28aBlock%20value%3A%20value%29%20ifTrue%3A%20%5BnewDict%20at%3A%20key%20put%3A%20value%5D%5D.%0A%09%5EnewDict'),
  3751. messageSends: ["new", "class", "keysAndValuesDo:", "ifTrue:", "value:", "at:put:"],
  3752. referencedClasses: []
  3753. }),
  3754. smalltalk.HashedCollection);
  3755. smalltalk.addMethod(
  3756. unescape('_collect_'),
  3757. smalltalk.method({
  3758. selector: unescape('collect%3A'),
  3759. category: 'enumerating',
  3760. fn: function (aBlock){
  3761. var self=this;
  3762. var newDict=nil;
  3763. newDict=smalltalk.send(smalltalk.send(self, "_class", []), "_new", []);
  3764. smalltalk.send(self, "_keysAndValuesDo_", [(function(key, value){return smalltalk.send(newDict, "_at_put_", [key, smalltalk.send(aBlock, "_value_", [value])]);})]);
  3765. return newDict;
  3766. return self;},
  3767. args: ["aBlock"],
  3768. source: unescape('collect%3A%20aBlock%0A%09%7C%20newDict%20%7C%0A%09newDict%20%3A%3D%20self%20class%20new.%0A%09self%20keysAndValuesDo%3A%20%5B%3Akey%20%3Avalue%20%7C%0A%09%20%20%20%20newDict%20at%3A%20key%20put%3A%20%28aBlock%20value%3A%20value%29%5D.%0A%09%5EnewDict'),
  3769. messageSends: ["new", "class", "keysAndValuesDo:", "at:put:", "value:"],
  3770. referencedClasses: []
  3771. }),
  3772. smalltalk.HashedCollection);
  3773. smalltalk.addMethod(
  3774. unescape('_detect_ifNone_'),
  3775. smalltalk.method({
  3776. selector: unescape('detect%3AifNone%3A'),
  3777. category: 'enumerating',
  3778. fn: function (aBlock, anotherBlock){
  3779. var self=this;
  3780. return smalltalk.send(smalltalk.send(self, "_values", []), "_detect_ifNone_", [aBlock, anotherBlock]);
  3781. return self;},
  3782. args: ["aBlock", "anotherBlock"],
  3783. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eself%20values%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  3784. messageSends: ["detect:ifNone:", "values"],
  3785. referencedClasses: []
  3786. }),
  3787. smalltalk.HashedCollection);
  3788. smalltalk.addMethod(
  3789. unescape('_includes_'),
  3790. smalltalk.method({
  3791. selector: unescape('includes%3A'),
  3792. category: 'enumerating',
  3793. fn: function (anObject){
  3794. var self=this;
  3795. return smalltalk.send(smalltalk.send(self, "_values", []), "_includes_", [anObject]);
  3796. return self;},
  3797. args: ["anObject"],
  3798. source: unescape('includes%3A%20anObject%0A%09%5Eself%20values%20includes%3A%20anObject'),
  3799. messageSends: ["includes:", "values"],
  3800. referencedClasses: []
  3801. }),
  3802. smalltalk.HashedCollection);
  3803. smalltalk.addMethod(
  3804. unescape('_printString'),
  3805. smalltalk.method({
  3806. selector: unescape('printString'),
  3807. category: 'printing',
  3808. fn: function (){
  3809. var self=this;
  3810. return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(aStream){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Collection)]);return smalltalk.send($rec, "_nextPutAll_", [unescape("%28")]);})(aStream);smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(anAssociation){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_key", []), "_printString", [])]);smalltalk.send($rec, "_nextPutAll_", [unescape("%20-%3E%20")]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(anAssociation, "_value", []), "_printString", [])]);})(aStream);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [unescape("%20%2C%20")]);})]);return smalltalk.send(aStream, "_nextPutAll_", [unescape("%29")]);})]);
  3811. return self;},
  3812. args: [],
  3813. source: unescape('printString%0A%09%5EString%20streamContents%3A%20%5B%3AaStream%7C%20%20%0A%09%09aStream%20%0A%09%09%09nextPutAll%3A%20super%20printString%3B%0A%09%09%09nextPutAll%3A%20%27%28%27.%0A%09%09%09%09self%20associations%20%0A%09%09%09%09%09do%3A%20%5B%3AanAssociation%7C%20%20%0A%09%09%09%09%09%09aStream%20%0A%09%09%09%09%09%09%09nextPutAll%3A%20anAssociation%20key%20printString%3B%0A%09%09%09%09%09%09%09%09nextPutAll%3A%20%27%20-%3E%20%27%3B%0A%09%09%09%09%09%09%09%09nextPutAll%3A%20anAssociation%20value%20printString%5D%0A%09%09%09%09%09%09%09separatedBy%3A%20%5BaStream%20nextPutAll%3A%20%27%20%2C%20%27%5D.%0A%09%09%09%09%09%09aStream%20nextPutAll%3A%20%27%29%27%5D'),
  3814. messageSends: ["streamContents:", "nextPutAll:", "printString", "do:separatedBy:", "associations", "key", "value"],
  3815. referencedClasses: ["String"]
  3816. }),
  3817. smalltalk.HashedCollection);
  3818. smalltalk.addMethod(
  3819. unescape('_storeOn_'),
  3820. smalltalk.method({
  3821. selector: unescape('storeOn%3A'),
  3822. category: 'printing',
  3823. fn: function (aStream){
  3824. var self=this;
  3825. smalltalk.send(aStream, "_nextPutAll_", [unescape("%23%7B")]);
  3826. smalltalk.send(smalltalk.send(self, "_associations", []), "_do_separatedBy_", [(function(each){return smalltalk.send(each, "_storeOn_", [aStream]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [". "]);})]);
  3827. smalltalk.send(aStream, "_nextPutAll_", [unescape("%7D")]);
  3828. return self;},
  3829. args: ["aStream"],
  3830. source: unescape('storeOn%3A%20aStream%0A%09aStream%20nextPutAll%3A%20%27%23%7B%27.%0A%09self%20associations%0A%09%09do%3A%20%5B%3Aeach%20%7C%20each%20storeOn%3A%20aStream%5D%0A%09%09separatedBy%3A%20%5B%20aStream%20nextPutAll%3A%20%27.%20%27%5D.%0A%09aStream%20nextPutAll%3A%20%27%7D%27'),
  3831. messageSends: ["nextPutAll:", "do:separatedBy:", "associations", "storeOn:"],
  3832. referencedClasses: []
  3833. }),
  3834. smalltalk.HashedCollection);
  3835. smalltalk.addMethod(
  3836. unescape('_includesKey_'),
  3837. smalltalk.method({
  3838. selector: unescape('includesKey%3A'),
  3839. category: 'testing',
  3840. fn: function (aKey){
  3841. var self=this;
  3842. return self.hasOwnProperty(aKey);
  3843. return self;},
  3844. args: ["aKey"],
  3845. source: unescape('includesKey%3A%20aKey%0A%09%3Creturn%20self.hasOwnProperty%28aKey%29%3E'),
  3846. messageSends: [],
  3847. referencedClasses: []
  3848. }),
  3849. smalltalk.HashedCollection);
  3850. smalltalk.addMethod(
  3851. unescape('_asDictionary'),
  3852. smalltalk.method({
  3853. selector: unescape('asDictionary'),
  3854. category: 'converting',
  3855. fn: function (){
  3856. var self=this;
  3857. return smalltalk.send((smalltalk.Dictionary || Dictionary), "_fromPairs_", [smalltalk.send(self, "_associations", [])]);
  3858. return self;},
  3859. args: [],
  3860. source: unescape('asDictionary%0A%09%5EDictionary%20fromPairs%3A%20self%20associations'),
  3861. messageSends: ["fromPairs:", "associations"],
  3862. referencedClasses: ["Dictionary"]
  3863. }),
  3864. smalltalk.HashedCollection);
  3865. smalltalk.addMethod(
  3866. unescape('_fromPairs_'),
  3867. smalltalk.method({
  3868. selector: unescape('fromPairs%3A'),
  3869. category: 'instance creation',
  3870. fn: function (aCollection){
  3871. var self=this;
  3872. var dict=nil;
  3873. dict=smalltalk.send(self, "_new", []);
  3874. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send(dict, "_add_", [each]);})]);
  3875. return dict;
  3876. return self;},
  3877. args: ["aCollection"],
  3878. source: unescape('fromPairs%3A%20aCollection%0A%09%7C%20dict%20%7C%0A%09dict%20%3A%3D%20self%20new.%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%20dict%20add%3A%20each%5D.%0A%09%5Edict'),
  3879. messageSends: ["new", "do:", "add:"],
  3880. referencedClasses: []
  3881. }),
  3882. smalltalk.HashedCollection.klass);
  3883. smalltalk.addClass('Dictionary', smalltalk.HashedCollection, ['keys', 'values'], 'Kernel-Collections');
  3884. smalltalk.addMethod(
  3885. unescape('_at_ifAbsent_'),
  3886. smalltalk.method({
  3887. selector: unescape('at%3AifAbsent%3A'),
  3888. category: 'accessing',
  3889. fn: function (aKey, aBlock){
  3890. var self=this;
  3891. var index;
  3892. for(var i=0;i<self['@keys'].length;i++){
  3893. if(self['@keys'][i].__eq(aKey)) {index = i;}
  3894. };
  3895. if(typeof index === 'undefined') {
  3896. return aBlock();
  3897. } else {
  3898. return self['@values'][index];
  3899. }
  3900. ;
  3901. return self;},
  3902. args: ["aKey", "aBlock"],
  3903. source: unescape('at%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09var%20index%3B%0A%09%09for%28var%20i%3D0%3Bi%3Cself%5B%27@keys%27%5D.length%3Bi++%29%7B%0A%09%09%09if%28self%5B%27@keys%27%5D%5Bi%5D.__eq%28aKey%29%29%20%7Bindex%20%3D%20i%3B%7D%0A%09%09%7D%3B%0A%09%09if%28typeof%20index%20%3D%3D%3D%20%27undefined%27%29%20%7B%0A%09%09%09return%20aBlock%28%29%3B%0A%09%09%7D%20else%20%7B%0A%09%09%09return%20self%5B%27@values%27%5D%5Bindex%5D%3B%0A%09%09%7D%0A%09%3E'),
  3904. messageSends: [],
  3905. referencedClasses: []
  3906. }),
  3907. smalltalk.Dictionary);
  3908. smalltalk.addMethod(
  3909. unescape('_keys'),
  3910. smalltalk.method({
  3911. selector: unescape('keys'),
  3912. category: 'accessing',
  3913. fn: function (){
  3914. var self=this;
  3915. return smalltalk.send(self['@keys'], "_copy", []);
  3916. return self;},
  3917. args: [],
  3918. source: unescape('keys%0A%09%5Ekeys%20copy'),
  3919. messageSends: ["copy"],
  3920. referencedClasses: []
  3921. }),
  3922. smalltalk.Dictionary);
  3923. smalltalk.addMethod(
  3924. unescape('_values'),
  3925. smalltalk.method({
  3926. selector: unescape('values'),
  3927. category: 'accessing',
  3928. fn: function (){
  3929. var self=this;
  3930. return smalltalk.send(self['@values'], "_copy", []);
  3931. return self;},
  3932. args: [],
  3933. source: unescape('values%0A%09%5Evalues%20copy'),
  3934. messageSends: ["copy"],
  3935. referencedClasses: []
  3936. }),
  3937. smalltalk.Dictionary);
  3938. smalltalk.addMethod(
  3939. unescape('_at_put_'),
  3940. smalltalk.method({
  3941. selector: unescape('at%3Aput%3A'),
  3942. category: 'accessing',
  3943. fn: function (aKey, aValue){
  3944. var self=this;
  3945. var index = self['@keys'].indexOf(aKey);
  3946. if(index === -1) {
  3947. self['@values'].push(aValue);
  3948. self['@keys'].push(aKey);
  3949. } else {
  3950. self['@values'][index] = aValue;
  3951. };
  3952. return aValue;
  3953. ;
  3954. return self;},
  3955. args: ["aKey", "aValue"],
  3956. source: unescape('at%3A%20aKey%20put%3A%20aValue%0A%09%3C%0A%09%09var%20index%20%3D%20self%5B%27@keys%27%5D.indexOf%28aKey%29%3B%0A%09%09if%28index%20%3D%3D%3D%20-1%29%20%7B%0A%09%09%09self%5B%27@values%27%5D.push%28aValue%29%3B%0A%09%09%09self%5B%27@keys%27%5D.push%28aKey%29%3B%0A%09%09%7D%20else%20%7B%0A%09%09%09self%5B%27@values%27%5D%5Bindex%5D%20%3D%20aValue%3B%0A%09%09%7D%3B%0A%0A%09%09return%20aValue%3B%0A%09%3E'),
  3957. messageSends: [],
  3958. referencedClasses: []
  3959. }),
  3960. smalltalk.Dictionary);
  3961. smalltalk.addMethod(
  3962. unescape('_removeKey_ifAbsent_'),
  3963. smalltalk.method({
  3964. selector: unescape('removeKey%3AifAbsent%3A'),
  3965. category: 'adding/removing',
  3966. fn: function (aKey, aBlock){
  3967. var self=this;
  3968. var index = self['@keys'].indexOf(aKey);
  3969. if(index === -1) {
  3970. return aBlock()
  3971. } else {
  3972. self['@keys'].splice(i, 1);
  3973. self['@values'].splice(i, 1);
  3974. return aKey
  3975. };
  3976. ;
  3977. return self;},
  3978. args: ["aKey", "aBlock"],
  3979. source: unescape('removeKey%3A%20aKey%20ifAbsent%3A%20aBlock%0A%09%3C%0A%09%09var%20index%20%3D%20self%5B%27@keys%27%5D.indexOf%28aKey%29%3B%0A%09%09if%28index%20%3D%3D%3D%20-1%29%20%7B%0A%09%09%09return%20aBlock%28%29%0A%09%09%7D%20else%20%7B%0A%09%09%09self%5B%27@keys%27%5D.splice%28i%2C%201%29%3B%0A%09%09%09self%5B%27@values%27%5D.splice%28i%2C%201%29%3B%0A%09%09%09return%20aKey%0A%09%09%7D%3B%0A%09%3E'),
  3980. messageSends: [],
  3981. referencedClasses: []
  3982. }),
  3983. smalltalk.Dictionary);
  3984. smalltalk.addMethod(
  3985. unescape('_initialize'),
  3986. smalltalk.method({
  3987. selector: unescape('initialize'),
  3988. category: 'initialization',
  3989. fn: function (){
  3990. var self=this;
  3991. smalltalk.send(self, "_initialize", [], smalltalk.HashedCollection);
  3992. self['@keys']=[];
  3993. self['@values']=[];
  3994. return self;},
  3995. args: [],
  3996. source: unescape('initialize%0A%09super%20initialize.%0A%09keys%20%3A%3D%20%23%28%29.%0A%09values%20%3A%3D%20%23%28%29'),
  3997. messageSends: ["initialize"],
  3998. referencedClasses: []
  3999. }),
  4000. smalltalk.Dictionary);
  4001. smalltalk.addMethod(
  4002. unescape('_includesKey_'),
  4003. smalltalk.method({
  4004. selector: unescape('includesKey%3A'),
  4005. category: 'testing',
  4006. fn: function (aKey){
  4007. var self=this;
  4008. return smalltalk.send(self['@keys'], "_includes_", [aKey]);
  4009. return self;},
  4010. args: ["aKey"],
  4011. source: unescape('includesKey%3A%20aKey%0A%09%5Ekeys%20includes%3A%20aKey'),
  4012. messageSends: ["includes:"],
  4013. referencedClasses: []
  4014. }),
  4015. smalltalk.Dictionary);
  4016. smalltalk.addMethod(
  4017. unescape('_asHashedCollection'),
  4018. smalltalk.method({
  4019. selector: unescape('asHashedCollection'),
  4020. category: 'converting',
  4021. fn: function (){
  4022. var self=this;
  4023. return smalltalk.send((smalltalk.HashedCollection || HashedCollection), "_fromPairs_", [smalltalk.send(self, "_associations", [])]);
  4024. return self;},
  4025. args: [],
  4026. source: unescape('asHashedCollection%0A%09%5EHashedCollection%20fromPairs%3A%20self%20associations'),
  4027. messageSends: ["fromPairs:", "associations"],
  4028. referencedClasses: ["HashedCollection"]
  4029. }),
  4030. smalltalk.Dictionary);
  4031. smalltalk.addMethod(
  4032. unescape('_asJSONString'),
  4033. smalltalk.method({
  4034. selector: unescape('asJSONString'),
  4035. category: 'converting',
  4036. fn: function (){
  4037. var self=this;
  4038. return smalltalk.send(smalltalk.send(self, "_asHashedCollection", []), "_asJSONString", []);
  4039. return self;},
  4040. args: [],
  4041. source: unescape('asJSONString%0A%09%5Eself%20asHashedCollection%20asJSONString'),
  4042. messageSends: ["asJSONString", "asHashedCollection"],
  4043. referencedClasses: []
  4044. }),
  4045. smalltalk.Dictionary);
  4046. smalltalk.addClass('OrderedCollection', smalltalk.SequenceableCollection, ['elements'], 'Kernel-Collections');
  4047. smalltalk.addMethod(
  4048. unescape('_size'),
  4049. smalltalk.method({
  4050. selector: unescape('size'),
  4051. category: 'accessing',
  4052. fn: function (){
  4053. var self=this;
  4054. return smalltalk.send(self['@elements'], "_size", []);
  4055. return self;},
  4056. args: [],
  4057. source: unescape('size%0A%09%5Eelements%20size'),
  4058. messageSends: ["size"],
  4059. referencedClasses: []
  4060. }),
  4061. smalltalk.OrderedCollection);
  4062. smalltalk.addMethod(
  4063. unescape('_at_put_'),
  4064. smalltalk.method({
  4065. selector: unescape('at%3Aput%3A'),
  4066. category: 'accessing',
  4067. fn: function (anIndex, anObject){
  4068. var self=this;
  4069. return self['@elements'][anIndex - 1] = anObject;
  4070. return self;},
  4071. args: ["anIndex", "anObject"],
  4072. source: unescape('at%3A%20anIndex%20put%3A%20anObject%0A%09%3Creturn%20self%5B%27@elements%27%5D%5BanIndex%20-%201%5D%20%3D%20anObject%3E'),
  4073. messageSends: [],
  4074. referencedClasses: []
  4075. }),
  4076. smalltalk.OrderedCollection);
  4077. smalltalk.addMethod(
  4078. unescape('_at_ifAbsent_'),
  4079. smalltalk.method({
  4080. selector: unescape('at%3AifAbsent%3A'),
  4081. category: 'accessing',
  4082. fn: function (anIndex, aBlock){
  4083. var self=this;
  4084. return smalltalk.send(self['@elements'], "_at_ifAbsent_", [anIndex, aBlock]);
  4085. return self;},
  4086. args: ["anIndex", "aBlock"],
  4087. source: unescape('at%3A%20anIndex%20ifAbsent%3A%20aBlock%0A%09%5Eelements%20at%3A%20anIndex%20ifAbsent%3A%20aBlock'),
  4088. messageSends: ["at:ifAbsent:"],
  4089. referencedClasses: []
  4090. }),
  4091. smalltalk.OrderedCollection);
  4092. smalltalk.addMethod(
  4093. unescape('_add_'),
  4094. smalltalk.method({
  4095. selector: unescape('add%3A'),
  4096. category: 'adding/removing',
  4097. fn: function (anObject){
  4098. var self=this;
  4099. self['@elements'].push(anObject); return anObject;;
  4100. return self;},
  4101. args: ["anObject"],
  4102. source: unescape('add%3A%20anObject%0A%09%3Cself%5B%27@elements%27%5D.push%28anObject%29%3B%20return%20anObject%3B%3E'),
  4103. messageSends: [],
  4104. referencedClasses: []
  4105. }),
  4106. smalltalk.OrderedCollection);
  4107. smalltalk.addMethod(
  4108. unescape('_join_'),
  4109. smalltalk.method({
  4110. selector: unescape('join%3A'),
  4111. category: 'enumerating',
  4112. fn: function (aString){
  4113. var self=this;
  4114. return smalltalk.send(self['@elements'], "_join_", [aString]);
  4115. return self;},
  4116. args: ["aString"],
  4117. source: unescape('join%3A%20aString%0A%09%5Eelements%20join%3A%20aString'),
  4118. messageSends: ["join:"],
  4119. referencedClasses: []
  4120. }),
  4121. smalltalk.OrderedCollection);
  4122. smalltalk.addMethod(
  4123. unescape('_sort'),
  4124. smalltalk.method({
  4125. selector: unescape('sort'),
  4126. category: 'enumerating',
  4127. fn: function (){
  4128. var self=this;
  4129. smalltalk.send(self['@elements'], "_sort", []);
  4130. return self;
  4131. return self;},
  4132. args: [],
  4133. source: unescape('sort%0A%20%09elements%20sort.%0A%09%5Eself'),
  4134. messageSends: ["sort"],
  4135. referencedClasses: []
  4136. }),
  4137. smalltalk.OrderedCollection);
  4138. smalltalk.addMethod(
  4139. unescape('_sort_'),
  4140. smalltalk.method({
  4141. selector: unescape('sort%3A'),
  4142. category: 'enumerating',
  4143. fn: function (aBlock){
  4144. var self=this;
  4145. smalltalk.send(self['@elements'], "_sort_", [aBlock]);
  4146. return self;
  4147. return self;},
  4148. args: ["aBlock"],
  4149. source: unescape('sort%3A%20aBlock%0A%09elements%20sort%3A%20aBlock.%0A%09%5Eself'),
  4150. messageSends: ["sort:"],
  4151. referencedClasses: []
  4152. }),
  4153. smalltalk.OrderedCollection);
  4154. smalltalk.addMethod(
  4155. unescape('_remove_'),
  4156. smalltalk.method({
  4157. selector: unescape('remove%3A'),
  4158. category: 'adding/removing',
  4159. fn: function (anObject){
  4160. var self=this;
  4161. for(var i=0;i<self['@elements'].length;i++) {
  4162. if(self['@elements'][i] == anObject) {
  4163. self['@elements'].splice(i,1);
  4164. break;
  4165. }
  4166. }
  4167. ;
  4168. return self;},
  4169. args: ["anObject"],
  4170. source: unescape('remove%3A%20anObject%0A%09%3C%0A%09%09for%28var%20i%3D0%3Bi%3Cself%5B%27@elements%27%5D.length%3Bi++%29%20%7B%0A%09%09%09if%28self%5B%27@elements%27%5D%5Bi%5D%20%3D%3D%20anObject%29%20%7B%0A%09%09%09%09self%5B%27@elements%27%5D.splice%28i%2C1%29%3B%0A%09%09%09%09break%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%3E'),
  4171. messageSends: [],
  4172. referencedClasses: []
  4173. }),
  4174. smalltalk.OrderedCollection);
  4175. smalltalk.addMethod(
  4176. unescape('_sorted'),
  4177. smalltalk.method({
  4178. selector: unescape('sorted'),
  4179. category: 'enumerating',
  4180. fn: function (){
  4181. var self=this;
  4182. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort", []);
  4183. return self;},
  4184. args: [],
  4185. source: unescape('sorted%0A%09%5Eself%20copy%20sort'),
  4186. messageSends: ["sort", "copy"],
  4187. referencedClasses: []
  4188. }),
  4189. smalltalk.OrderedCollection);
  4190. smalltalk.addMethod(
  4191. unescape('_sorted_'),
  4192. smalltalk.method({
  4193. selector: unescape('sorted%3A'),
  4194. category: 'enumerating',
  4195. fn: function (aBlock){
  4196. var self=this;
  4197. return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
  4198. return self;},
  4199. args: ["aBlock"],
  4200. source: unescape('sorted%3A%20aBlock%0A%09%5Eself%20copy%20sort%3A%20aBlock'),
  4201. messageSends: ["sort:", "copy"],
  4202. referencedClasses: []
  4203. }),
  4204. smalltalk.OrderedCollection);
  4205. smalltalk.addMethod(
  4206. unescape('_removeFrom_to_'),
  4207. smalltalk.method({
  4208. selector: unescape('removeFrom%3Ato%3A'),
  4209. category: 'adding/removing',
  4210. fn: function (aNumber, anotherNumber){
  4211. var self=this;
  4212. self['@elements'].splice(aNumber - 1,anotherNumber - 1);
  4213. return self;},
  4214. args: ["aNumber", "anotherNumber"],
  4215. source: unescape('removeFrom%3A%20aNumber%20to%3A%20anotherNumber%0A%09%3Cself%5B%27@elements%27%5D.splice%28aNumber%20-%201%2CanotherNumber%20-%201%29%3E'),
  4216. messageSends: [],
  4217. referencedClasses: []
  4218. }),
  4219. smalltalk.OrderedCollection);
  4220. smalltalk.addMethod(
  4221. unescape('_reversed'),
  4222. smalltalk.method({
  4223. selector: unescape('reversed'),
  4224. category: 'converting',
  4225. fn: function (){
  4226. var self=this;
  4227. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_asArray", []), "_reversed", []), "_asOrderedCollection", []);
  4228. return self;},
  4229. args: [],
  4230. source: unescape('reversed%0A%09%5Eself%20asArray%20reversed%20asOrderedCollection'),
  4231. messageSends: ["asOrderedCollection", "reversed", "asArray"],
  4232. referencedClasses: []
  4233. }),
  4234. smalltalk.OrderedCollection);
  4235. smalltalk.addMethod(
  4236. unescape('_initialize'),
  4237. smalltalk.method({
  4238. selector: unescape('initialize'),
  4239. category: 'initialization',
  4240. fn: function (){
  4241. var self=this;
  4242. smalltalk.send(self, "_initialize", [], smalltalk.SequenceableCollection);
  4243. self['@elements']=[];
  4244. return self;},
  4245. args: [],
  4246. source: unescape('initialize%0A%09super%20initialize.%0A%09elements%20%3A%3D%20%23%28%29'),
  4247. messageSends: ["initialize"],
  4248. referencedClasses: []
  4249. }),
  4250. smalltalk.OrderedCollection);
  4251. smalltalk.addMethod(
  4252. unescape('_withIndexDo_'),
  4253. smalltalk.method({
  4254. selector: unescape('withIndexDo%3A'),
  4255. category: 'enumerating',
  4256. fn: function (aBlock){
  4257. var self=this;
  4258. smalltalk.send(self['@elements'], "_withIndexDo_", [aBlock]);
  4259. return self;},
  4260. args: ["aBlock"],
  4261. source: unescape('withIndexDo%3A%20aBlock%0A%09elements%20withIndexDo%3A%20aBlock'),
  4262. messageSends: ["withIndexDo:"],
  4263. referencedClasses: []
  4264. }),
  4265. smalltalk.OrderedCollection);
  4266. smalltalk.addMethod(
  4267. unescape('_detect_ifNone_'),
  4268. smalltalk.method({
  4269. selector: unescape('detect%3AifNone%3A'),
  4270. category: 'enumerating',
  4271. fn: function (aBlock, anotherBlock){
  4272. var self=this;
  4273. return smalltalk.send(self['@elements'], "_detect_ifNone_", [aBlock, anotherBlock]);
  4274. return self;},
  4275. args: ["aBlock", "anotherBlock"],
  4276. source: unescape('detect%3A%20aBlock%20ifNone%3A%20anotherBlock%0A%09%5Eelements%20detect%3A%20aBlock%20ifNone%3A%20anotherBlock'),
  4277. messageSends: ["detect:ifNone:"],
  4278. referencedClasses: []
  4279. }),
  4280. smalltalk.OrderedCollection);
  4281. smalltalk.addMethod(
  4282. unescape('_do_'),
  4283. smalltalk.method({
  4284. selector: unescape('do%3A'),
  4285. category: 'enumerating',
  4286. fn: function (aBlock){
  4287. var self=this;
  4288. smalltalk.send(self['@elements'], "_do_", [aBlock]);
  4289. return self;},
  4290. args: ["aBlock"],
  4291. source: unescape('do%3A%20aBlock%0A%09elements%20do%3A%20aBlock'),
  4292. messageSends: ["do:"],
  4293. referencedClasses: []
  4294. }),
  4295. smalltalk.OrderedCollection);
  4296. smalltalk.addMethod(
  4297. unescape('_asOrderedCollection'),
  4298. smalltalk.method({
  4299. selector: unescape('asOrderedCollection'),
  4300. category: 'converting',
  4301. fn: function (){
  4302. var self=this;
  4303. return self;
  4304. return self;},
  4305. args: [],
  4306. source: unescape('asOrderedCollection%0A%09%5Eself'),
  4307. messageSends: [],
  4308. referencedClasses: []
  4309. }),
  4310. smalltalk.OrderedCollection);
  4311. smalltalk.addMethod(
  4312. unescape('_asArray'),
  4313. smalltalk.method({
  4314. selector: unescape('asArray'),
  4315. category: 'converting',
  4316. fn: function (){
  4317. var self=this;
  4318. return smalltalk.send(self['@elements'], "_copy", []);
  4319. return self;},
  4320. args: [],
  4321. source: unescape('asArray%0A%09%5Eelements%20copy'),
  4322. messageSends: ["copy"],
  4323. referencedClasses: []
  4324. }),
  4325. smalltalk.OrderedCollection);